I would like to write two apps, when I click a button on one of the apps it
would send a string <255 chrs to the other app to be stored in a variable.
Would sendmessage be the best way to do this? if so, could someone post a small
piece of working code for sender and receiver apps ( I seem to only be able to
work by example - dunno why - just thick I guess) or recomend another way again
with send & receive app.
Mucho TIA!
Steve
tell us more about the app u r trying to develop. there might be other ways
to accomplish ur task...
regards
Keith
steve <rab...@yahoo.com> wrote in message
news:37e8a7cc...@news.f9.net.uk...
So my idea was....
oldprog.exe executes newprog.exe with the parameter, newprog.exe sends the
string via send message to myactual prog. Because I dont have access to the
original source of the old program, there is not much I can do about the way it
works.
And any ideas would be appeciated highly - again, source would be nice!
TIA
On Tue, 21 Sep 1999 12:22:57 +1200, "Keith Chew SL" <keit...@ihug.co.nz> wrote:
:
:can i ask the reason for developing the 2 apps? why not have one app all
:
use the GlobalLock the obtain the pointer and store your string in it.
then GlobalUnlock , it is important that you do not keep the handle Locked.
send a Usermessage with the global handle as the parmeter..
the receiving app will take this parameter and use globalLock to obtain the
pointer, remove/read the
data and then GlobalFree the handle to release it fom memory.
Look in your Win32.hlp for these memory functions.
as for trasnferring messages, there are many ways to do it, e.g
- file transfer - create/read file (easiest)
- shared memory (relatively easy)
- DDE (old technology)
- active X (new but need some work)
using file transfer approach, you can append the string to a file. this will
allow myactual.exr (app 3) is to read the file without having to worry about
timing issues. however, you will need to perform file locking, so that
multiple app 2 can append to the file as well as allowing app 3 to read it
simultaneously. i think this method will be quite elegant.
regards
Keith
steve <rab...@yahoo.com> wrote in message
news:37eb7c2b...@news.f9.net.uk...
>yup, ur method sounds fine. u might want to make the newprog.exe (app 2) an
>invisible one, so that it will not flash each time a message is sent.
>
>as for trasnferring messages, there are many ways to do it, e.g
>
>- file transfer - create/read file (easiest)
Especially if the file is a pipe
--
Peter S Ingham pi...@actrix.gen.nz
Lower Hutt, New Zealand
Steve