MCPcopy Create free account
hub / github.com/VSWSL/Arch-WSL / PrintErrorMessage

Method PrintErrorMessage

ArchWSL/Helpers.cpp:33–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void Helpers::PrintErrorMessage(HRESULT error)
34{
35 PWSTR buffer = nullptr;
36 ::FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER,
37 nullptr,
38 error,
39 0,
40 (PWSTR)&buffer,
41 0,
42 nullptr);
43
44 Helpers::PrintMessage(MSG_ERROR_CODE, error, buffer);
45 if (buffer != nullptr) {
46 HeapFree(GetProcessHeap(), 0, buffer);
47 }
48
49 return;
50}
51
52HRESULT Helpers::PrintMessage(DWORD messageId, ...)
53{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected