borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Creating wizard that able to make .vbp files)Next Topic (activeX) New Topic New Poll Post Reply
AndreaVB Forum : ActiveX : Update DLLs
Poster Message
~Bean~
Level: VB Guru


Registered: 07-04-2003
Posts: 488

icon Update DLLs

I'm working on 2 DLL's for a new ASP project I'm putting together and I am in a testing phase right now and I find that I am having to make a few changes/additions to the code of the DLLs...my problem is that each time I adjust my DLL, I have to unregister the old one, and then register the new one...THEN REBOOT... (I am running Windows 2000 Server)...if I don't reboot then the server doesnt seem to reference the new file (and I cannot delete the old one either, it says it's in use)......

____________________________
Eggheads unite! You have nothing to lose but your yolks.

23-02-2005 at 08:02 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: Update DLLs

Hi Bean,

Are you using them with com+? try logging off and logging back on. There's some user settings in there which I think are only picked up when you log on.


Steve

23-02-2005 at 01:20 PM
View Profile Send Email to User Show All Posts | Quote Reply
~Bean~
Level: VB Guru


Registered: 07-04-2003
Posts: 488
icon Re: Update DLLs

Thx Steve but loggin off didnt work...    I still had to reboot to release the old DLL

as for COM+...ADO a part of COM+ (right?) thats all I am using in the DLL

____________________________
Eggheads unite! You have nothing to lose but your yolks.

23-02-2005 at 07:17 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: Update DLLs

If it's used by the web server.... it is possible (since web-server is active even when logged off)

that you could:
shutdown the web server
unregister/delete the dll
restart the webserver

insetead of rebooting.

____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

23-02-2005 at 11:38 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
~Bean~
Level: VB Guru


Registered: 07-04-2003
Posts: 488
icon Re: Update DLLs

errr...prehaps I wasnt clear...the DLLs are on the web server...and are used by my ASP pages. I am in the process of writing the DLLs now. The problem is that it is a pain to change one of the DLL's. When I add a piece of code to a DLL, or fix an error, I must ...

-unregister the old DLL
-reboot the web server
-recompile and save the new DLL to the web server
-register the new DLL

then I can try using it in my ASP...this is making debugging my DLLs a nightmare...

Even if I unregister the DLL, Windows wont let me delete it until I reboot...it just doesnt let go! So I guess I was wondering if there was a windows trick to making it release its hold...


____________________________
Eggheads unite! You have nothing to lose but your yolks.

24-02-2005 at 03:45 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
~Bean~
Level: VB Guru


Registered: 07-04-2003
Posts: 488
icon Re: Update DLLs

So far, this is the only answer I have found for my problem...and neither one of these alternatives are really a great solution but I am posting here FYI

quote:

How to Replace a previous DLL with a new one?
If you have a DLL already registered but wish to replace it there are 2 options:

   1. Break compatibility of the new DLL with the old one. This means:
          * You need to set the Project Properties/Component to "No Compatibility".
          * You need to change the project name in VB IDE and then save the project with this new project name. Recompile the DLL and you need to use a new name DLL say abc2.dll if the old one was abc.dll. [The reason is because you are probably going to place this new DLL in the same folder as the old one. You cannot just replace the old one because it is in use -- until you unregister it and after the next server reboot.]
          * Next place the new DLL in the same folder at the the website and use register.asp to register it.
          * Change the project name in your calling asp pages at the website so that they will invoke the new DLL and not the old one. Now your new program is ready to run. Simply use your browser to open your asp pages and you will see the changes.
          * Remember to unregister the old DLL using unregister.asp.


   2. Maintain compatibility of the new DLL with the old one. This means :
          * You need to keep the default setting in the Project Properties/Component which is "Project Compatibility". You will probably see that the original DLL name appears in the textbox right below this selection.
          * You do not need to change the project name and do not need to change project name in your calling asp pages.
          * You just recompile your project with a new DLL name.
          * Next place the new DLL in the same folder of your old DLL at the the website. Use unregister.asp to unregister the old DLL. Then use register.asp to register this new DLL.
          * The new program code will NOT take immediate effect. The old DLL is still working UNTIL the server reboots. So you need to wait for this event to happen first. Then the new DLL will take effect.



____________________________
Eggheads unite! You have nothing to lose but your yolks.
25-02-2005 at 08:35 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : ActiveX : Update DLLs
Previous Topic (Creating wizard that able to make .vbp files)Next Topic (activeX) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder