143 if (LocalBuffer !=
NULL)
185 ERR(
"SamLookupNamesInDomain(%wZ) failed (Status %08lx)\n", AliasName,
Status);
192 ERR(
"Object is not an Alias!\n");
204 ERR(
"SamOpenDomain failed (Status %08lx)\n",
Status);
210 if (RelativeIds !=
NULL)
244 for (
i = 0;
i < EntryCount;
i++)
247 buf[
i].lgrmi3_domainandname);
284 for (
i = 0;
i < EntryCount;
i++)
298 if (MemberBuffer !=
NULL)
300 for (
i = 0;
i < EntryCount;
i++)
302 if (MemberBuffer[
i].lgrmi0_sid !=
NULL)
320 if (NamesArray !=
NULL)
323 *MemberList = MemberBuffer;
355 if (parm_err !=
NULL)
359 if (servername !=
NULL)
388 ERR(
"SamConnect failed (Status %08lx)\n",
Status);
399 ERR(
"OpenBuiltinDomain failed (Status %08lx)\n",
Status);
411 ERR(
"OpenAliasByName: alias %wZ already exists!\n", &AliasName);
426 (servername !=
NULL) ? &ServerName :
NULL,
431 ERR(
"SamOpenDomain failed (Status %08lx)\n",
Status);
444 ERR(
"SamCreateAliasInDomain failed (Status %08lx)\n",
Status);
449 TRACE(
"Created alias \"%wZ\" (RID: %lu)\n", &AliasName, RelativeId);
461 ERR(
"SamSetInformationAlias failed (Status %08lx)\n",
Status);
472 if (AliasHandle !=
NULL)
480 if (DomainHandle !=
NULL)
483 if (ServerHandle !=
NULL)
540 if (servername !=
NULL)
558 ERR(
"BuildSidListFromDomainAndName failed (Status %08lx)\n",
Status);
576 ERR(
"SamConnect failed (Status %08lx)\n",
Status);
587 ERR(
"OpenBuiltinDomain failed (Status %08lx)\n",
Status);
599 ERR(
"OpenAliasByName(%wZ) failed (ApiStatus %lu)\n", &AliasName, ApiStatus);
603 if (AliasHandle ==
NULL)
605 if (DomainHandle !=
NULL)
610 (servername !=
NULL) ? &ServerName :
NULL,
615 ERR(
"OpenAccountDomain failed (Status %08lx)\n",
Status);
627 ERR(
"OpenAliasByName(%wZ) failed (ApiStatus %lu)\n", &AliasName, ApiStatus);
635 for (
i = 0;
i < totalentries;
i++)
638 MemberList[
i].lgrmi0_sid);
641 ERR(
"SamAddMemberToAlias failed (Status %lu)\n",
Status);
650 for (
i = 0;
i < totalentries;
i++)
652 if (MemberList[
i].lgrmi0_sid !=
NULL)
659 if (AliasHandle !=
NULL)
662 if (DomainHandle !=
NULL)
665 if (ServerHandle !=
NULL)
691 if (servername !=
NULL)
703 ERR(
"SamConnect failed (Status %08lx)\n",
Status);
714 ERR(
"OpenBuiltinDomain failed (Status %08lx)\n",
Status);
726 TRACE(
"OpenAliasByName(%wZ) failed (ApiStatus %lu)\n", &GroupName, ApiStatus);
730 if (AliasHandle ==
NULL)
732 if (DomainHandle !=
NULL)
740 (servername !=
NULL) ? &ServerName :
NULL,
745 ERR(
"OpenAccountDomain failed (Status %08lx)\n",
Status);
757 ERR(
"OpenAliasByName(%wZ) failed (ApiStatus %lu)\n", &GroupName, ApiStatus);
768 ERR(
"SamDeleteAlias failed (Status %08lx)\n",
Status);
774 if (AliasHandle !=
NULL)
777 if (DomainHandle !=
NULL)
780 if (ServerHandle !=
NULL)
837 if (servername !=
NULL)
855 ERR(
"BuildSidListFromDomainAndName failed (Status %08lx)\n",
Status);
873 ERR(
"SamConnect failed (Status %08lx)\n",
Status);
884 ERR(
"OpenBuiltinDomain failed (Status %08lx)\n",
Status);
896 ERR(
"OpenAliasByName(%wZ) failed (ApiStatus %lu)\n", &AliasName, ApiStatus);
900 if (AliasHandle ==
NULL)
902 if (DomainHandle !=
NULL)
907 (servername !=
NULL) ? &ServerName :
NULL,
912 ERR(
"OpenAccountDomain failed (Status %08lx)\n",
Status);
924 ERR(
"OpenAliasByName(%wZ) failed (ApiStatus %lu)\n", &AliasName, ApiStatus);
932 for (
i = 0;
i < totalentries;
i++)
935 MemberList[
i].lgrmi0_sid);
938 ERR(
"SamAddMemberToAlias failed (Status %lu)\n",
Status);
947 for (
i = 0;
i < totalentries;
i++)
949 if (MemberList[
i].lgrmi0_sid !=
NULL)
956 if (AliasHandle !=
NULL)
959 if (DomainHandle !=
NULL)
962 if (ServerHandle !=
NULL)
994 level,
bufptr, prefmaxlen, entriesread, totalentries, resumehandle);
1000 if (servername !=
NULL)
1003 if (resumehandle !=
NULL && *resumehandle != 0)
1013 EnumContext->EnumerationContext = 0;
1014 EnumContext->Buffer =
NULL;
1015 EnumContext->Returned = 0;
1016 EnumContext->Index = 0;
1019 &EnumContext->ServerHandle,
1024 ERR(
"SamConnect failed (Status %08lx)\n",
Status);
1030 (servername !=
NULL) ? &ServerName :
NULL,
1032 &EnumContext->AccountDomainHandle);
1035 ERR(
"OpenAccountDomain failed (Status %08lx)\n",
Status);
1042 &EnumContext->BuiltinDomainHandle);
1045 ERR(
"OpenBuiltinDomain failed (Status %08lx)\n",
Status);
1051 EnumContext->DomainHandle = EnumContext->BuiltinDomainHandle;
1057 TRACE(
"EnumContext->Index: %lu\n", EnumContext->
Index);
1058 TRACE(
"EnumContext->Returned: %lu\n", EnumContext->
Returned);
1062 TRACE(
"Calling SamEnumerateAliasesInDomain\n");
1070 TRACE(
"SamEnumerateAliasesInDomain returned (Status %08lx)\n",
Status);
1073 ERR(
"SamEnumerateAliasesInDomain failed (Status %08lx)\n",
Status);
1085 TRACE(
"EnumContext: %lu\n", EnumContext);
1086 TRACE(
"EnumContext->Returned: %lu\n", EnumContext->
Returned);
1087 TRACE(
"EnumContext->Buffer: %p\n", EnumContext->
Buffer);
1090 CurrentAlias = &EnumContext->
Buffer[EnumContext->
Index];
1100 ERR(
"SamOpenAlias failed (Status %08lx)\n",
Status);
1107 (
PVOID *)&AliasInfo);
1110 ERR(
"SamQueryInformationAlias failed (Status %08lx)\n",
Status);
1127 if (AliasInfo !=
NULL)
1133 EnumContext->
Index++;
1139 switch (EnumContext->
Phase)
1145 EnumContext->
Index = 0;
1172 if (EnumContext !=
NULL)
1173 *totalentries = EnumContext->
Returned;
1177 if (EnumContext !=
NULL)
1203 if (AliasHandle !=
NULL)
1206 if (AliasInfo !=
NULL)
1209 if (resumehandle !=
NULL)
1214 TRACE (
"return %lu\n", ApiStatus);
1244 if (servername !=
NULL)
1256 ERR(
"SamConnect failed (Status %08lx)\n",
Status);
1267 ERR(
"OpenBuiltinDomain failed (Status %08lx)\n",
Status);
1279 ERR(
"OpenAliasByName(%wZ) failed (ApiStatus %lu)\n", &GroupName, ApiStatus);
1283 if (AliasHandle ==
NULL)
1285 if (DomainHandle !=
NULL)
1290 (servername !=
NULL) ? &ServerName :
NULL,
1295 ERR(
"OpenAccountDomain failed (Status %08lx)\n",
Status);
1307 ERR(
"OpenAliasByName(%wZ) failed (ApiStatus %lu)\n", &GroupName, ApiStatus);
1316 (
PVOID *)&AliasInfo);
1319 ERR(
"SamQueryInformationAlias failed (Status %08lx)\n",
Status);
1331 if (AliasInfo !=
NULL)
1334 if (AliasHandle !=
NULL)
1337 if (DomainHandle !=
NULL)
1340 if (ServerHandle !=
NULL)
1382 totalentries, resumehandle);
1388 if (servername !=
NULL)
1393 if (resumehandle !=
NULL && *resumehandle != 0)
1406 &EnumContext->ServerHandle,
1411 ERR(
"SamConnect failed (Status %08lx)\n",
Status);
1419 &EnumContext->DomainHandle);
1422 ERR(
"OpenBuiltinDomain failed (Status %08lx)\n",
Status);
1431 &EnumContext->AliasHandle);
1434 ERR(
"OpenAliasByName(%wZ) failed (ApiStatus %lu)\n", &AliasName, ApiStatus);
1438 if (EnumContext->AliasHandle ==
NULL)
1440 if (EnumContext->DomainHandle !=
NULL)
1445 (servername !=
NULL) ? &ServerName :
NULL,
1447 &EnumContext->DomainHandle);
1450 ERR(
"OpenAccountDomain failed (Status %08lx)\n",
Status);
1459 &EnumContext->AliasHandle);
1462 ERR(
"OpenAliasByName(%wZ) failed (ApiStatus %lu)\n", &AliasName, ApiStatus);
1472 &EnumContext->Count);
1475 ERR(
"SamGetMemberInAlias failed (Status %08lx)\n",
Status);
1480 if (EnumContext->Count == 0)
1482 TRACE(
"No member found. We're done.\n");
1499 &EnumContext->LsaHandle);
1509 &EnumContext->Domains,
1510 &EnumContext->Names);
1520 for (
i = 0;
i < EnumContext->
Count;
i++)
1587 for (
i = 0;
i < EnumContext->
Count;
i++)
1596 EnumContext->
Sids[
i],
1607 EnumContext->
Sids[
i],
1630 EnumContext->
Sids[
i],
1684 *entriesread = EnumContext->
Count;
1689 if (EnumContext !=
NULL)
1690 *totalentries = EnumContext->
Count;
1695 if (EnumContext !=
NULL)
1752 if (parm_err !=
NULL)
1755 if (servername !=
NULL)
1767 ERR(
"SamConnect failed (Status %08lx)\n",
Status);
1778 ERR(
"OpenBuiltinDomain failed (Status %08lx)\n",
Status);
1790 ERR(
"OpenAliasByName(%wZ) failed (ApiStatus %lu)\n", &AliasName, ApiStatus);
1794 if (AliasHandle ==
NULL)
1796 if (DomainHandle !=
NULL)
1801 (servername !=
NULL) ? &ServerName :
NULL,
1806 ERR(
"OpenAccountDomain failed (Status %08lx)\n",
Status);
1818 ERR(
"OpenAliasByName(%wZ) failed (ApiStatus %lu)\n", &AliasName, ApiStatus);
1837 TRACE(
"SamSetInformationAlias failed (ApiStatus %lu)\n", ApiStatus);
1858 TRACE(
"SamSetInformationAlias failed (ApiStatus %lu)\n", ApiStatus);
1870 if (AliasHandle !=
NULL)
1873 if (DomainHandle !=
NULL)
1876 if (ServerHandle !=
NULL)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
NTSTATUS WINAPI LsaOpenPolicy(IN PLSA_UNICODE_STRING SystemName OPTIONAL, IN PLSA_OBJECT_ATTRIBUTES ObjectAttributes, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE PolicyHandle)
NTSTATUS WINAPI LsaLookupSids(IN LSA_HANDLE PolicyHandle, IN ULONG Count, IN PSID *Sids, OUT PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains, OUT PLSA_TRANSLATED_NAME *Names)
NTSTATUS WINAPI LsaFreeMemory(IN PVOID Buffer)
NTSTATUS WINAPI LsaLookupNames(IN LSA_HANDLE PolicyHandle, IN ULONG Count, IN PLSA_UNICODE_STRING Names, OUT PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains, OUT PLSA_TRANSLATED_SID *Sids)
NTSTATUS WINAPI LsaClose(IN LSA_HANDLE ObjectHandle)
NET_API_STATUS WINAPI NetApiBufferFree(LPVOID Buffer)
NET_API_STATUS WINAPI NetApiBufferAllocate(DWORD ByteCount, LPVOID *Buffer)
NET_API_STATUS WINAPI NetpNtStatusToApiStatus(_In_ NTSTATUS Status)
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
enum _ENUM_PHASE ENUM_PHASE
struct _LOCALGROUP_INFO_1 LOCALGROUP_INFO_1
struct _LOCALGROUP_INFO_1 * PLOCALGROUP_INFO_1
struct _LOCALGROUP_MEMBERS_INFO_2 LOCALGROUP_MEMBERS_INFO_2
struct _LOCALGROUP_MEMBERS_INFO_0 * PLOCALGROUP_MEMBERS_INFO_0
struct _LOCALGROUP_MEMBERS_INFO_2 * PLOCALGROUP_MEMBERS_INFO_2
struct _LOCALGROUP_MEMBERS_INFO_1 * PLOCALGROUP_MEMBERS_INFO_1
struct _LOCALGROUP_MEMBERS_INFO_3 * PLOCALGROUP_MEMBERS_INFO_3
struct _LOCALGROUP_INFO_0 * PLOCALGROUP_INFO_0
struct _LOCALGROUP_INFO_0 LOCALGROUP_INFO_0
struct _LOCALGROUP_MEMBERS_INFO_1 LOCALGROUP_MEMBERS_INFO_1
struct _LOCALGROUP_MEMBERS_INFO_3 LOCALGROUP_MEMBERS_INFO_3
struct _LOCALGROUP_MEMBERS_INFO_0 LOCALGROUP_MEMBERS_INFO_0
#define NERR_GroupNotFound
NET_API_STATUS WINAPI NetLocalGroupSetMembers(LPCWSTR servername, LPCWSTR groupname, DWORD level, LPBYTE buf, DWORD totalentries)
NET_API_STATUS WINAPI NetLocalGroupDelMembers(LPCWSTR servername, LPCWSTR groupname, DWORD level, LPBYTE buf, DWORD totalentries)
enum _ENUM_PHASE ENUM_PHASE
static VOID FreeAliasInfo(PALIAS_GENERAL_INFORMATION AliasInfo)
NET_API_STATUS WINAPI NetLocalGroupGetMembers(LPCWSTR servername, LPCWSTR localgroupname, DWORD level, LPBYTE *bufptr, DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries, PDWORD_PTR resumehandle)
NET_API_STATUS WINAPI NetLocalGroupSetInfo(LPCWSTR servername, LPCWSTR groupname, DWORD level, LPBYTE buf, LPDWORD parm_err)
NET_API_STATUS WINAPI NetLocalGroupEnum(LPCWSTR servername, DWORD level, LPBYTE *bufptr, DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries, PDWORD_PTR resumehandle)
NET_API_STATUS WINAPI NetLocalGroupGetInfo(LPCWSTR servername, LPCWSTR groupname, DWORD level, LPBYTE *bufptr)
struct _ENUM_CONTEXT * PENUM_CONTEXT
static NET_API_STATUS OpenAliasByName(SAM_HANDLE DomainHandle, PUNICODE_STRING AliasName, ULONG DesiredAccess, PSAM_HANDLE AliasHandle)
NET_API_STATUS WINAPI NetLocalGroupAdd(LPCWSTR servername, DWORD level, LPBYTE buf, LPDWORD parm_err)
NET_API_STATUS WINAPI NetLocalGroupDelMember(LPCWSTR servername, LPCWSTR groupname, PSID membersid)
struct _MEMBER_ENUM_CONTEXT * PMEMBER_ENUM_CONTEXT
NET_API_STATUS WINAPI NetLocalGroupDel(LPCWSTR servername, LPCWSTR groupname)
static NET_API_STATUS BuildAliasInfoBuffer(PALIAS_GENERAL_INFORMATION AliasInfo, DWORD level, LPVOID *Buffer)
NET_API_STATUS WINAPI NetLocalGroupAddMember(LPCWSTR servername, LPCWSTR groupname, PSID membersid)
struct _ENUM_CONTEXT ENUM_CONTEXT
NET_API_STATUS WINAPI NetLocalGroupAddMembers(LPCWSTR servername, LPCWSTR groupname, DWORD level, LPBYTE buf, DWORD totalentries)
struct _MEMBER_ENUM_CONTEXT MEMBER_ENUM_CONTEXT
static NET_API_STATUS BuildSidListFromDomainAndName(IN PUNICODE_STRING ServerName, IN PLOCALGROUP_MEMBERS_INFO_3 buf, IN ULONG EntryCount, OUT PLOCALGROUP_MEMBERS_INFO_0 *MemberList)
enum _SID_NAME_USE * PSID_NAME_USE
#define memcpy(s1, s2, n)
#define InitializeObjectAttributes(p, n, a, r, s)
NTSYSAPI ULONG NTAPI RtlLengthSid(IN PSID Sid)
NTSTATUS OpenBuiltinDomain(IN SAM_HANDLE ServerHandle, IN ULONG DesiredAccess, OUT SAM_HANDLE *DomainHandle)
NET_API_STATUS BuildSidFromSidAndRid(IN PSID SrcSid, IN ULONG RelativeId, OUT PSID *DestSid)
NTSTATUS OpenAccountDomain(IN SAM_HANDLE ServerHandle, IN PUNICODE_STRING ServerName, IN ULONG DesiredAccess, OUT PSAM_HANDLE DomainHandle)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
@ AliasGeneralInformation
@ AliasAdminCommentInformation
ULONG SAM_ENUMERATE_HANDLE
#define DOMAIN_CREATE_ALIAS
#define SAM_SERVER_LOOKUP_DOMAIN
#define ALIAS_WRITE_ACCOUNT
#define SAM_SERVER_CONNECT
#define ALIAS_LIST_MEMBERS
#define ALIAS_READ_INFORMATION
#define ALIAS_REMOVE_MEMBER
#define DOMAIN_LIST_ACCOUNTS
NTSTATUS NTAPI SamAddMemberToAlias(IN SAM_HANDLE AliasHandle, IN PSID MemberId)
NTSTATUS NTAPI SamSetInformationAlias(IN SAM_HANDLE AliasHandle, IN ALIAS_INFORMATION_CLASS AliasInformationClass, IN PVOID Buffer)
NTSTATUS NTAPI SamOpenAlias(IN SAM_HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN ULONG AliasId, OUT PSAM_HANDLE AliasHandle)
NTSTATUS NTAPI SamLookupNamesInDomain(IN SAM_HANDLE DomainHandle, IN ULONG Count, IN PUNICODE_STRING Names, OUT PULONG *RelativeIds, OUT PSID_NAME_USE *Use)
NTSTATUS NTAPI SamDeleteAlias(IN SAM_HANDLE AliasHandle)
NTSTATUS NTAPI SamFreeMemory(IN PVOID Buffer)
NTSTATUS NTAPI SamConnect(IN OUT PUNICODE_STRING ServerName OPTIONAL, OUT PSAM_HANDLE ServerHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
NTSTATUS NTAPI SamCloseHandle(IN SAM_HANDLE SamHandle)
NTSTATUS NTAPI SamCreateAliasInDomain(IN SAM_HANDLE DomainHandle, IN PUNICODE_STRING AccountName, IN ACCESS_MASK DesiredAccess, OUT PSAM_HANDLE AliasHandle, OUT PULONG RelativeId)
NTSTATUS NTAPI SamQueryInformationAlias(IN SAM_HANDLE AliasHandle, IN ALIAS_INFORMATION_CLASS AliasInformationClass, OUT PVOID *Buffer)
NTSTATUS NTAPI SamGetMembersInAlias(IN SAM_HANDLE AliasHandle, OUT PSID **MemberIds, OUT PULONG MemberCount)
NTSTATUS NTAPI SamRemoveMemberFromAlias(IN SAM_HANDLE AliasHandle, IN PSID MemberId)
NTSTATUS NTAPI SamEnumerateAliasesInDomain(IN SAM_HANDLE DomainHandle, IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext, OUT PVOID *Buffer, IN ULONG PreferedMaximumLength, OUT PULONG CountReturned)
SAM_HANDLE BuiltinDomainHandle
SAM_HANDLE AccountDomainHandle
SAM_ENUMERATE_HANDLE EnumerationContext
PSAM_RID_ENUMERATION Buffer
SID_NAME_USE lgrmi1_sidusage
LPWSTR lgrmi2_domainandname
SID_NAME_USE lgrmi2_sidusage
LPWSTR lgrmi3_domainandname
PLSA_TRUST_INFORMATION Domains
PLSA_REFERENCED_DOMAIN_LIST Domains
PLSA_TRANSLATED_NAME Names
static unsigned int bufptr
#define STATUS_MORE_ENTRIES
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
#define ERROR_INVALID_LEVEL
#define ERROR_ALIAS_EXISTS
#define ERROR_NONE_MAPPED