Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Product Id

Product Id

Scheduled Pinned Locked Moved Visual Basic
sysadmintutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gagan 20
    wrote on last edited by
    #1

    Can anyone tell me how to get CLSID of my application and product id of my deployment project?

    J 1 Reply Last reply
    0
    • G Gagan 20

      Can anyone tell me how to get CLSID of my application and product id of my deployment project?

      J Offline
      J Offline
      John_Adams
      wrote on last edited by
      #2

      Hi, You can get the CLSID of your program using VB.Net in the following manner: BEGIN CODE ' Use Server 'localhost'. It can be a remote host! Dim theServer As String = "localhost" ' Use programID 'HKEY_CLASSES_ROOT\DirectoryControl.DirectoryList.1'. Dim myProgID As String = "DirectoryControl.DirectoryList.1" ' Make a call to the method to get the Type information of ' the given ProgID. Dim myType1 As Type = Type.GetTypeFromProgID(myProgID, theServer, True) Console.WriteLine(("GUID for ProgramID " + myProgID + " is: " + myType1.GUID.ToString())) END CODE However, if you are using VB 6.0 then you may use the following code snippet: BEGIN CODE In a VB6.0 project I had the following codes to get CLSID string from a ProgID: ' define some API functions and a structure data type for GUID Function CLSIDFromProgID(ByRef szProgID As String) As String ' First, an API Win32CLSIDFromProgID Call Win32CLSIDFromProgID(StrPtr(szProgID), udtCLSID) ' then, convert CLSID structure type to a long pointer to CLSID ' finally use API CopyMemory to get CLSID string End Function Hope this helps :). END CODE

      Regards, John Adams ComponentOne LLC

      G 1 Reply Last reply
      0
      • J John_Adams

        Hi, You can get the CLSID of your program using VB.Net in the following manner: BEGIN CODE ' Use Server 'localhost'. It can be a remote host! Dim theServer As String = "localhost" ' Use programID 'HKEY_CLASSES_ROOT\DirectoryControl.DirectoryList.1'. Dim myProgID As String = "DirectoryControl.DirectoryList.1" ' Make a call to the method to get the Type information of ' the given ProgID. Dim myType1 As Type = Type.GetTypeFromProgID(myProgID, theServer, True) Console.WriteLine(("GUID for ProgramID " + myProgID + " is: " + myType1.GUID.ToString())) END CODE However, if you are using VB 6.0 then you may use the following code snippet: BEGIN CODE In a VB6.0 project I had the following codes to get CLSID string from a ProgID: ' define some API functions and a structure data type for GUID Function CLSIDFromProgID(ByRef szProgID As String) As String ' First, an API Win32CLSIDFromProgID Call Win32CLSIDFromProgID(StrPtr(szProgID), udtCLSID) ' then, convert CLSID structure type to a long pointer to CLSID ' finally use API CopyMemory to get CLSID string End Function Hope this helps :). END CODE

        Regards, John Adams ComponentOne LLC

        G Offline
        G Offline
        Gagan 20
        wrote on last edited by
        #3

        Thanks for your help John Adams...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups