How to get CLSID given ActiveX control Name
-
Hi, I want to know how to get CLSID of a particular activex control given its name. Is there any API to do so?
-
Hi, I want to know how to get CLSID of a particular activex control given its name. Is there any API to do so?
Hi, Here is the API to get the CLSID of the activex control. CLSIDFromProgID(...) Hope this would help. Cheers, Vishal
-
Hi, Here is the API to get the CLSID of the activex control. CLSIDFromProgID(...) Hope this would help. Cheers, Vishal
Hi, Yes i have tried this API but not succesful. If AnalogMeter is my activeX control then i have used CLSID clsid; CLSIDFromProgID(L"AnalogMeter", &clsid); This gives error ....how to do it? how to pass activeX name as parameter to this API?
-
Hi, Yes i have tried this API but not succesful. If AnalogMeter is my activeX control then i have used CLSID clsid; CLSIDFromProgID(L"AnalogMeter", &clsid); This gives error ....how to do it? how to pass activeX name as parameter to this API?
The first parameter for CLSIDFromProgID has to be the PROGID Like for MS-Word, the PROGID is "Word.Application.9" You can get PROGID from HKEY_CLASSES_ROOT BTW what is the error you are getting ? You can see the error using the API GetLastError() Have fun ! Cheers, Vishal
-
Hi, I want to know how to get CLSID of a particular activex control given its name. Is there any API to do so?
Hi what visahlmore was written is quite correct. but to describe more, I should note that ClassID is assigned to a class not an activex while an activex file can have one or more classes to export. Usually the class is named like "ActiveXName.ClassName" exactly the same string that you should use in CreateObject API to make an instance of the class. You can easily also find the class id in the following address in registry: HKEY_CLASSES_ROOT\ActiveXName.ClassName\CLSID
-
Hi what visahlmore was written is quite correct. but to describe more, I should note that ClassID is assigned to a class not an activex while an activex file can have one or more classes to export. Usually the class is named like "ActiveXName.ClassName" exactly the same string that you should use in CreateObject API to make an instance of the class. You can easily also find the class id in the following address in registry: HKEY_CLASSES_ROOT\ActiveXName.ClassName\CLSID
Thanks, My problem is solved. One more thing, i need to show selected activex images in a ToolBox on start of application and allow user to drag n drop controls onto the container...Just like we do while designing a dialog box(adding buttons,etc). Any help on how to do it?