开发者

Using IUnknown derived C++ COM object in VB6

开发者 https://www.devze.com 2023-03-10 23:23 出处:网络
I have developed a C++ DLL-based COM object that implements some IUnknown derived in开发者_运维技巧terface. How can I use it in VB6? Does VB6 support IUnknown based interfaces, or I need to derive fro

I have developed a C++ DLL-based COM object that implements some IUnknown derived in开发者_运维技巧terface. How can I use it in VB6? Does VB6 support IUnknown based interfaces, or I need to derive from IDispatch?

UPDATE

I have not used ATL. The implementation is based on A very simple COM server without ATL or MFC article. Seems like I need to generate a .tlb file for my object?!


You do not need to use IDispatch; that's only required for late binding.

To use your object you must add a reference to the object's type library to your VB6 project.


If the interface is only derived from IUnknown and not IDispatch , you can use early binding in VB6.

0

精彩评论

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