Sync with trunk (r48545)
[reactos.git] / include / psdk / devpropdef.h
1 /*
2 * devpropdef.h
3 *
4 * This file is part of the ReactOS PSDK package.
5 *
6 * Contributors:
7 * Created by Amine Khaldi.
8 *
9 * THIS SOFTWARE IS NOT COPYRIGHTED
10 *
11 * This source code is offered for use in the public domain. You may
12 * use, modify or distribute it freely.
13 *
14 * This code is distributed in the hope that it will be useful but
15 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
16 * DISCLAIMED. This includes but is not limited to warranties of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 *
19 */
20
21 #ifndef _DEVPROPDEF_H_
22 #define _DEVPROPDEF_H_
23
24 typedef ULONG DEVPROPTYPE, *PDEVPROPTYPE;
25
26 #define DEVPROP_TYPEMOD_ARRAY 0x00001000
27 #define DEVPROP_TYPEMOD_LIST 0x00002000
28
29 #define DEVPROP_TYPE_EMPTY 0x00000000
30 #define DEVPROP_TYPE_NULL 0x00000001
31 #define DEVPROP_TYPE_SBYTE 0x00000002
32 #define DEVPROP_TYPE_BYTE 0x00000003
33 #define DEVPROP_TYPE_INT16 0x00000004
34 #define DEVPROP_TYPE_UINT16 0x00000005
35 #define DEVPROP_TYPE_INT32 0x00000006
36 #define DEVPROP_TYPE_UINT32 0x00000007
37 #define DEVPROP_TYPE_INT64 0x00000008
38 #define DEVPROP_TYPE_UINT64 0x00000009
39 #define DEVPROP_TYPE_FLOAT 0x0000000A
40 #define DEVPROP_TYPE_DOUBLE 0x0000000B
41 #define DEVPROP_TYPE_DECIMAL 0x0000000C
42 #define DEVPROP_TYPE_GUID 0x0000000D
43 #define DEVPROP_TYPE_CURRENCY 0x0000000E
44 #define DEVPROP_TYPE_DATE 0x0000000F
45 #define DEVPROP_TYPE_FILETIME 0x00000010
46 #define DEVPROP_TYPE_BOOLEAN 0x00000011
47 #define DEVPROP_TYPE_STRING 0x00000012
48 #define DEVPROP_TYPE_STRING_LIST (DEVPROP_TYPE_STRING|DEVPROP_TYPEMOD_LIST)
49 #define DEVPROP_TYPE_SECURITY_DESCRIPTOR 0x00000013
50 #define DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING 0x00000014
51 #define DEVPROP_TYPE_DEVPROPKEY 0x00000015
52 #define DEVPROP_TYPE_DEVPROPTYPE 0x00000016
53 #define DEVPROP_TYPE_BINARY (DEVPROP_TYPE_BYTE|DEVPROP_TYPEMOD_ARRAY)
54 #define DEVPROP_TYPE_ERROR 0x00000017
55 #define DEVPROP_TYPE_NTSTATUS 0x00000018
56 #define DEVPROP_TYPE_STRING_INDIRECT 0x00000019
57
58 #define MAX_DEVPROP_TYPE 0x00000019
59 #define MAX_DEVPROP_TYPEMOD 0x00002000
60
61 #define DEVPROP_MASK_TYPE 0x00000FFF
62 #define DEVPROP_MASK_TYPEMOD 0x0000F000
63
64 typedef CHAR DEVPROP_BOOLEAN, *PDEVPROP_BOOLEAN;
65
66 #define DEVPROP_TRUE ((DEVPROP_BOOLEAN)-1)
67 #define DEVPROP_FALSE ((DEVPROP_BOOLEAN) 0)
68
69 #ifndef DEVPROPKEY_DEFINED
70 #define DEVPROPKEY_DEFINED
71
72 typedef GUID DEVPROPGUID, *PDEVPROPGUID;
73 typedef ULONG DEVPROPID, *PDEVPROPID;
74
75 typedef struct _DEVPROPKEY {
76 DEVPROPGUID fmtid;
77 DEVPROPID pid;
78 } DEVPROPKEY, *PDEVPROPKEY;
79
80 #endif /* DEVPROPKEY_DEFINED */
81
82 #define DEVPROPID_FIRST_USABLE 2
83
84 #endif /* _DEVPROPDEF_H_ */
85
86 #ifdef DEFINE_DEVPROPKEY
87 #undef DEFINE_DEVPROPKEY
88 #endif
89 #ifdef INITGUID
90 #define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const DEVPROPKEY DECLSPEC_SELECTANY name = {{ l, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}}, pid}
91 #else
92 #define DEFINE_DEVPROPKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) EXTERN_C const DEVPROPKEY name
93 #endif /* INITGUID */
94
95 #ifndef IsEqualDevPropKey
96
97 #ifdef __cplusplus
98 #define IsEqualDevPropKey(a, b) (((a).pid == (b).pid) && IsEqualIID((a).fmtid, (b).fmtid))
99 #else
100 #define IsEqualDevPropKey(a, b) (((a).pid == (b).pid) && IsEqualIID(&(a).fmtid, &(b).fmtid))
101 #endif
102
103 #endif /* !IsEqualDevPropKey */
104