[SOLVED] Are WM_MESSAGEs sent witch WM_BroadcastMessage() serialized ?

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Are WM_MESSAGEs sent witch WM_BroadcastMessage() serialized ?

    As title says, are WM_MESSAGEs sent with WM_BroadcastMessage() serialized and queued somewhere until consumed or the WM_MESSAGE
    structure passed to WM_BroadcastMessage() must be valid till the message is consumed?
    For example, is the following code legit:

    Source Code

    1. void SendSignal(const int id, const int v, void *p)
    2. {
    3. WM_MESSAGE msg;
    4. msg.MsgId = id;
    5. msg.Data.p = p;
    6. msg.Data.v = v;
    7. WM_BroadcastMessage(&msg);
    8. }

    or should WM_MESSAGE be declared static ?
    This would imply I can send only one message at a time and wait until the message is consumed
    before sending another one (or else I must manage myself a message queue).
    This behavior is not documented anywhere as far as i can tell.

    Best regards, Gabriele.

    The post was edited 1 time, last by Gabri74 ().