Skip to content

SafeHandle with other handles than IntPtr #44456

Answered by CoffeeFlux
msedi asked this question in Q&A
Discussion options

You must be logged in to vote

I think the marshaling code for SafeHandle assumes pointer-sized handles, unfortunately. Given that, I'm not actually sure what our recommendation is for a fixed-sized handle - it might be possible to replicate SafeHandle functionality from only managed code but that seems fairly high-effort. @AaronRobinsonMSFT do you know?

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@msedi
Comment options

Comment options

You must be logged in to vote
4 replies
@AaronRobinsonMSFT
Comment options

@msedi
Comment options

@AaronRobinsonMSFT
Comment options

@msedi
Comment options

Answer selected by msedi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants