![]() |
C Callback Routine --> Delphi Definition
Hi,
wie übersetze ich folgende C Routine (Callback)
Delphi-Quellcode:
mein Versuch:
typedef void (*EIB7OnDataAvailable)(EIB7_HANDLE eib, unsigned long cnt, void* data);
Delphi-Quellcode:
Was bedeutet das '*' bei '*EIB7OnDataAvailable' und welchen DelphiTyp hat 'data' ?
procedure EIB7OnDataAvailable( eib:EIB7_HANDLE ; cnt:Longword ; data:??? );
cya |
Re: C Callback Routine --> Delphi Definition
Zitat:
Zitat:
HTH, Uli. |
Re: C Callback Routine --> Delphi Definition
Das stand Unsinn..
[EDIT: Oben steht schon alles...] |
Re: C Callback Routine --> Delphi Definition
und long ist übrigens ein LongInt (bzw. aktuell auch Integer, da 32-Bit-Anwendung) ... ulong = LongWord (Cardinal)
|
Re: C Callback Routine --> Delphi Definition
demnach würde ich dann die Routine so übersetzen:
Delphi-Quellcode:
Korrekt ?
procedure EIB7OnDataAvailable( eib:EIB7_HANDLE ; cnt:Cardinal; data:Pointer);
cya |
Re: C Callback Routine --> Delphi Definition
Ich bin zwar kein Crack, aber wenn ich das richtig verstehe eher so:
Delphi-Quellcode:
type
EIB7OnDataAvailable = procedure( eib:EIB7_HANDLE ; cnt:Cardinal; data:Pointer); |
Re: C Callback Routine --> Delphi Definition
OK,
Dank an alle . cya |
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:29 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz