Link to home
Create AccountLog in
Avatar of mbensimo
mbensimo

asked on

Instanciating an ActiveX control into a C program

Hello,

I am making a C program which should use an ActiveX control.

I have an ActiveX control and i know its CLSID, I want to use it so I do :

hr = CoInitializeEx ( NULL, COINIT_MULTITHREADED );

then

hr = CoCreateInstance ( &clsid,
            NULL,
            CLSCTX_INPROC_SERVER,
            &IID_IUnknown, //(REFIID) &giid,
            &ppv );

If I do so ... I have a link error LNK2001 telling me : unresolved external symbol IID_IUnknown

When I am using an ActiveX control is it a proper manner user IID_IUnknown as the REFIID, if not what should i use as the REFIID and how do I define it.


ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of harshvir_drish
harshvir_drish

Hi,

i want to call an activex control from my dll code but when i use the interface of activex control in my dll then it says
"undeclared identifier".
i know my dll code doesn't find the declaration of interface's pointer.
can you please tell me which header files or libraries i have to include so that i can get the pointer of my activex control.