Instantly share code, notes, and snippets.

View GetLastErrorStdStr.cpp
// Needs Windows constant and type definitions
#include <windows.h>
#include <string>
// Create a string with last error message
std::string GetLastErrorStdStr()
{
DWORD error = GetLastError();
if (error)