Application Synchronization
From: Brian (SPAM)
Date: 03/01/04
- Next message: JonWayn: "Re: InternetConnect"
- Previous message: Andy DF: "Re: Detect internet connetcion thru LAN"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 1 Mar 2004 13:53:05 -0500
Insights please...
I have an application that runs on an NT 4.0 terminal server. Any number of
instances of this app may be open at any given time by different users (in
different sessions). Because of this I have to establish a line of
communication between these instance so that each client is aware of changes
being done by others.
My first thought was to create windows messages for my important events, and
use broadcast messages to alert all of the instances. The problem with this
approach is that PostMessage and SendMessag cannot cross the session
boundary.
My next thought was to use named pipes. This seemed like overkill because I
do not need to send any information, I just need notification capabilities.
It also would require polling to check the pipe for messages.
My current thought is to create global events and then poll for the signaled
state. I am using waitforsingleobject inside of a doevents loop to
accomplish this. It does not seem to hog the CPU, though I have read many
posts warning that this is a bad approach. Is there a better way to do
this?
TIA
-Brian
- Next message: JonWayn: "Re: InternetConnect"
- Previous message: Andy DF: "Re: Detect internet connetcion thru LAN"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|