Polling Message Queues

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Susan

    Polling Message Queues

    I've had to separate my application into 2 apps. I need to second app to poll
    the message queue for certain messages from the main app. Does someone have
    some code on how to do this? I have the first app sending the messages, but
    only have the second app able to respond once. The second app is started from
    the first app as an independent process.

    Thanks,
    Susan
  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Polling Message Queues

    Susan,

    What kind of messages are you talking about? Do you mean windows
    messages? If so, then you can just override the WndProc method on your form
    and you will be able to process those messages (assuming that the messages
    are sent to that window).

    If you mean MSMQ messages, then take a look at the System.Messagin g
    namespace, as you can use that to read and write to message queues.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "Susan" <Susan@discussi ons.microsoft.c om> wrote in message
    news:0EF1B7DF-9D55-4F99-B1CA-A4E2CD623732@mi crosoft.com...[color=blue]
    > I've had to separate my application into 2 apps. I need to second app to
    > poll
    > the message queue for certain messages from the main app. Does someone
    > have
    > some code on how to do this? I have the first app sending the messages,
    > but
    > only have the second app able to respond once. The second app is started
    > from
    > the first app as an independent process.
    >
    > Thanks,
    > Susan[/color]


    Comment

    Working...