1
0
Fork 0

доза: условие гонки в докере строит, тянет mfc42.dll автоматически

This commit is contained in:
Arthur K. 2025-12-19 15:25:57 +03:00
parent 1c79edcde7
commit 13bf157135
Signed by: wzray
GPG key ID: B97F30FDC4636357
6 changed files with 51 additions and 33 deletions

View file

@ -1,15 +1,16 @@
#include "COMWrapper.hpp"
#include <cstdio>
#include <stdexcept>
#include <windows.h>
#include <comdef.h>
void COMWrapper::Raise(const HRESULT hr, const char *const ctx) const {
if (hr != 0) {
char msg[128];
snprintf(msg, 128, "[%s] Non-zero HRESULT value: 0x%x at: %s\n", classname(), hr, ctx);
printf(msg);
throw std::runtime_error(msg);
char msg[1024];
_com_error err(hr);
snprintf(msg, 1024, "[%s] Error: %s (0x%lx) at: %s\n", classname(), err.ErrorMessage(), hr, ctx);
printf("%s\n", msg);
exit(1);
}
}