-
Notifications
You must be signed in to change notification settings - Fork 1
/
drvcommon.h
48 lines (38 loc) · 1.29 KB
/
drvcommon.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
///////////////////////////////////////////////////////////////////////////////
///
/// Copyright (c) 2023 - ultracage(rsa)
///
/// Useful macros
///
/// (File was in the PUBLIC DOMAIN - Created by: ddkwizard\.assarbad\.net)
///////////////////////////////////////////////////////////////////////////////
// $Id$
#ifndef __DRVCOMMON_H_VERSION__
#define __DRVCOMMON_H_VERSION__ 100
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
#define _ANSISTRING(text) #text
#define ANSISTRING(text) _ANSISTRING(text)
#define _WIDESTRING(text) L##text
#define WIDESTRING(text) _WIDESTRING(text)
#define PRESET_UNICODE_STRING(symbol, buffer) \
UNICODE_STRING symbol = \
{ \
sizeof(WIDESTRING(buffer)) - sizeof(WCHAR), \
sizeof(WIDESTRING(buffer)), \
WIDESTRING(buffer) \
};
#define CREATE_XVER(maj,min,build) maj ## , ## min ## , 0, ## build
#define CREATE_FVER(maj,min,build) maj ## . ## min ## .0. ## build
#define CREATE_PVER(maj,min,build) maj ## . ## min
#if DBG
#ifdef ADVANCED_DEBUG
#define DebugPrint DbgPrint("[%s] %s (line: %d)\n", __##FILE##__, __##FUNCTION##__, __##LINE##__); DbgPrint
#else
#define DebugPrint DbgPrint
#endif
#else
#define DebugPrint /##/DbgPrint
#endif
#endif // __DRVCOMMON_H_VERSION__