[fpc-pascal] how to convert C++ header to fpc

Victor Matuzenko vitek03 at gmail.com
Thu Aug 14 17:48:44 CEST 2014


14.08.2014 19:31, Dennis Poon пишет:
> I don't know much about c++ and but I got this dll with the following 
> header that I need to use its dll.
>
>
> #define SPDLLCALL __stdcall
>
> typedef void (SPDLLCALL *LoginReplyAddr)(long ret_code, char *ret_msg);
>
> typedef void (SPDLLCALL *p_SPAPI_RegisterLoginReply)(LoginReplyAddr 
> addr);
>
>
> #endif
>
> Can anyone kind enough to teach me how to translate them into pascal 
> interface?

type
LoginReplyAddr: procedure (ret_code: LongInt; ret_msg: PAnsiChar); stdcall;
p_SPAPI_RegisterLoginReply: procedure (addr: LoginReplyAddr); stdcall;

ret_code may be a parameter of type Int64 (it depends on how long type 
interpreted by C++ compiler).

-- 
Victor Matuzenko (Виктор Матузенко)




More information about the fpc-pascal mailing list