Board index » cppbuilder » Broadcasting String to All Applications

Broadcasting String to All Applications


2004-08-25 10:23:01 PM
cppbuilder44
Hello, I am trying to figure out how to broadcast a string out to all
applications
running on windows 2000! If an one has any ideas that would be great
 
 

Re:Broadcasting String to All Applications

What do you mean by "string"?
If you mean an array of characters, then you cannot "broadcast a
string".
What you can do is broadcast a message (perhaps with
BroadcastSystemMessage or by doing a SendMessageCallback with a window
handle of HWND_BROADCAST) and, upon receiving a reply from a window,
post a WM_COPYDATA message containing the data in the array. You must
use the copy data step because the address your program has for the
string is a virtual address, unique to your program and invalid if
used by other programs.
. Ed
Quote
JP wrote in message
news:412ca0ef$ XXXX@XXXXX.COM ...

Hello, I am trying to figure out how to broadcast a string out to
all
applications running on windows 2000! If an one has any ideas
that would be great
 

Re:Broadcasting String to All Applications

"JP" < XXXX@XXXXX.COM >wrote:
Quote
Hello, I am trying to figure out how to broadcast a string out to all
applications
running on windows 2000!
So you know, some programs will hang and/or crash because of
their design. You might even crash the system.
If another application is using custom messages and they didn't
register (and you as well) a unique message with windows, your
broadcast could cause another program to think that it sent it's
self a message which would cause it act on a bogus message.
~ JD
 

{smallsort}