LPSTR ConvertErrorCodeToString(DWORD ErrorCode) { HLOCAL LocalAddress = NULL; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM, NULL, ErrorCode, 0, (char*)&LocalAddress, 0, NULL); return (LPSTR)LocalAddress; }
时间: 2024-10-11 12:37:28