Shoutbox

Automatic uninstall of a plugin - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: Automatic uninstall of a plugin (/showthread.php?tid=47749)

Automatic uninstall of a plugin by ketchup_blade on 07-18-2005 at 04:55 PM

Hello,

I have created an uninstaller that automatically delete all files of my plugin.  I am doing a call to Messenger Plus using a message with "MessengerPlus_PluginChange" just before uninstalling the plugin.  However, what it seems is that doing this call doesn't unload the plugin, it just refreshes the list of plugins.

My problem: when MSN Messenger is open, a reference to the plugin is still in memory, making it impossible to delete the plugin DLL.  Is there an other Messenger Plus call I can do to tell it to unload the plugin/all plugins?  If not, would sending a message to MSN Messenger to close itself possible?

Thanks.


RE: Automatic uninstall of a plugin by Dempsey on 07-18-2005 at 05:08 PM

"MessengerPlus_PluginChange" does unload the plugins, but it automatically reloads them after 5 seconds.

What language have you coded your plugin in?  If it's visual basic then I dont think it's possible to unload the plugin without exiting messenger.


RE: Automatic uninstall of a plugin by Mnjul on 07-18-2005 at 05:09 PM

What you describe only happens with VB/VB.Net/C#.Net-developed plug-ins (Active-X plugins)... if a plug-in is a pure DLL (I don't know how to call that, but I mean what you get when you compile the plugin in C++ with Patchou's example), you can delete the physical file within 5 seconds after MessengerPlus_PluginChange is sent :) Patchou has explained why it acts like this but I forgot where :(


RE: Automatic uninstall of a plugin by ketchup_blade on 07-18-2005 at 05:54 PM

Yes, indeed, my plugin is written with VB.Net.  Maybe if I "regasm /u" the plugin just before calling MessengerPlus_PluginChange?  I'm not sure if this is enough to remove the reference to the DLL from memory.