Re: Inter-app communication
- From: beginthreadex <beginthreadex@xxxxxxxxx>
- Date: Wed, 14 Nov 2007 11:49:19 -0600
Approach #1 (pluggable): Have each application place some of it's logic in a DLL that will tell the application itself if it can run or not. Each DLL will match a method signature and you just know that each of your applications have this DLL. You dynamically load the DLL and call the method. You can get a rich amount of data back including string values for more information/details. You can also get an array of something that will tell you how much of something your can use.
Approach #2 (scriptable): Other, you can have each application called with a particular parameter. This will be detected and only a validation will be returned from the return/errorCode. You just check this value and it will tell you if it can be called. That makes debugging really easy. You can even return multiple codes meaning different statuses or errors.
Steph wrote:
I'm writing a menu app, which will launch lots of other apps, some which will be written by me, others not. I want to be able to ask those apps whether or not they are currently able to run. Their answer will depend on many things, but for example, they might say no if a particular piece of hardware is missing..
What I'd like to know, is what the best mechanism for this question and response is? I could run the app, send it a windows message and wait for a return message, but then I have the difficulty in deciding how long to wait for the response (it may not come), and identifying the sender, as I am asking several apps the same question.
There must be an accepted way of doing this, I'm just not sure what it is.
I'm using VS2005 (soon 2008) C++ with MFC and Windows Vista
Any help gratefully accepted.
Steph
- Prev by Date: Re: WaitForMultipleObjects returning ERROR_INVALID_HANDLE (RESOLVED)
- Next by Date: Re: heap
- Previous by thread: Re: Inter-app communication
- Next by thread: Re: Reaping a process without a parent process/service/daemon
- Index(es):
Relevant Pages
|