You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the .NET interop layer may not permit null for SafeHandle parameters, we can certainly support it by making the extern method private and exposing a wrapper to it that checks for null SafeHandle args and does the right thing.
When the project langversion is >= 8, could you also put #nullable enable or at least #nullable annotations in the file or around the parameter declaration and use SafeHandle? as the parameter type so that IntelliSense shows me that nulls are anticipated?
This also:
* adds support for SafeHandles that are 32-bits long even in 64-bit processes (e.g. `MSIHANDLE`).
* removes `SafeHandle` from all `extern` methods. They only appear on helper methods now.
* removes the `NullSafeHandle` static class.
Closes#129
While the .NET interop layer may not permit
null
forSafeHandle
parameters, we can certainly support it by making theextern
methodprivate
and exposing a wrapper to it that checks fornull
SafeHandle args and does the right thing.Example:
The text was updated successfully, but these errors were encountered: