blog.easyciel.net author="Patrick Rabian" about="c#, sharepoint, biztalk, team system resources" more="news, samples, tips for .NET world's developers !"

.NET assembly called from unmanaged application without COM registration

Saturday, 26 January 2008 10:43 by prabian

.NET Assembly are easy to deploy even with different versions on the same server.
Since Windows XP SP2 or Windows Server 2003, COM components could be used without registration (called Registration-Free COM)
If you are using a "COM visible" .NET assembly, it should be registered on the system through registry and only one version could be available for the same COM component…the solution is to use a manifest to create a dependency between the calling application and the assembly.

Read first this article : http://www.devx.com/vb/Article/32888/1954
and see this interesting article with a sample : Registration-Free Activation of .NET-Based Components: A Walkthrough
In this sample, "client.exe" is an unmanaged application (compiled with VB6 or VC++) that calls a .NET assembly "SideBySide.dll" (compiled with C# or VB.NET).

The dependency manifest file looks like :

<?xml version="1.0" encoding="UTF-8" standalone="yes"

?>
          <
assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
          <
assemblyIdentity type = "win32" name = "client" version = "1.0.0.0" />
          <
dependency>
                    <
dependentAssembly>
                              <
assemblyIdentity type="win32" name="SideBySide" version="1.0.0.0" />
                    </
dependentAssembly>
          </
dependency>
</
assembly>

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   , ,
Categories:   COM | Win32 | Windows
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

November 20. 2008 22:26