|
-
Dec 10th, 2003, 11:04 AM
#1
Thread Starter
New Member
Extracting CLSID progammatically from OCX?
Hi,
I've spent a couple of hours googling, but can't find a way to extract the CLSID from an OCX file. I know I can register it and read this information (and others) from the Registry, but I'd like to get this information directly from the OCX instead, and display this info in a label.
While browsing through Usenet and the Web, I happened upon a bit of infos on a MS-created by unsupported "tlbinf32.dll", but no code to show how to read the CLSID info.
Anybody has some running code for VB5 or 6?
Thank you :-)
Fred.
-
Dec 10th, 2003, 12:30 PM
#2
Try
VB Code:
Private Sub Form_Load()
Dim tlii As TLI.TypeLibInfo
Set tlii = TLIApplication.TypeLibInfoFromFile("SomeFile.ocx")
MsgBox tlii.Guid
End Sub
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Dec 10th, 2003, 12:37 PM
#3
Thread Starter
New Member
Thx a bunch but where can I find the variable definition?
>>Dim tlii As TLI.TypeLibInfo
"User-defined type not found."
Thx
Fred.
-
Dec 10th, 2003, 12:43 PM
#4
Oh, sorry, you need to add a reference to the TypeLib Info Library.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Dec 10th, 2003, 12:47 PM
#5
Thread Starter
New Member
Thx :-) That did it.
Fred.
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
|