Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Change CreatePipe to use SafeFileHandle instead of SafeObjectHandle #429

Closed
ZoeyR opened this issue Mar 29, 2019 · 3 comments
Closed

Change CreatePipe to use SafeFileHandle instead of SafeObjectHandle #429

ZoeyR opened this issue Mar 29, 2019 · 3 comments
Milestone

Comments

@ZoeyR
Copy link

ZoeyR commented Mar 29, 2019

The CreatePipe method should output SafeFileHandles intead of SafeObjectHandles. By outputting SafeFileHandle directly it makes it easier to wrap these up in FileReader and FileWriter classes.

@AArnott AArnott added this to the 2.0 milestone Jul 2, 2020
@qmfrederik
Copy link
Contributor

There's a lot of Kernel32 which interop with files. Basically every first argument to a Kernel32 method which is named hFile or hDevice should be a SafeFileHandle instead.

It makes a lot of sense to change them all. @AArnott thoughts?

@blakegordon
Copy link

I had similar thoughts to the OP's, only CreateFile was the API I cared about. Help me understand the thinking in returning SafeObjectHandle? None of the .NET FileStream constructors know what to do with that, but maybe you had a different .NET API in mind to interact with SafeObjectHandles?

@AArnott
Copy link
Collaborator

AArnott commented Jan 29, 2021

Probably not enough care in choosing it. I could see us unifying this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants