Update DriverAssistLog.cpp

This commit is contained in:
DavidXanatos 2022-09-07 20:45:37 +02:00
parent 48f542e3f9
commit 4073ac1fd0
1 changed files with 2 additions and 2 deletions

View File

@ -200,10 +200,10 @@ void DriverAssist::LogMessage_Single(ULONG code, wchar_t* data, ULONG pid)
WCHAR user[UNLEN + 1]; WCHAR user[UNLEN + 1];
WCHAR domain[DNLEN + 1]; WCHAR domain[DNLEN + 1];
if (GetUserNameFromProcess(pid, domain, DNLEN + 1, user, UNLEN + 1)) { if (GetUserNameFromProcess(pid, user, UNLEN + 1, domain, DNLEN + 1)) {
WCHAR *text2 = (WCHAR *)LocalAlloc( WCHAR *text2 = (WCHAR *)LocalAlloc(
LMEM_FIXED, (wcslen(text) + DNLEN + UNLEN + 10) * sizeof(WCHAR)); LMEM_FIXED, (wcslen(text) + UNLEN + DNLEN + 10) * sizeof(WCHAR));
if (text2) { if (text2) {
wsprintf(text2, L"%s (%s\\%s)", text, domain, user); wsprintf(text2, L"%s (%s\\%s)", text, domain, user);