private static extern bool SafeHandleByRef_InOnly([In] ref AbstractDerivedSafeHandle handle, IntPtr expectedValue, IntPtr newValue);
public static bool SafeHandleInByRef(AbstractDerivedSafeHandle handle, IntPtr expectedValue) => SafeHandleByRef_InOnly(ref handle, expectedValue, expectedValue);
public static extern bool SafeHandleByRef(ref AbstractDerivedSafeHandle handle, IntPtr expectedValue, IntPtr newValue);