Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# GUI Controlling An External Device Pin
C-P-User-329-Nov-12 6:27
C-P-User-329-Nov-12 6:27 
GeneralRe: C# GUI Controlling An External Device Pin
OriginalGriff29-Nov-12 8:09
mveOriginalGriff29-Nov-12 8:09 
GeneralRe: C# GUI Controlling An External Device Pin
C-P-User-329-Nov-12 9:27
C-P-User-329-Nov-12 9:27 
GeneralRe: C# GUI Controlling An External Device Pin
OriginalGriff29-Nov-12 20:22
mveOriginalGriff29-Nov-12 20:22 
GeneralRe: C# GUI Controlling An External Device Pin
C-P-User-330-Nov-12 4:38
C-P-User-330-Nov-12 4:38 
GeneralRe: C# GUI Controlling An External Device Pin
C-P-User-329-Nov-12 6:58
C-P-User-329-Nov-12 6:58 
GeneralRe: C# GUI Controlling An External Device Pin
OriginalGriff29-Nov-12 8:04
mveOriginalGriff29-Nov-12 8:04 
QuestionC++ to C# Translation Pin
GenJerDan28-Nov-12 10:37
GenJerDan28-Nov-12 10:37 
Hi
I've got a Delphi32 DLL that I have to call from C# and have a .h, .hpp, and .bas header file.

Would it make most sense to use the .hpp file to create a Class that will wrap the DLL? Seems so to me.

Unfortunately, I don't do C++ Frown | :(

It sort of makes sense, but not completely. Mostly, I know void * should be IntPtr, and char * should be string. But that's about it.

For instance,

const char bapiDll[] = "BAPI32.DLL";
HINSTANCE hLib;
enum TParamType { literal, reference, list } ParamType;
void * pRPC;


should turn into

const string bapiDll = "BAPI32.DLL";
uint HINSTANCE, hLib;
enum TParamType { literal, reference, list } ;
IntPtr pRPC;


Yes? No?

But what do I do with the prototypes and what follows inside the actual guts of the thing? like

void RPCBPropGet ( char * s, char * t);


which obviously has something to do with


void TRPCBroker::RPCBPropGet ( char * s, char * t)
{
iRPCBPropGet(pRPC, s, t);
}


and


TRPCBroker::TRPCBroker()
{
hLib = LoadLibrary(bapiDll);
if((unsigned)hLib<=HINSTANCE_ERROR)
{
char bfr[40];
wsprintf(bfr, "Failure loading library: %s", bapiDll);
MessageBox(NULL, bfr, toolSet, MB_OK|MB_APPLMODAL);
UnLoad = true;
}

. . .
iRPCBPropGet = (void (__stdcall*)(void *, char *, char *)) GetProcAddress(hLib, "RpcbPropGet");
. . .
UnLoad = false;
pRPC = iRPCBCreate();
};



Any good references out there that'll cover this without me having to spend days reading through everything I don't want to know? Or anyone incredibly bored with no life who wants to hold my hand through all 139 lines of it (including empty and comment lines :p )?
No dogs or cats are in the classroom.

My Mu[sic], Films and Windows Programs, etc.

AnswerRe: C++ to C# Translation Pin
Garth J Lancaster28-Nov-12 12:22
professionalGarth J Lancaster28-Nov-12 12:22 
GeneralRe: C++ to C# Translation Pin
GenJerDan28-Nov-12 14:14
GenJerDan28-Nov-12 14:14 
AnswerRe: C++ to C# Translation Pin
Espen Harlinn28-Nov-12 12:39
professionalEspen Harlinn28-Nov-12 12:39 
GeneralRe: C++ to C# Translation Pin
GenJerDan28-Nov-12 14:11
GenJerDan28-Nov-12 14:11 
GeneralRe: C++ to C# Translation Pin
Espen Harlinn28-Nov-12 22:00
professionalEspen Harlinn28-Nov-12 22:00 
AnswerRe: C++ to C# Translation Pin
V.28-Nov-12 21:39
professionalV.28-Nov-12 21:39 
AnswerRe: C++ to C# Translation Pin
David Knechtges29-Nov-12 2:55
David Knechtges29-Nov-12 2:55 
QuestionSave data from Unbound C# DataGridView to Sql Server and then Bind Pin
ahmed_one28-Nov-12 0:59
ahmed_one28-Nov-12 0:59 
QuestionError: Interfaces cannot contain fields Pin
Joni_7827-Nov-12 23:43
Joni_7827-Nov-12 23:43 
AnswerRe: Error: Interfaces cannot contain fields Pin
Richard MacCutchan27-Nov-12 23:51
mveRichard MacCutchan27-Nov-12 23:51 
GeneralRe: Error: Interfaces cannot contain fields Pin
Joni_7828-Nov-12 0:03
Joni_7828-Nov-12 0:03 
AnswerRe: Error: Interfaces cannot contain fields Pin
Pete O'Hanlon28-Nov-12 0:06
mvePete O'Hanlon28-Nov-12 0:06 
GeneralRe: Error: Interfaces cannot contain fields Pin
Joni_7828-Nov-12 0:28
Joni_7828-Nov-12 0:28 
GeneralRe: Error: Interfaces cannot contain fields Pin
Joni_7828-Nov-12 0:52
Joni_7828-Nov-12 0:52 
GeneralRe: Error: Interfaces cannot contain fields Pin
Pete O'Hanlon28-Nov-12 1:08
mvePete O'Hanlon28-Nov-12 1:08 
GeneralAbout URL Pin
Varsha R27-Nov-12 20:42
Varsha R27-Nov-12 20:42 
GeneralRe: About URL Pin
Pete O'Hanlon27-Nov-12 20:52
mvePete O'Hanlon27-Nov-12 20:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.