Access a COM dll without registering it?
-
I have a C# application which uses a COM dll that was registered when some third party software was installed. So when I added a reference to it in visual studio, it naturally created an Interop.dll, and that's what I have a reference to. My problem is that I wanted to send the program to a friend and he doesn't have that 3rd party software on his machine. What's the best way to deal with this? I tried adding a reference to the dll file itself instead of using the COM tab, and that seemed to work, but it looks like it involves the path to that file on MY machine, which probably won't work on his side either. Copy Local is set to TRUE, but that seems to just copy in the Interop dll. I've had experience with a setup installer packaging the needed files and registering them for you, but i'd like to avoid an installer. we'll be doing rapid dev-test cycles and it's nice to be able to just 'drop-install' the files on his machine. Anyone able to guide me on this?
-
I have a C# application which uses a COM dll that was registered when some third party software was installed. So when I added a reference to it in visual studio, it naturally created an Interop.dll, and that's what I have a reference to. My problem is that I wanted to send the program to a friend and he doesn't have that 3rd party software on his machine. What's the best way to deal with this? I tried adding a reference to the dll file itself instead of using the COM tab, and that seemed to work, but it looks like it involves the path to that file on MY machine, which probably won't work on his side either. Copy Local is set to TRUE, but that seems to just copy in the Interop dll. I've had experience with a setup installer packaging the needed files and registering them for you, but i'd like to avoid an installer. we'll be doing rapid dev-test cycles and it's nice to be able to just 'drop-install' the files on his machine. Anyone able to guide me on this?
-
If you send him the com dll just get him to open a cmd prompt and run
regsvr32 <path_to_com_dll>
.Yeah, was hoping to avoid that, but it's my fallback plan. Is that regsrvr32 file part of the visual studio SDK, or the windows SDK? And is it freely available? because i imagine i'll have to get him that as well.
-
Yeah, was hoping to avoid that, but it's my fallback plan. Is that regsrvr32 file part of the visual studio SDK, or the windows SDK? And is it freely available? because i imagine i'll have to get him that as well.
-
If you send him the com dll just get him to open a cmd prompt and run
regsvr32 <path_to_com_dll>
.Im not confirm that the regsvr32 is perfect for a dll registration which is developed by using C#.net..RegAsm command can be consider...:)
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you. Thanks Md. Marufuzzaman
-
Im not confirm that the regsvr32 is perfect for a dll registration which is developed by using C#.net..RegAsm command can be consider...:)
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you. Thanks Md. Marufuzzaman
-
I have a C# application which uses a COM dll that was registered when some third party software was installed. So when I added a reference to it in visual studio, it naturally created an Interop.dll, and that's what I have a reference to. My problem is that I wanted to send the program to a friend and he doesn't have that 3rd party software on his machine. What's the best way to deal with this? I tried adding a reference to the dll file itself instead of using the COM tab, and that seemed to work, but it looks like it involves the path to that file on MY machine, which probably won't work on his side either. Copy Local is set to TRUE, but that seems to just copy in the Interop dll. I've had experience with a setup installer packaging the needed files and registering them for you, but i'd like to avoid an installer. we'll be doing rapid dev-test cycles and it's nice to be able to just 'drop-install' the files on his machine. Anyone able to guide me on this?
Apart from all the good advice from others, there is one point that you might want to consider. That is the legality of copying the dll to your friends machine. If it came with software that you have installed, then there might be copyright issues. I'm not saying don't do it, I'm just saying is all. :)
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”