Update DriverAssistLog.cpp
This commit is contained in:
parent
48f542e3f9
commit
4073ac1fd0
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue