开发者

Consume events in delphi DLL that can be used by VB6

I have created bandwidth monitoring function in delphi dll, where i need to raise a event if any bandwidth transfer occurred. similarly i need to declare the delphi dll in vb and consume the dll event. Any idea开发者_StackOverflows welcome


I believe you want an IDispatch interface, which will mean that you (a) define a class in Delphi, (b) use dual interfaces (COM vtable + DISPATCH). And (c) expose that COM object to your VB object. (d) In VB you also define an IDispatch type COM interface, and you pass that interface in as a parameter. I would call such an IDispatch interface an INotify.

there are actually standard com interfaces often used in OLE Automation, like the connection point container, that you might want to look into. See this article:

http://www.gtro.com/delphi/comevents_e.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜