Wrox Programmer Forums
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 12th, 2008, 04:40 AM
Authorized User
 
Join Date: Jun 2007
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default COM DLL

I have a COM DLL that is invoked from .NET. Already I have registered the COM DLL using regsrv32 in the command prompt.

Now after two months I have got a more recent version of the COM DLL. I want to replace the Old Dll and put this New DLL in its place.

My doubt is: What exact steps I have to take? I am new to COM and I want to be clear before proceeding further ( I do not want any conflicts to occur).

(What I want is NOT side by side execution. I want my code to use the new DLL instead of the old one)



 
Old August 12th, 2008, 03:39 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Generally, your best bet is to unregister the original COM, update the file and register the new one. I would advise you to rebuild the COM interop for the DLL. This is most likely easily accomplished by deleting the reference to the library and adding it back in. This will re-run the program that generates the RCW (runtime callable wrapper) interop assembly.

Technically, if the public interfaces on the classes haven't changed you might be able to get away with simply overwriting the DLL file with the update. However, this can be problematic.

Either way you do it, you can not have side-by-side execution of 2 COM libraries with the same name because of the way that COM works.

-Peter
compiledthoughts.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
convert unmanaged dll to managed dll nitesh kumar Visual C++ 2005 0 August 4th, 2008 04:53 AM
Install problems - VS 6.0 on XP SCRRUN.DLL PDM.DLL jeff4444 Visual C++ 0 December 6th, 2006 08:48 PM
How to convert .NET dll to COM dll used by VB 6.0 gvprashanth .NET Framework 1.x 0 December 4th, 2006 05:05 AM
The database dll crdb_oracle.dll could not be load Yeliz Crystal Reports 0 October 18th, 2006 08:12 AM
DLL & Excel - keep having to reset DLL reference! James Diamond Pro VB 6 2 May 25th, 2004 03:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.