What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Unloading a dll

Unloading a dll
Author: Message:
cooldude_i06
Full Member
***

Avatar
I'm so cool I worry myself.

Posts: 272
Reputation: 9
– / Male / –
Joined: Sep 2003
O.P. RE: Unloading a dll
quote:
Originally posted by Matty
Well I just realized the way of doing it (I actually forgot I did this with coding Plugins I was coding in VB so I could overwrite them.)

@echo off
reloadplugins.exe
regsvr32 /u /s "C:\program files\messengerplus! 3\plugins\screenshotsender.dll"
reloadplugins.exe
del /q "C:\program files\messengerplus! 3\plugins\screenshotsender.dll"
Echo Compile the dll now.
pause
regsvr32 /s "C:\program files\messengerplus! 3\plugins\screenshotsender.dll"
reloadplugins.exe

So basically I reloaded and unregistered the dll so that it could be deleted. Something like this would need to be done so that the DLL could be deleted.

I discovered something using your method...

First I stopped the script, unregistered the dll, and deleted the dll - it worked fine.
Next time I stopped the script, unregistered the dll, and tried removing the dll from Plus Preferences - it did not work.
Then I stopped the script, left the dll registered, and deleted it - it worked.
Then I stopped the script, left the dll registered and tried deleting it from Plus Preferences - it did not work.

Finally, I stopped the script, close the WLM main window, then tried removing the script from Plus Preferences - it worked.

Thus I discovered that the dll is only locked until the WLM window is open. You can even leave WLM running, just close the main window, and the dll becomes unlocked. Unfortunately this means that unregistering a dll won't help unload a dll.

EDIT:

Here's the method I'm going to use.

Script contains the dll, but does not register it in ScriptInfo.xml.

When script is run it copies the dll to a different directory. Before doing this it checks if the dll already exists in new directory or not. It also registers the dll after copying it.

Script now uses this dll copied to a different directory. Now that this dll is in a different directory, when the script is deleted the dll in its directory won't be the one that is locked, and won't deny access.

This is the only method that I can think of to solve this problem. Hopefully as more people use dll's they'll come up with a better solution.
[Image: clb2.jpg]
07-03-2006 08:38 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Unloading a dll - by cooldude_i06 on 07-02-2006 at 11:55 PM
RE: Unloading a dll - by Mike on 07-03-2006 at 12:03 AM
RE: Unloading a dll - by deAd on 07-03-2006 at 12:20 AM
RE: Unloading a dll - by aNILEator on 07-03-2006 at 12:36 AM
RE: Unloading a dll - by deAd on 07-03-2006 at 12:50 AM
RE: Unloading a dll - by cooldude_i06 on 07-03-2006 at 01:35 AM
RE: Unloading a dll - by deAd on 07-03-2006 at 01:39 AM
RE: Unloading a dll - by matty on 07-03-2006 at 02:39 AM
RE: Unloading a dll - by cooldude_i06 on 07-03-2006 at 08:38 AM
RE: Unloading a dll - by felipEx on 07-03-2006 at 09:53 AM
RE: Unloading a dll - by cooldude_i06 on 07-03-2006 at 07:36 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On