Hi,
I have a problem using a
dll written i C++ invoking from Delphi6.
How to pass pointers (type struct) to a
dll ?
C++ function:
Code:
typedef struct
{ unsigned int lengt;
unsigned char data[2096];
}MESSAGE_;
extern "C" __declspec(dllexport)
unsigned char
WINAPI build_esco_format
(MESSAGE_ *pntr,
unsigned char comm_type,
unsigned long source,
unsigned long destination)
-------------------------------
Delphi function:
Delphi-Quellcode:
TYPE pMESSAGE = ^TMESSAGE_;
TMESSAGE_ = record
lengt: Word;
data: Array[0..2096-1] of Char;
end {MESSAGE};
var Message_2 : pMESSAGE;
function build_esco_format
(Message_2 : pMESSAGE;
comm_type : Byte;
source : LongInt;
destinatin: LongInt ): Byte;
stdcall; external thedll;
[edit=sakura] Code-Tags corrected Mfg, sakura[/edit]