svetlana
svetlana

Reputation: 31

how to translate c declaration to delphi?

typedef void (*funcNetworkEventReceived)(int, unsigned int, int);

Thanks.

Upvotes: 3

Views: 208

Answers (1)

Marco van de Voort
Marco van de Voort

Reputation: 26358

A void function is a procedure, if we exclude D1, integer is =32bit int, cardinal is 32-bit unsigned.

The calling convention for C is assumed cdecl without export statements, but I assume depending on compiler can be different due to global directives in the file. (if it fails, try stdcall instead of cdecl)

This lands us at:

Type 
   TUncNetworkEventReceived = procedure (p1:integer;p2:cardinal;p3:integer);cdecl;

Upvotes: 8

Related Questions