|
-
May 27th, 1999, 01:26 AM
#1
To get CLSID of OCX from its file name.
Hi,
I have an oCX ( say abc.ocx ). How can I get cLSID for it ( Programmatically )
I am using VC++. I have used GetClassFile which takes file name as [IN] parameter and gives clsid as [OUT] parameter, but it is failing.
I do not want to use manaual effort of exploring registry using regedit.
Thanks,
Onkar
-
May 27th, 1999, 02:53 AM
#2
Re: To get CLSID of OCX from its file name.
Does CLSIDFromProgID() (where the OCX filename is the 'ProgID') do the job? (I don't know, I'm just trying to suggest a possibility).
-
May 27th, 1999, 11:38 AM
#3
Re: To get CLSID of OCX from its file name.
Onkar,
do to want tofind the CLSID of the control contained in a OCX?A OCX can possibly contain many controls.So there is a possiblity that there might be many CLSID's ina single OCX.
The function GetClassFile is meant for finding CLSID of OLE objects stored in a structured storage file.A OCX is not a structured storage file.
So what you need to do is use the ITypeLib and ITypeInfo interfaces and LoadTypeLib.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|