Commit 5f1b91e5 authored by Vitaly Lipatov's avatar Vitaly Lipatov Committed by Alexandre Julliard

secur32: Print name for EXTENDED_NAME_FORMAT argument.

parent d5a983eb
......@@ -816,6 +816,33 @@ SECURITY_STATUS WINAPI EnumerateSecurityPackagesA(PULONG pcPackages,
return ret;
}
static const char *debugstr_NameFormat( EXTENDED_NAME_FORMAT format )
{
static const char * const names[] =
{
"NameUnknown",
"NameFullyQualifiedDN",
"NameSamCompatible",
"NameDisplay",
NULL,
NULL,
"NameUniqueId",
"NameCanonical",
"NameUserPrincipal",
"NameCanonicalEx",
"NameServicePrincipal",
NULL,
"NameDnsDomain",
"NameGivenName",
"NameSurname"
};
if (format < ARRAY_SIZE(names) && names[format]) return names[format];
return wine_dbg_sprintf( "%u", format );
}
/***********************************************************************
* GetComputerObjectNameA (SECUR32.@)
*
......@@ -847,7 +874,7 @@ BOOLEAN WINAPI GetComputerObjectNameA(
LPWSTR bufferW = NULL;
ULONG sizeW = *nSize;
TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize);
TRACE("(%s %p %p)\n", debugstr_NameFormat(NameFormat), lpNameBuffer, nSize);
if (lpNameBuffer) {
if (!(bufferW = malloc(sizeW * sizeof(WCHAR)))) {
......@@ -879,7 +906,7 @@ BOOLEAN WINAPI GetComputerObjectNameW(
NTSTATUS ntStatus;
BOOLEAN status;
TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize);
TRACE("(%s %p %p)\n", debugstr_NameFormat(NameFormat), lpNameBuffer, nSize);
if (NameFormat == NameUnknown)
{
......@@ -1066,7 +1093,7 @@ BOOLEAN WINAPI GetUserNameExA(
BOOLEAN rc;
LPWSTR bufferW = NULL;
ULONG sizeW = *nSize;
TRACE("(%d %p %p)\n", NameFormat, lpNameBuffer, nSize);
TRACE("(%s %p %p)\n", debugstr_NameFormat(NameFormat), lpNameBuffer, nSize);
if (lpNameBuffer) {
bufferW = malloc(sizeW * sizeof(WCHAR));
if (bufferW == NULL) {
......@@ -1098,7 +1125,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 %p %p)\n", debugstr_NameFormat(NameFormat), lpNameBuffer, nSize);
switch (NameFormat)
{
......@@ -1155,8 +1182,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 %s %p %p\n", lpAccountName, debugstr_NameFormat(AccountNameFormat),
debugstr_NameFormat(DesiredNameFormat), lpTranslatedName, nSize);
return FALSE;
}
......@@ -1165,8 +1192,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 %s %p %p\n", lpAccountName, debugstr_NameFormat(AccountNameFormat),
debugstr_NameFormat(DesiredNameFormat), lpTranslatedName, nSize);
return FALSE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment