Replies: 1 comment 1 reply
-
This is a tough question. On Windows, There's no great way to handle this. But suffice it to say, this isn't a bug, but it's possible to be inconvenient at times when you want to create a pipe and hand it off to another .NET API that needs a SafeHandle by a different type. SafePipeHandle pipeHandle = new(fileHandle.DangerousGetHandle());
fileHandle.Dispose(); The call to |
Beta Was this translation helpful? Give feedback.
-
For example: PInvoke.CreateNamedPipe can return SafePipeHandle instead SafeFileHandle. This is in the same namespace and library
Beta Was this translation helpful? Give feedback.
All reactions