MCPcopy Create free account
hub / github.com/amule-project/amule / SystemError

Function SystemError

src/PlatformSpecific.cpp:42–59  ·  view source on GitHub ↗

Create a message from a Windows error code

Source from the content-addressed store, hash-verified

40
41// Create a message from a Windows error code
42static wxString SystemError()
43{
44 WCHAR * lpMsgBuf = NULL;
45
46 FormatMessageW(
47 FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
48 NULL,
49 GetLastError(),
50 0, // Default language
51 (LPWSTR) &lpMsgBuf,
52 0,
53 NULL
54 );
55
56 wxString ret(lpMsgBuf);
57 LocalFree(lpMsgBuf);
58 return ret;
59}
60
61// Create a file in sparse mode
62bool PlatformSpecific::CreateSparseFile(const CPath& name, uint64_t size)

Callers 1

CreateSparseFileMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected