-
Notifications
You must be signed in to change notification settings - Fork 29
/
ORADAD.h
63 lines (52 loc) · 1.32 KB
/
ORADAD.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
// Constants
//
#define MAX_OCTAL_SIZE 077777777777
#define DWORD_MAX 0xffffffffUL // See ntintsafe.h
#define USE_GLOBAL_CREDENTIALS DWORD_MAX
//
// Macros
//
#define _HeapAlloc(x) HeapAlloc(g_hHeap, HEAP_ZERO_MEMORY, (x))
#define _SafeHeapRelease(x) { if (NULL != x) { HeapFree(g_hHeap, 0, x); x = NULL; } }
#define _SafeCOMRelease(x) { if (NULL != x) { x->Release(); x = NULL; } }
#define _CallWriteAndGetMax(x, y) do { DWORD dwTempSizeResult; dwTempSizeResult = x; if (dwTempSizeResult>y) y=dwTempSizeResult; } while(FALSE)
//
// Defines
//
#define MAX_METADATA_KEY 255
#define MAX_METADATA_VALUE 1024
#define DATE_MAX_STR_SIZE 20
#define DATE_FORMAT L"%04u-%02u-%02u %02u:%02u:%02u"
//
// Enum
//
enum class StartStatus
{
Unkwnon = 0,
Good = 1,
Warning = 2,
Expired = 3
};
enum class DbCompareMode
{
Max,
Last
};
//
// Include
//
#include "mla.hpp"
#include "Structures.h"
#include "Functions.h"
//
// TraceLogging
//
// Uncomment to enable tracing
//#define TRACELOGGING
#ifdef TRACELOGGING
#include <TraceLoggingProvider.h>
#include <winmeta.h> // for WINEVENT_LEVEL_* definitions
TRACELOGGING_DECLARE_PROVIDER(g_hOradadLoggingProvider);
#define ORADAD_PROVIDER_KEYWORD_MLA 0x1
#endif