HWND_BROADCAST

  • Thread starter Thread starter Peter Larsen []
  • Start date Start date
P

Peter Larsen []

Hi,

I'm using HWND_BROADCAST ( ::PostMessage(HWND_BROADCAST, dwMyMessageHandle,
0, 0); ) to broadcast some messages within the same computer running XP.
I have noticed that i sometimes receive the broadcast multiple times. I send
the message once and receive it up to 20 times.

Is this normal behavior or is there a way to prevent the message from being
received more than once ??

Thank you in advance,
BR
Peter
 
Peter Larsen said:
I'm using HWND_BROADCAST ( ::PostMessage(HWND_BROADCAST,
dwMyMessageHandle, 0, 0); ) to broadcast some messages within the same
computer running XP.

Note: The second parameter is the message (unsigned integer) rather than
a message handle.
I have noticed that i sometimes receive the broadcast multiple times.
I send the message once and receive it up to 20 times.

Most likely, the message (not a handle) was not unique. See also
http://windowssdk.msdn.microsoft.com/en-us/library/ms644944.aspx

| Applications that need to communicate using HWND_BROADCAST should use
| the RegisterWindowMessage function to obtain a unique message for
| inter-application communication.

Further questions should be addressed to a programming group, thanks.
 
Hi,

I'm using HWND_BROADCAST ( ::PostMessage(HWND_BROADCAST, dwMyMessageHandle,
0, 0); ) to broadcast some messages within the same computer running XP.
I have noticed that i sometimes receive the broadcast multiple times. I send
the message once and receive it up to 20 times.

Is this normal behavior or is there a way to prevent the message from being
received more than once ??

Thank you in advance,
BR
Peter

Probably a bug in your sending routine

Jon
 
I have looked through the groups, and couldn't find a group that match my
question.
Witch group should i post my question in ??

Thanks
BR
Peter
 
Peter said:
I have looked through the groups, and couldn't find a group that match my
question.
Witch group should i post my question in ??


microsoft.public.win32.programmer
 
Peter Larsen said:
I have looked through the groups, and couldn't find a group that match
my question.
Witch group should i post my question in ??

Points of interest:
 
Back
Top