ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > FARR Plugins and Aliases

For Coders: How to signal FARR to release and reload plugins programatically

(1/2) > >>

mouser:
If you want to build an installer for your plugin, the following info may be useful.
Though i think it would be even more useful if we wrote a generic installer for plugins and added a way for FARR itself to guide user through installing a plugin in a less error-prone manner than is currently required.

But anyway:


* If you want to signal FARR to *UNLOAD* all plugins, in preparation for updating a dll that might currently be in use, send the FARR process the windows message WMUSER with WPARAM=98 and LPARAM=97.  You would normally do that BEFORE you try to install or replace any dll.
* Then to signal FARR that the installation is completed and that FARR should *reload* its plugins, send the windows message WMUSER with WPARAM=98 and LPARAM=98.  You would normally do this after your installer has finished.
This is the exactly the procedure that DcUpdater uses when updating plugins.

phitsc:
Thanks mouser.

A couple of questions (because I can't get it to work ;)):

- WMUSER is 0x400 or 1024, right?
- What do you mean with: "send the FARR process"? Do you send the message to FARR's main window? How do you get that from DCUpdater?

Thanks.

mouser:
Do you send the message to FARR's main window? How do you get that from DCUpdater?
--- End quote ---

yes.
i use some c++ classes that look up a Process ID given an application exe name, and then find the window corresponding to that Process ID.
there may be an inno setup addon that will do this, but it's not in default inno setup.

however, i can provide a smallish (50k or so) dll that you can call from inno setup that will find the process by name and send it the signal, and show how that can be used from inno setup if you like.  i actually use this in all my installers to send a signal and actually CLOSE a running application during installation/uninstallation.

phitsc:
however, i can provide a smallish (50k or so) dll that you can call from inno setup that will find the process by name and send it the signal, and show how that can be used from inno setup if you like.  i actually use this in all my installers to send a signal and actually CLOSE a running application during installation/uninstallation.
-mouser (November 30, 2010, 05:40 PM)
--- End quote ---

If you could provide that DLL, that would be perfect! :Thmbsup:

By the way, I was able to install plugins by completely closing FARR (by calling FARR.exe -exit) and then restarting it. But that just doesn't seem  as elegant (seeing that you don't do it with DCUpdater).

mouser:
By the way, I was able to install plugins by completely closing FARR (by calling FARR.exe -exit) and then restarting it. But that just doesn't seem  as elegant (seeing that you don't do it with DCUpdater).
--- End quote ---


ah.. you made me realize.. i can just add commandline args to let you tell farr to unload and reload plugins.. in fact knowing me i probably already did and just forgot..

Navigation

[0] Message Index

[#] Next page

Go to full version