Spawn Application and then Send WMCopyMessage to the LAST spawned application
Posted on 2006-06-19
First let me give some background.
I have a
1. main application and a
2. seperate application (download manager for main application).
The application is a web downloader.
In the main application the user adds all the URL's he wants to download.
When he clicks the download button, the main application ShellExecute the "Download Manager" and
sent the URLS to the Download Manager via SendMessage(), WM_COPYDATA.
To get a handle to the spawned Download Manager I use FindWindowEX().
But the problem that I get is.
When a Download Manager is already running and I spawn another one I need the FindWindowEX() function to return the handle of the VERY LAST Download Manager I spawned.
Is there a way to fix this?
I would also like to know how safe is this process?