I’d like to call some C functions from a Visual Basic 6 program which take an IUnknown*. Assuming that I know that some control in my VB6 application is an ActiveX control, can I get the underlying IUnknown* out of that (maybe by casting?) to pass it to the C function?
I’d like to call some C functions from a Visual Basic 6 program which
Share
All COM interfaces derive from
IUnknown, you can just use theIUnknownmethods on any valid interface pointer.If you need an additional reference to the same component, but don’t care about which interface then use the
QueryInterfacemethod forIUknown.