Monday, August 23, 2010

Registry free COM using Side By Side Assemblies

Registry Free COM
Did you know that you don't have to register a COM object in order to use it?
Well, I didn't. Until recently, when I was searching for something in the internet and bumped into this article in the MSDN library.
What this means, to me at least, is that there's no need to register RZDCX and thus it can be used in many applications that require no installation, because, as you know, to register a COM object in the registry you need administrative rights but to run an application from a CD you don't have to.

So, this post is all about using RZDCX.DLL with no installation.
For this purpose, we'll use one of the sample applications, for example the C# example EchoSCUExample.
All the examples with their source code can be downloaded from the DICOM download page.




In order to eliminate the use of registry, we'll create a manifest file for EchoSCUExample.exe and name it EchoSCUExample.exe.manifest

Next, we need to create a manifest file for RZDCX.DLL as well, name it rzdcx.X.manifest and save it in the same folder. Note that this is the manifest of the comming version 2.0.0.0 of RZDCX so some of the interfaces in it are not yet available in version 1.0.1.7 that is currently available on the web site.

Copy all four files (rzdcx.dll, rzdcx.X.manifest, EchoSCUExample.exe and EchoSCUExample.exe.manifest)  to a single directory, unregister RZDCX.DLL (using regsvr32.exe -u rzdcx.dll) so that you are absolutely sure that no registry is involved and double click EchoSCUExample.exe.

Enjoy!

No comments:

Post a Comment