-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathdbgext.hpp
41 lines (28 loc) · 862 Bytes
/
dbgext.hpp
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
36
37
38
39
40
41
#pragma once
#ifndef IfFailedReturn
#define IfFailedReturn(EXPR) do { hr = (EXPR); if (FAILED(hr)) { return hr; }} while(FALSE, FALSE)
#endif // IfFailedReturn
#ifdef __cplusplus
extern "C" {
#endif
#define INIT_API() \
HRESULT Status; \
if ((Status = ExtQuery(Client)) != S_OK) return Status;
#define EXT_RELEASE(Unk) \
((Unk) != NULL ? ((Unk)->Release(), (Unk) = NULL) : NULL)
#define EXIT_API ExtRelease
// Global variables initialized by query.
extern PDEBUG_CLIENT4 g_ExtClient;
extern PDEBUG_CONTROL4 g_ExtControl;
extern PDEBUG_SYMBOLS2 g_ExtSymbols;
extern BOOL Connected;
extern ULONG TargetMachine;
HRESULT
ExtQuery(PDEBUG_CLIENT4 Client);
void
ExtRelease(void);
void __cdecl
ExtOutDml(PCSTR Format, ...);
#ifdef __cplusplus
}
#endif