
Help accessing VB ActiveX DLL from C using only Win32
Quote:
>VB seems to only allow you to create a dll that is an ActiveX
>dll.
True.
Quote:
>We'd rather avoid adding full COM/OLE automation support into
>our application at this point.
Unfortunately, you must. As you said, VB only creates ActiveX
DLLs. You do not need to work with MFC to do this, although
using C++ and some COM helper classes MS created
(bstr_t, variant_t, and comptr_t) will make it much easier.
Quote:
>It seems that the only exported
>functions are the standard ones:
> DllCanUnloadNow
> DllGetClassObject
> DllRegisterServer
> DllUnregisterServer
>Do we want to call these funcs, especially DllGetClassObject
>in order to access the classes and funcs in the ActiveX dll?
No. Note from MSDN:
'You should not call DllGetClassObject directly. When an
object is defined in a DLL, CoGetClassObject calls the
CoLoadLibrary function to load the DLL, which, in turn,
calls DllGetClassObject.'
Quote:
>Or is there some other way to accomplish our task?
Just using COM.