Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 980 of file taskmgr.c.
Referenced by AffinityDialogWndProc(), DoSetPriority(), ProcessPage_OnDebug(), ProcessPage_OnEndProcess(), ProcessPage_OnEndProcessTree(), and ProcessPage_OnSetAffinity().
{ DWORD dwRet; LPWSTR lpszTemp = NULL; dwRet = FormatMessageW( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |FORMAT_MESSAGE_ARGUMENT_ARRAY, NULL, GetLastError(), LANG_NEUTRAL, (LPWSTR)&lpszTemp, 0, NULL ); /* supplied buffer is not long enough */ if (!dwRet || ( (long)dwSize < (long)dwRet+14)) { lpszBuf[0] = L'\0'; } else { lpszTemp[lstrlenW(lpszTemp)-2] = L'\0'; /*remove cr and newline character */ wsprintfW(lpszBuf, L"%s (0x%x)", lpszTemp, (int)GetLastError()); } if (lpszTemp) { LocalFree((HLOCAL)lpszTemp); } return lpszBuf; }