[USRMGR] Replace old (leftover) debug MessageBox with Wine trace macros (#4640)

Remove leftover of debug code. CORE-18276
This commit is contained in:
Kyle Katarn 2022-09-03 17:19:41 +02:00 committed by GitHub
parent bb9c5e8e3e
commit f07741e631
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 23 deletions

View file

@ -21,6 +21,7 @@ add_library(usrmgr MODULE
${CMAKE_CURRENT_BINARY_DIR}/usrmgr.def)
set_module_type(usrmgr cpl UNICODE)
target_link_libraries(usrmgr wine)
add_importlibs(usrmgr advapi32 user32 gdi32 comctl32 netapi32 msvcrt kernel32 ntdll)
add_pch(usrmgr usrmgr.h SOURCE)
add_cd_file(TARGET usrmgr DESTINATION reactos/system32 FOR all)

View file

@ -173,8 +173,7 @@ AddSelectedUsersToGroup(HWND hwndDlg,
nItem, 0,
szUserName,
UNLEN + 1);
DebugPrintf(_TEXT("Selected user: %s"), szUserName);
TRACE("Selected user: %s", dbgstrx(szUserName));
memberInfo.lgrmi3_domainandname = szUserName;
@ -516,7 +515,7 @@ SetGeneralGroupData(HWND hwndDlg,
status = NetLocalGroupSetInfo(NULL, pGroupData->szGroupName, 1, (LPBYTE)&groupInfo, &dwIndex);
if (status != NERR_Success)
{
DebugPrintf(_T("Status: %lu Index: %lu"), status, dwIndex);
ERR("NetLocalGroupSetInfo failed. Status: %lu Index: %lu", status, dwIndex);
}
if (pszComment)

View file

@ -9,20 +9,6 @@
#include "usrmgr.h"
VOID
DebugPrintf(LPTSTR szFormat, ...)
{
TCHAR szOut[512];
va_list arg_ptr;
va_start (arg_ptr, szFormat);
_vstprintf (szOut, szFormat, arg_ptr);
va_end (arg_ptr);
MessageBox(NULL, szOut, _T("Debug"), MB_OK);
}
BOOL
CheckAccountName(HWND hwndDlg,
INT nIdDlgItem,

View file

@ -167,7 +167,7 @@ SetUserProfileData(HWND hwndDlg,
status = NetUserSetInfo(NULL, pUserData->szUserName, 3, (LPBYTE)pUserInfo, &dwIndex);
if (status != NERR_Success)
{
DebugPrintf(_T("Status: %lu Index: %lu"), status, dwIndex);
ERR("NetUserSetInfo failed. Status: %lu Index: %lu", status, dwIndex);
}
if (pszProfilePath)
@ -476,7 +476,7 @@ AddSelectedGroupsToUser(HWND hwndDlg,
(LPBYTE)&memberInfo, 1);
if (status == NERR_Success)
{
DebugPrintf(_TEXT("Selected group: %s"), szGroupName);
TRACE("Selected group: %s", dbgstrx(szGroupName));
bResult = TRUE;
}
else
@ -784,7 +784,7 @@ SetUserGeneralData(HWND hwndDlg,
status = NetUserSetInfo(NULL, pUserData->szUserName, 3, (LPBYTE)pUserInfo, &dwIndex);
if (status != NERR_Success)
{
DebugPrintf(_T("Status: %lu Index: %lu"), status, dwIndex);
ERR("NetUserSetInfo failed. Status: %lu Index: %lu", status, dwIndex);
}
if (pszFullName)

View file

@ -2,6 +2,15 @@
#define _USRMGR_H
#include <stdarg.h>
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(usrmgr);
#ifdef UNICODE
#define dbgstrx(x) wine_dbgstr_w(x)
#else
#define dbgstrx(x) (const char*)(x)
#endif
#define WIN32_NO_STATUS
#include <windef.h>
@ -36,9 +45,6 @@ BOOL
GroupProperties(HWND hwndDlg);
/* misc.c */
VOID
DebugPrintf(LPTSTR szFormat, ...);
BOOL
CheckAccountName(HWND hwndDlg,
INT nIdDlgItem,