From: Vitaly Lipatov lav@etersoft.ru
--- dlls/secur32/secur32.c | 44 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-)
diff --git a/dlls/secur32/secur32.c b/dlls/secur32/secur32.c index d703757bae7..1e02f81df1f 100644 --- a/dlls/secur32/secur32.c +++ b/dlls/secur32/secur32.c @@ -820,6 +820,34 @@ SECURITY_STATUS WINAPI EnumerateSecurityPackagesA(PULONG pcPackages, return ret; }
+ +static LPCSTR string_NameFormat[] = +{ + "NameUnknown", + "NameFullyQualifiedDN", + "NameSamCompatible", + "NameDisplay", + "(unknown)", + "(unknown)", + "NameUniqueId", + "NameCanonical", + "NameUserPrincipal", + "NameCanonicalEx", + "NameServicePrincipal", + "(unknown)", + "NameDnsDomain", + "NameGivenName", + "NameSurname" +}; + +static LPCSTR debugstr_NameFormat(IN EXTENDED_NAME_FORMAT NameFormat) +{ + if (NameFormat >= ARRAY_SIZE(string_NameFormat)) + return "(unknown)"; + return string_NameFormat[NameFormat]; +} + + /*********************************************************************** * GetComputerObjectNameA (SECUR32.@) * @@ -851,7 +879,7 @@ BOOLEAN WINAPI GetComputerObjectNameA( LPWSTR bufferW = NULL; ULONG sizeW = *nSize;
- TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize); + TRACE("(%s(%d) %p %p)\n", debugstr_NameFormat(NameFormat), NameFormat, lpNameBuffer, nSize);
if (lpNameBuffer) { if (!(bufferW = malloc(sizeW * sizeof(WCHAR)))) { @@ -883,7 +911,7 @@ BOOLEAN WINAPI GetComputerObjectNameW( NTSTATUS ntStatus; BOOLEAN status;
- TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize); + TRACE("(%s(%d) %p %p)\n", debugstr_NameFormat(NameFormat), NameFormat, lpNameBuffer, nSize);
if (NameFormat == NameUnknown) { @@ -1070,7 +1098,7 @@ BOOLEAN WINAPI GetUserNameExA( BOOLEAN rc; LPWSTR bufferW = NULL; ULONG sizeW = *nSize; - TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize); + TRACE("(%s(%d) %p %p)\n", debugstr_NameFormat(NameFormat), NameFormat, lpNameBuffer, nSize); if (lpNameBuffer) { bufferW = malloc(sizeW * sizeof(WCHAR)); if (bufferW == NULL) { @@ -1102,7 +1130,7 @@ BOOLEAN WINAPI GetUserNameExA( BOOLEAN WINAPI GetUserNameExW( EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer, PULONG nSize) { - TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize); + TRACE("(%s(%d) %p %p)\n", debugstr_NameFormat(NameFormat), NameFormat, lpNameBuffer, nSize);
switch (NameFormat) { @@ -1158,8 +1186,8 @@ BOOLEAN WINAPI TranslateNameA( EXTENDED_NAME_FORMAT DesiredNameFormat, LPSTR lpTranslatedName, PULONG nSize) { - FIXME("%p %d %d %p %p\n", lpAccountName, AccountNameFormat, - DesiredNameFormat, lpTranslatedName, nSize); + FIXME("%p %s(%d) %s(%d) %p %p\n", lpAccountName, debugstr_NameFormat(AccountNameFormat), AccountNameFormat, + debugstr_NameFormat(DesiredNameFormat), DesiredNameFormat, lpTranslatedName, nSize); return FALSE; }
@@ -1168,8 +1196,8 @@ BOOLEAN WINAPI TranslateNameW( EXTENDED_NAME_FORMAT DesiredNameFormat, LPWSTR lpTranslatedName, PULONG nSize) { - FIXME("%p %d %d %p %p\n", lpAccountName, AccountNameFormat, - DesiredNameFormat, lpTranslatedName, nSize); + FIXME("%p %s(%d) %s(%d) %p %p\n", lpAccountName, debugstr_NameFormat(AccountNameFormat), AccountNameFormat, + debugstr_NameFormat(DesiredNameFormat), DesiredNameFormat, lpTranslatedName, nSize); return FALSE; }