internal static Interop.SECURITY_STATUS GetInteropFromSecurityStatusPal(SecurityStatusPal status) { Interop.SECURITY_STATUS interopStatus; if (!s_statusDictionary.TryGetBackward(status.ErrorCode, out interopStatus)) { Debug.Fail("Unknown SecurityStatus value: " + status); throw new InternalException(); } return interopStatus; } }
public static Exception GetException(SecurityStatusPal status) { int win32Code = (int)SecurityStatusAdapterPal.GetInteropFromSecurityStatusPal(status); return(new Win32Exception(win32Code)); }