![]() |
c++ zu Delphi Callback
Liste der Anhänge anzeigen (Anzahl: 2)
Hallo :=)
Ich darf mal wieder eine Schnittstelle bauen. jetzt komme ich nicht wirklich weiter :/ C Header
Code:
Mein Ansatz in Delphi
/* this defines the signature of the call back function that will be called from PEPPERerface to the POS */
#define PEPCallbackSignature \ void ( *pepCallback )( PEPCallbackEvent /* eEvent */, PEPCallbackOption /* eOption */, PEPHandle /* hInstance */, \ PEPHandle /* hOutputOptions */, PEPHandle /* hInputOptions */, void* /* pUserData */ )
Code:
Mehr Info habe ich leider in keiner Dokumentation gefunden, wie konvertiere ich das am besten von C -> Delphi, war mein Ansatz einigermaßen korrekt?
//Die beiden musste ich noch deklarieren, andere typen wie PEPHandle habe ich bereits erfolgreich in Delphi implementiert
type PEPCallbackEvent = Pointer; type PEPCallbackOption = Pointer; type PEPCallbackSignature = procedure(eEvent: PEPCallbackEvent; eOption: PEPCallbackOption; hInstance: PEPHandle; hOutputOptions: PEPHandle; hInputOptions: PEPHandle; pUserData: Pointer); Vielen Dank! |
AW: c++ zu Delphi Callback
Das könnte so schon funktionieren, je nachdem wie PEPCallbackEvent und PEPCallbackOption deklariert sind.
Die PEPCallbackOption klingen nach einen Zeiger auf einen Enum-Wert/ganzzahligen Typ. Ggf. Calling Convention (stdcall, cdcecl) unter 32-Bit beachten. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:25 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