-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase.h
35 lines (28 loc) · 948 Bytes
/
base.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma once
#ifndef _MOUSE_CONFIG_H
#define _MOUSE_CONFIG_H
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef UNICODE
#define UNICODE
#endif
#ifndef _UNICODE
#define _UNICODE
#endif
#ifndef __GNUC__
#define UNUSED
#else // __GNUC__
#define UNUSED __attribute__((unused))
#endif // __GNUC__
#include <windows.h>
#define printError(...)
#define COM_CALL(hr, pointer, function, ...) \
hr = (pointer)->lpVtbl->function((pointer), ##__VA_ARGS__); \
EXIT_ON_ERROR(hr, function)
#define EXIT_ON_ERROR(hr, description) \
if (FAILED(hr)) { \
printError("%s failed: error %d occurred\n", #description, -(hr)); \
goto Exit; \
}
#endif //_MOUSE_CONFIG_H