#define ASSEMBLYINFOR(format,...) \
{\
char msg[1024];\
snprintf(msg,1024,format,##__VA_ARGS__);\
}\
LPVOID lpMsgBuf;
DWORD dw = GetLastError();
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|
FORMAT_MESSAGE_FROM_SYSTEM|
FORMAT_MESSAGE_IGNORE_INSERTS,
nullptr,
dw,
MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),
reinterpret_cast<LPSTR>(&lpMsgBuf),
0,
nullptr);
std::string res = "errorcode: "+std::to_string(dw)+" : "+static_cast<LPSTR>(lpMsgBuf)