can 32bit and 64bit .net COM have same GUID

2023-07-12T19:27:51.6066667+00:00

Have a C# created COM object originally implemented for 32bit. Now have a need for it in 64bit for additional applications. Can the 64bit have the same GUID as the 32bit version. They will reside on the same machine

Developer technologies | C#
{count} votes

Accepted answer
  1. Anonymous
    2023-07-13T09:10:21.52+00:00

    Hi @Whelan, Ken (Baker Hughes Contractor) , Welcome to Microsoft Q&A.

    As David Lowndes mentioned, 32-bit and 64-bit COM components are located differently in the registry because they are registered in different Windows registry paths. This means that when registering a COM component, it needs to be correctly registered in the 32-bit or 64-bit registry path so that it can be used correctly in the corresponding environment. From this consideration, you can use the same GUID.

    In .NET COM (Component Object Model), GUID (Globally Unique Identifier) is an identifier used to uniquely identify a component. From this definition, I wouldn't recommend you to use the same guid.

    Did you know that 64-bit programs can also use 32-bit com? Check out DLL Surrogates.

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.