Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determining the GUID of a file

Status
Not open for further replies.

samshiell

Programmer
Mar 12, 2001
26
GB
Hi
How can I (programmatically) obtain the GUID of a DLL that may or may not be registered on the target machine?

I'm sure this is easy but I've been searing to 2 days now and not got anywhere...

Thanks

Sam
 
check out this thread: thread222-317871

Or, do a search for "dll guid" (without the quotes) in this forum.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Click Project -> References
Select "TypeLib Information"

Add the Following Code

Code:
Public Function GetGuid(ByVal FileName As String) As String

    Dim x As TypeLibInfo
    
    Set x = TypeLibInfoFromFile(FileName)
    GetGuid = x.Guid
    Set x = Nothing
    
End Function

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 

So easy when you know how!

Thanks a lot guys...

I just have to make the rest of the code work now!

Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top