Results 1 to 3 of 3

Thread: Registering DLLs

  1. #1

    Thread Starter
    Addicted Member Dmyze's Avatar
    Join Date
    Mar 2002
    Location
    Seattle
    Posts
    160

    Unhappy Registering DLLs

    I have a program that can check any setting in the windows Registry using API calls (RegQueryValueEx). My question is how do you check if a DLL is registered. DLL's seem to have a unique id like {047813C6-EE35-11D0-9CF1-444553540000}. Is this number computer specific? If it's not then I can just write my code so it checks for the same number on every PC, but if the number is PC specific I will have to write code that figures out how the number is generated. Does anyone know how to do that?

    Getting a specific Key is easy, is there away to get lists of keys form the Registry, like if I query HKLM\Software and it returns all the sub groups? I think I could get that to do what I need.

    I'm writing in VB6, I have VB.NET at my disposal as well if that could help.

    Let me know if there are any other details you need.
    -Daryl
    "Two More Rolls of Duct tape, and the world is mine!"
    VB.NET Guru

  2. #2
    jim mcnamara
    Guest
    It's way more complicated than you'd like. First off, not all DLL's are registered, nor do they need to be.

    That big number is called a GUID. It is used to identify all of the registered components of a DLL (a COM dll only), OCX, or ActiveX EXE file. All of these files create what are called COM servers - you use servers in VB as objects and controls.

    The number of GUID's that are associated with one DLL can be really large - a GUID for each COM interface (there can be 20 or 30 of them for one DLL), DSPID's, and CLSID's for each class created in the dll. One DLL can be assoicated with over 100 GUID numbers. These numbers recur (IID's) over many DLL's. Some are spefically unique to the DLL.

    Get a book like VB COM by T Lewis and learn about GUID's before you try to find by code if something is registered. It's a monstrous project.

  3. #3

    Thread Starter
    Addicted Member Dmyze's Avatar
    Join Date
    Mar 2002
    Location
    Seattle
    Posts
    160

    Almost Done..

    Thank you, I have purchased the book and a book on the API. The thing is that I know which DLLs I am looking for. I am writing a program that checks to make sure another program installed successfully.

    So I have written my program to check two areas of the Registry, both under CLSID, one under HKEY_LOCAL_MACHIENE\SOFTWARE\CLASSES\CLSID and the other under HKEY_CLASSES_ROUTE\CLSID. I grab all the GUIDS and check for the files that I am looking for, check to make sure they exist, look the same in both places, and send my results back to the Developers of the DLL's. I should be done with the program tomorrow, we'll see if the DLL guys like it.
    -Daryl
    "Two More Rolls of Duct tape, and the world is mine!"
    VB.NET Guru

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width