public unsafe static LsaHandle LsaOpenLocalPolicy(PolicyAccessRights access) { LSA_OBJECT_ATTRIBUTES attributes = new LSA_OBJECT_ATTRIBUTES(); Imports.LsaOpenPolicy(null, &attributes, access, out LsaHandle handle).ThrowIfFailed(); return(handle); }
public static LsaHandle LsaOpenLocalPolicy(PolicyAccessRights access) { LSA_OBJECT_ATTRIBUTES attributes = new LSA_OBJECT_ATTRIBUTES(); LsaHandle handle; NTSTATUS status; unsafe { status = Imports.LsaOpenPolicy(null, &attributes, access, out handle); } if (status != NTSTATUS.STATUS_SUCCESS) { throw ErrorMethods.GetIoExceptionForNTStatus(status); } return(handle); }
public unsafe static extern NTStatus LsaOpenPolicy( UNICODE_STRING *SystemName, LSA_OBJECT_ATTRIBUTES *ObjectAttributes, PolicyAccessRights DesiredAccess, out LsaHandle PolicyHandle);