Re: How can a namedpipe client get the event of server's close?

Tech-Archive recommends: Speed Up your PC by fixing your registry



Better is to notify clients about server termination using own protocol.

--
V
This posting is provided "AS IS" with no warranties, and confers no
rights.
"Kerem Gümrükcü" <kareem114@xxxxxxxxxxx> wrote in message
news:OfH4T0AXIHA.1164@xxxxxxxxxxxxxxxxxxxxxxx
Hi Niu,

How can I detect the close event

I dont know if you want to programm in a distributed
fashion for teh future, but before your server gies doen
it should inform the client (with e.g. a message Like
PM_PIPE_CLOSING or something like that) that it
is about to close the connection. Or you can work
with functions like:

WaitNamedPipe
GetNamedPipeHandleState
ConnectNamedPipe
GetNamedPipeServerProcessId

to check whether the pipe still responds/exists or
is inavailable,...

You can nearly use any file or pipe function
to check whether the pipi is avaiable or not,
if it still exists, pending or watever. The GetLastError
Function will give you detailed information about
the operations result you made!

Regards

Kerem

--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Microsoft Live Space: http://kerem-g.spaces.live.com/
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."



.