I want to create an outbound-only named pipe, and I want other code elsewhere to later be able to check if that handle is a pipe. This works for all cases of pipe handles (client, server; outbound, inbound), EXCEPT server-end handles to outbound-only pipes.
If I open a handle to the client end of an inbound-to-server-only pipe with access flags GENERIC_WRITE | FILE_READ_ATTRIBUTES, I can later verify the handle is a pipe by calling GetNamedPipeInfo(handle,NULL,NULL,NULL,NULL), which returns true. However, the server end lacks this privilege for outbound-only pipes — if I call CreateNamedPipe with PIPE_ACCESS_OUTBOUND, GetNamedPipeInfo returns false and GetLastError returns ERROR_ACCESS_DENIED.