Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-08

how to convert C++ header to fpc

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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?

Thanks a lot.

Dennis

Reply by email

Victor Matuzenko
to Dennis Poon

14.08.2014 19:31, Dennis Poon пишет:

Show quoted text 16 lines
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 (Виктор Матузенко)

Reply by email

Dennis Poon
to Victor Matuzenko
Victor Matuzenko wrote 27 lines
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).

Thanks so much.

Dennis

Reply by email