谢谢!C++里的定义的struct类型,如何转换成delphi里相应的类型?LPSTR,PVOID在delphi是那种类型?(50分)

  • 主题发起人 主题发起人 qian0303
  • 开始时间 开始时间
Q

qian0303

Unregistered / Unconfirmed
GUEST, unregistred user!
typedef struct
{
unsigned short Size;
unsigned long Flags;
unsigned char Links;
unsigned short Output;
} MOSAICDEVICEPARMS, *PMOSAICDEVICEPARMS;
还有下面这个如何用delphi定义:LPSTR,PVOID在delphi是那种类型
extern int
OldExtractUnsignedInt (
LPSTR pValue,
int nValueChars,
PVOID pnVoid,
PVOID pVoid );
 
LPStr在delphi中为Pchar;
PVOID在delphi中为Pointer;

PMOSAICDEVICEPARMS=^MOSAICDEVICEPARMS;
MOSAICDEVICEPARMS=record
Size:WORD;
Flags:DWORD;
Links:BYTE;
Output:WORD;
end;

 
Type
MOSAICDEVICEPARMS = record
Size :Byte;
Flags :LongWord;
Links :Char;
Output:Byte;
end;
PMOSAICDEVICEPARMS = ^MOSAICDEVICEPARMS;

Function OldExtractUnsignedInt(pValue:PChar;nValueChars :Integer; pnVoid: Pointer; pVoid: Pointer):Integer;stdcall;external 'XXX.DLL';
 
多人接受答案了。
 
后退
顶部