none
COM Interop Requirements RRS feed

  • Question

  • Two topics.  First, is it necessary to strong name .net assemblies to have them accessible via COM interop by native code?  The documentation is somewhat ambiguous.  Second, in this link:

     

    http://msdn2.microsoft.com/en-us/library/f8h7012w(VS.71).aspx

     

    ...It says that "registration free com interop" is supported on XP SP2 and the Win 2k3 family.  I presume 2k3 family does not include Vista?  If not, why is this not offered on Vista?  Will it be in the future?

    Tuesday, April 22, 2008 7:12 PM

Answers

  • Only if you put them in the GAC.  Which, if you don't use manifests, is highly recommended to solve COM's versioning problems.

    You are quoting a .NET 1.1 era MSDN article.  Vista was just a badly delayed project back then.  It too supports manifests.  Pretty much required to battle the UAC blues.
    Tuesday, April 22, 2008 9:05 PM
    Moderator

All replies

  • Only if you put them in the GAC.  Which, if you don't use manifests, is highly recommended to solve COM's versioning problems.

    You are quoting a .NET 1.1 era MSDN article.  Vista was just a badly delayed project back then.  It too supports manifests.  Pretty much required to battle the UAC blues.
    Tuesday, April 22, 2008 9:05 PM
    Moderator
  • What do you mean "if you don't use manifests?"  Or, what does it mean to "use a manifest?"  I ask because .net "uses manifests" whether I like it or not.

     

    Friday, April 25, 2008 10:30 PM
  • Your native code can use a manifest to support registration-free COM.  In that case, since you can specify the path to the component and its assembly version you would be in less trouble for versioning issues.
    Sunday, April 27, 2008 9:16 AM
  • I assume you are talking about native code making a call into managed code.  That said...for the "version" embedded in a native code manifest to mean anything, wouldn't that require the target assembly be strong named?  That is, the "version" info is usually ignored for simply-named assemblies.

     

    But perhaps the answer is "yes, it is ignored for simply named assemblies"...and that it doesn't *necessarily* matter.  In other words, perhaps registration-free COM is possible, by leveraging the manifest embedded into native code, as long as the assembly to be invoked is colocated in the directory structure where the native code is.  Yes?

    Sunday, April 27, 2008 11:57 PM
  • The side-by-side manifest you need to enable COM redirection is a different kind of beast from the manifest in a managed assembly.  The SxS one looks a lot like a .config file.  You can deploy one by writing a yourapp.exe.manifest file or embed it as a resource with the mt.exe tool.  You'd need the <file> tag.  The MSDN docs for mt.exe are very poor, use mt.exe /? for help.  Avoid using a file based manifest; they're cached, giving you all sorts of problems.
    Monday, April 28, 2008 7:12 AM
    Moderator