доза: условие гонки в докере строит, тянет mfc42.dll автоматически
This commit is contained in:
parent
1c79edcde7
commit
13bf157135
6 changed files with 51 additions and 33 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue