MCPcopy Create free account
hub / github.com/SafeBreach-Labs/PoolParty / GetLastErrorString

Function GetLastErrorString

PoolParty/Misc.cpp:35–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35std::string GetLastErrorString(std::string FailedFunctionName, DWORD dwLastError)
36{
37 auto sErrorText = w_FormatMessageA(
38 FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS,
39 nullptr,
40 dwLastError,
41 LANG_SYSTEM_DEFAULT,
42 0,
43 nullptr);
44
45 std::ostringstream oss;
46 oss << FailedFunctionName << " failed: " << sErrorText;
47 return oss.str();
48}

Callers 12

w_WriteFileFunction · 0.85
w_VirtualAllocExFunction · 0.85
w_CreateThreadpoolWorkFunction · 0.85
w_CreateThreadpoolWaitFunction · 0.85
w_CreateThreadpoolIoFunction · 0.85
w_TpAllocAlpcCompletionFunction · 0.85
w_TpAllocJobNotificationFunction · 0.85
w_CreateThreadpoolTimerFunction · 0.85
RAISE_IF_FALSEFunction · 0.85
RAISE_IF_HANDLE_INVALIDFunction · 0.85
NT_SUCCESS_OR_RAISEFunction · 0.85
w_QueryInformationFunction · 0.85

Calls 1

w_FormatMessageAFunction · 0.85

Tested by

no test coverage detected