public unsafe static void QueryContextAttributes( ref SafeCtxtHandle context, UlAttribute attribute, void *buffer) { int error = Secur32Dll.QueryContextAttributesA( ref context._Handle, (uint)attribute, buffer); if (error != 0) { throw new SspiException(error, @"QueryContextAttributesA"); } }
public unsafe static SecurityStatus SafeQueryContextAttributes( ref SafeCtxtHandle context, UlAttribute attribute, void *buffer) { try { int error = Secur32Dll.QueryContextAttributesA( ref context._Handle, (uint)attribute, buffer); return(Convert(error)); } catch { return(SecurityStatus.SecEUnknowError); } }