![]() |
LPDISPATCH über DLL-Schnittstelle in Exe verwenden
ch habe eine C/C++-Dll mit C-Interface und will von diesem eine LPDISPATCH-Interface-Zeiger zurückbekommen.
Die Funktion binde ich in Delphi mittels MyDLLFunc: function( Parent: HWND): Pointer; stdcall; und bekomme mittels
Delphi-Quellcode:
Auch bis zum punkt pDisp := ...,
var
pDisp: pDispatch; Disp: IDispatch; begin pDisp := pDispatch(MyDLLFunc); Disp := pDisp^; end; aber bei Disp := ... kracht es. Was muß ich noch beachten? Evtl. irgendwelches Marshalling? |
Re: LPDISPATCH über DLL-Schnittstelle in Exe verwenden
Versuch mal:
Delphi-Quellcode:
var
Disp: IDispatch; obj : OleVariant; begin Disp := IDispatch(MyDLLFunc); obj := Disp; obj.SomeMethod; end; |
Re: LPDISPATCH über DLL-Schnittstelle in Exe verwenden
Wieso sieht man manchmal die einfachste Lösung nicht? :wall:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:20 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