locked
GUID's RRS feed

  • Question

  • Hello

    I'm doing some maintence on an application that uses the [ComVisible(true)] attribute then has a GUID ID attribute

    [Guid("xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")]

    Is the GUID a string that a person can just make up?  What if I wanted to a create a new application, were would I get a GUID at. 

    Thursday, February 23, 2012 7:32 PM

Answers

  • The GUID is used for COM registration when you make a type ComVisible.

    It can be anything, but once you pick a Guid, you shouldn't change it, as its used by the COM registration to find the proper class/type within your project.

    VS provides a tool (Tools->Create Guid) to create a GUID for you if you're making new types.


    Reed Copsey, Jr. - http://reedcopsey.com
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".

    • Proposed as answer by servy42 Thursday, February 23, 2012 7:45 PM
    • Marked as answer by Bob Shen Monday, March 5, 2012 2:53 AM
    Thursday, February 23, 2012 7:41 PM