Hartmut Birr wrote:
You are right. Npfs returns the wrong status.
- Hartmut
_______________________________________________
R
Not necessarly, sometimes the client must interpret ERROR_PIPE_CONNECTED
as a success:
"If the specified pipe handle is in nonblocking mode, /ConnectNamedPipe
/always returns immediately. In nonblocking mode, /ConnectNamedPipe
/returns a nonzero value the first time it is called for a pipe instance
that is disconnected from a previous client. This indicates that the
pipe is now available to be connected to a new client process. In all
other situations when the pipe handle is in nonblocking mode,
/ConnectNamedPipe /returns zero. In these situations, /GetLastError
/returns ERROR_PIPE_LISTENING if no client is connected,
ERROR_PIPE_CONNECTED if a client is connected, and ERROR_NO_DATA if a
previous client has closed its pipe handle but the server has not
disconnected. *Note that a good connection between client and server
exists only after the ERROR_PIPE_CONNECTED error is received.*"
Best regards,
Alex Ionescu