C language function:GetNamedPipeHandleState sample codes

Search sample code in the internet.It is the result.

TITLE : Pipe.cpp
BOOL Success = GetNamedPipeHandleState(.......

TITLE : GetNamedPipeHandleState function (Windows)
BOOL WINAPI GetNamedPipeHandleState(.......
TITLE : winapi - How to detect a client disconnect using a named pipe client/server? - Stack Overflow
I've tried using GetNamedPipeHandleState() hoping it return failure and a call to GetLastError() would return ERROR_PIPE_NOT_CONNECTED, but that was not the case. Because of the way this server is set up I had to do this in the CompletedReadRoutine function and create a "controlled" failure. What I did was, with a breakpoint on the CompletedReadRoutine in the server:.......
TITLE : winapi - How to detect a client disconnect using a named pipe client/server? - Stack Overflow
The call to GetNamedPipeHandleState() returns successfully so I never got to do the GetLastError() call. When it gets to the WriteFileEx call it fails and a call to GetLastError at that point returns an ERROR_NO_DATA........
TITLE : 【PB】PowerBuilder API Site
FUNCTION ulong GetNamedPipeHandleState(ulong hNamedPipe,ref ulong lpState,ref ulong lpCurInstances,ref ulong lpMaxCollectionCount,ref ulong lpCollectDataTimeout,ref string lpUserName,ulong nMaxUserNameSize) LIBRARY "kernel32.dll" ALIAS FOR "GetNamedPipeHandleStateA".......
TITLE : Information and references for other API calls for Windows name pipe and C name pipe client program examples
BOOL GetNamedPipeHandleState(.......
search Google