- move CONTEXT stuff from wdm.h to winddk.h / armddk.h
[reactos.git] / reactos / include / ddk / wdm.h
1 #ifndef _WDMDDK_
2 #define _WDMDDK_
3
4 //
5 // Dependencies
6 //
7 #define NT_INCLUDED
8 #include <excpt.h>
9 #include <ntdef.h>
10 #include <ntstatus.h>
11
12 #ifdef __GNUC__
13 #include "intrin.h"
14 #endif
15
16 typedef struct _CONTEXT *PCONTEXT;
17
18 //
19 // Resource list definitions
20 //
21 typedef int CM_RESOURCE_TYPE;
22
23 #define CmResourceTypeNull 0
24 #define CmResourceTypePort 1
25 #define CmResourceTypeInterrupt 2
26 #define CmResourceTypeMemory 3
27 #define CmResourceTypeDma 4
28 #define CmResourceTypeDeviceSpecific 5
29 #define CmResourceTypeBusNumber 6
30 #define CmResourceTypeNonArbitrated 128
31 #define CmResourceTypeConfigData 128
32 #define CmResourceTypeDevicePrivate 129
33 #define CmResourceTypePcCardConfig 130
34 #define CmResourceTypeMfCardConfig 131
35
36
37
38 //
39 // Global debug flag
40 //
41 extern ULONG NtGlobalFlag;
42
43
44
45 //
46 // Section map options
47 //
48 typedef enum _SECTION_INHERIT {
49 ViewShare = 1,
50 ViewUnmap = 2
51 } SECTION_INHERIT;
52
53 //
54 // Section access rights
55 //
56 #define SECTION_QUERY 0x0001
57 #define SECTION_MAP_WRITE 0x0002
58 #define SECTION_MAP_READ 0x0004
59 #define SECTION_MAP_EXECUTE 0x0008
60 #define SECTION_EXTEND_SIZE 0x0010
61 #define SECTION_MAP_EXECUTE_EXPLICIT 0x0020
62
63 #define SECTION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SECTION_QUERY|\
64 SECTION_MAP_WRITE | \
65 SECTION_MAP_READ | \
66 SECTION_MAP_EXECUTE | \
67 SECTION_EXTEND_SIZE)
68
69 #define SESSION_QUERY_ACCESS 0x0001
70 #define SESSION_MODIFY_ACCESS 0x0002
71
72 #define SESSION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
73 SESSION_QUERY_ACCESS | \
74 SESSION_MODIFY_ACCESS)
75
76
77
78 #define SEGMENT_ALL_ACCESS SECTION_ALL_ACCESS
79
80 #define PAGE_NOACCESS 0x01
81 #define PAGE_READONLY 0x02
82 #define PAGE_READWRITE 0x04
83 #define PAGE_WRITECOPY 0x08
84 #define PAGE_EXECUTE 0x10
85 #define PAGE_EXECUTE_READ 0x20
86 #define PAGE_EXECUTE_READWRITE 0x40
87 #define PAGE_EXECUTE_WRITECOPY 0x80
88 #define PAGE_GUARD 0x100
89 #define PAGE_NOCACHE 0x200
90 #define PAGE_WRITECOMBINE 0x400
91
92 #define MEM_COMMIT 0x1000
93 #define MEM_RESERVE 0x2000
94 #define MEM_DECOMMIT 0x4000
95 #define MEM_RELEASE 0x8000
96 #define MEM_FREE 0x10000
97 #define MEM_PRIVATE 0x20000
98 #define MEM_MAPPED 0x40000
99 #define MEM_RESET 0x80000
100 #define MEM_TOP_DOWN 0x100000
101 #define MEM_LARGE_PAGES 0x20000000
102 #define MEM_4MB_PAGES 0x80000000
103
104 #define SEC_RESERVE 0x4000000
105 #define SEC_LARGE_PAGES 0x80000000
106
107 #define PROCESS_DUP_HANDLE (0x0040)
108
109 #if (NTDDI_VERSION >= NTDDI_VISTA)
110 #define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | \
111 0xFFFF)
112 #else
113 #define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | \
114 0xFFF)
115 #endif
116
117
118
119 //
120 // Processor features
121 //
122 #define PF_FLOATING_POINT_PRECISION_ERRATA 0
123 #define PF_FLOATING_POINT_EMULATED 1
124 #define PF_COMPARE_EXCHANGE_DOUBLE 2
125 #define PF_MMX_INSTRUCTIONS_AVAILABLE 3
126 #define PF_PPC_MOVEMEM_64BIT_OK 4
127 #define PF_ALPHA_BYTE_INSTRUCTIONS 5
128 #define PF_XMMI_INSTRUCTIONS_AVAILABLE 6
129 #define PF_3DNOW_INSTRUCTIONS_AVAILABLE 7
130 #define PF_RDTSC_INSTRUCTION_AVAILABLE 8
131 #define PF_PAE_ENABLED 9
132 #define PF_XMMI64_INSTRUCTIONS_AVAILABLE 10
133 #define PF_SSE_DAZ_MODE_AVAILABLE 11
134 #define PF_NX_ENABLED 12
135 #define PF_SSE3_INSTRUCTIONS_AVAILABLE 13
136 #define PF_COMPARE_EXCHANGE128 14
137 #define PF_COMPARE64_EXCHANGE128 15
138 #define PF_CHANNELS_ENABLED 16
139
140
141
142 //
143 // Intrinsics (note: taken from our winnt.h)
144 // FIXME: 64-bit
145 //
146 #if defined(__GNUC__)
147
148 static __inline__ BOOLEAN
149 InterlockedBitTestAndSet(IN LONG volatile *Base,
150 IN LONG Bit)
151 {
152 #if defined(_M_IX86)
153 LONG OldBit;
154 __asm__ __volatile__("lock "
155 "btsl %2,%1\n\t"
156 "sbbl %0,%0\n\t"
157 :"=r" (OldBit),"+m" (*Base)
158 :"Ir" (Bit)
159 : "memory");
160 return OldBit;
161 #else
162 return (_InterlockedOr(Base, 1 << Bit) >> Bit) & 1;
163 #endif
164 }
165
166 static __inline__ BOOLEAN
167 InterlockedBitTestAndReset(IN LONG volatile *Base,
168 IN LONG Bit)
169 {
170 #if defined(_M_IX86)
171 LONG OldBit;
172 __asm__ __volatile__("lock "
173 "btrl %2,%1\n\t"
174 "sbbl %0,%0\n\t"
175 :"=r" (OldBit),"+m" (*Base)
176 :"Ir" (Bit)
177 : "memory");
178 return OldBit;
179 #else
180 return (_InterlockedAnd(Base, ~(1 << Bit)) >> Bit) & 1;
181 #endif
182 }
183
184 static __inline__ BOOLEAN
185 BitScanReverse(OUT ULONG *Index,
186 IN ULONG Mask)
187 {
188 BOOLEAN BitPosition = 0;
189 #if defined(_M_IX86)
190 __asm__ __volatile__("bsrl %2,%0\n\t"
191 "setnz %1\n\t"
192 :"=&r" (*Index), "=q" (BitPosition)
193 :"rm" (Mask)
194 :"memory");
195 return BitPosition;
196 #else
197 /* Slow implementation for now */
198 for( *Index = 31; *Index; (*Index)-- ) {
199 if( (1<<*Index) & Mask ) {
200 return TRUE;
201 }
202 }
203
204 return FALSE;
205 #endif
206 }
207
208 #endif
209
210
211 #if defined(_M_IX86)
212 #define YieldProcessor() __asm__ __volatile__("pause");
213 #elif defined (_M_AMD64)
214 #define YieldProcessor() __asm__ __volatile__("pause");
215 #elif defined(_M_PPC)
216 #define YieldProcessor() __asm__ __volatile__("nop");
217 #elif defined(_M_MIPS)
218 #define YieldProcessor() __asm__ __volatile__("nop");
219 #elif defined(_M_ARM)
220 #define YieldProcessor()
221 #else
222 #error Unknown architecture
223 #endif
224
225
226
227 //
228 // Slist Header
229 //
230 #ifndef _SLIST_HEADER_
231 #define _SLIST_HEADER_
232
233 #define SLIST_ENTRY SINGLE_LIST_ENTRY
234 #define _SLIST_ENTRY _SINGLE_LIST_ENTRY
235 #define PSLIST_ENTRY PSINGLE_LIST_ENTRY
236
237 typedef union _SLIST_HEADER {
238 ULONGLONG Alignment;
239 struct {
240 SLIST_ENTRY Next;
241 USHORT Depth;
242 USHORT Sequence;
243 } DUMMYSTRUCTNAME;
244 } SLIST_HEADER, *PSLIST_HEADER;
245
246 #endif /* _SLIST_HEADER_ */
247
248
249
250 //
251 // Power States/Levels
252 //
253 typedef enum _SYSTEM_POWER_STATE {
254 PowerSystemUnspecified,
255 PowerSystemWorking,
256 PowerSystemSleeping1,
257 PowerSystemSleeping2,
258 PowerSystemSleeping3,
259 PowerSystemHibernate,
260 PowerSystemShutdown,
261 PowerSystemMaximum
262 } SYSTEM_POWER_STATE, *PSYSTEM_POWER_STATE;
263
264 #define POWER_SYSTEM_MAXIMUM PowerSystemMaximum
265
266 typedef enum _POWER_INFORMATION_LEVEL {
267 SystemPowerPolicyAc,
268 SystemPowerPolicyDc,
269 VerifySystemPolicyAc,
270 VerifySystemPolicyDc,
271 SystemPowerCapabilities,
272 SystemBatteryState,
273 SystemPowerStateHandler,
274 ProcessorStateHandler,
275 SystemPowerPolicyCurrent,
276 AdministratorPowerPolicy,
277 SystemReserveHiberFile,
278 ProcessorInformation,
279 SystemPowerInformation,
280 ProcessorStateHandler2,
281 LastWakeTime,
282 LastSleepTime,
283 SystemExecutionState,
284 SystemPowerStateNotifyHandler,
285 ProcessorPowerPolicyAc,
286 ProcessorPowerPolicyDc,
287 VerifyProcessorPowerPolicyAc,
288 VerifyProcessorPowerPolicyDc,
289 ProcessorPowerPolicyCurrent
290 } POWER_INFORMATION_LEVEL;
291
292 typedef enum {
293 PowerActionNone,
294 PowerActionReserved,
295 PowerActionSleep,
296 PowerActionHibernate,
297 PowerActionShutdown,
298 PowerActionShutdownReset,
299 PowerActionShutdownOff,
300 PowerActionWarmEject
301 } POWER_ACTION, *PPOWER_ACTION;
302
303 typedef enum _DEVICE_POWER_STATE {
304 PowerDeviceUnspecified,
305 PowerDeviceD0,
306 PowerDeviceD1,
307 PowerDeviceD2,
308 PowerDeviceD3,
309 PowerDeviceMaximum
310 } DEVICE_POWER_STATE, *PDEVICE_POWER_STATE;
311
312 #define ES_SYSTEM_REQUIRED 0x00000001
313 #define ES_DISPLAY_REQUIRED 0x00000002
314 #define ES_USER_PRESENT 0x00000004
315 #define ES_CONTINUOUS 0x80000000
316
317 typedef ULONG EXECUTION_STATE;
318
319 typedef enum {
320 LT_DONT_CARE,
321 LT_LOWEST_LATENCY
322 } LATENCY_TIME;
323
324
325
326 //
327 // Access/Security Stuff
328 //
329 typedef ULONG ACCESS_MASK, *PACCESS_MASK;
330 typedef PVOID PACCESS_TOKEN;
331
332 #define DELETE 0x00010000L
333 #define READ_CONTROL 0x00020000L
334 #define WRITE_DAC 0x00040000L
335 #define WRITE_OWNER 0x00080000L
336 #define SYNCHRONIZE 0x00100000L
337 #define STANDARD_RIGHTS_REQUIRED 0x000F0000L
338 #define STANDARD_RIGHTS_READ READ_CONTROL
339 #define STANDARD_RIGHTS_WRITE READ_CONTROL
340 #define STANDARD_RIGHTS_EXECUTE READ_CONTROL
341 #define STANDARD_RIGHTS_ALL 0x001F0000L
342 #define SPECIFIC_RIGHTS_ALL 0x0000FFFFL
343 #define ACCESS_SYSTEM_SECURITY 0x01000000L
344 #define MAXIMUM_ALLOWED 0x02000000L
345 #define GENERIC_READ 0x80000000L
346 #define GENERIC_WRITE 0x40000000L
347 #define GENERIC_EXECUTE 0x20000000L
348 #define GENERIC_ALL 0x10000000L
349
350 typedef struct _GENERIC_MAPPING {
351 ACCESS_MASK GenericRead;
352 ACCESS_MASK GenericWrite;
353 ACCESS_MASK GenericExecute;
354 ACCESS_MASK GenericAll;
355 } GENERIC_MAPPING, *PGENERIC_MAPPING;
356
357 #define ACL_REVISION 2
358 #define ACL_REVISION_DS 4
359
360 #define ACL_REVISION1 1
361 #define ACL_REVISION2 2
362 #define ACL_REVISION3 3
363 #define ACL_REVISION4 4
364 #define MIN_ACL_REVISION ACL_REVISION2
365 #define MAX_ACL_REVISION ACL_REVISION4
366
367 typedef struct _ACL {
368 UCHAR AclRevision;
369 UCHAR Sbz1;
370 USHORT AclSize;
371 USHORT AceCount;
372 USHORT Sbz2;
373 } ACL, *PACL;
374
375
376
377 //
378 // Current security descriptor revision value
379 //
380 #define SECURITY_DESCRIPTOR_REVISION (1)
381 #define SECURITY_DESCRIPTOR_REVISION1 (1)
382
383 //
384 // Privilege attributes
385 //
386 #define SE_PRIVILEGE_ENABLED_BY_DEFAULT (0x00000001L)
387 #define SE_PRIVILEGE_ENABLED (0x00000002L)
388 #define SE_PRIVILEGE_REMOVED (0X00000004L)
389 #define SE_PRIVILEGE_USED_FOR_ACCESS (0x80000000L)
390
391 #define SE_PRIVILEGE_VALID_ATTRIBUTES (SE_PRIVILEGE_ENABLED_BY_DEFAULT | \
392 SE_PRIVILEGE_ENABLED | \
393 SE_PRIVILEGE_REMOVED | \
394 SE_PRIVILEGE_USED_FOR_ACCESS)
395
396 #include <pshpack4.h>
397 typedef struct _LUID_AND_ATTRIBUTES {
398 LUID Luid;
399 ULONG Attributes;
400 } LUID_AND_ATTRIBUTES, *PLUID_AND_ATTRIBUTES;
401 #include <poppack.h>
402 typedef LUID_AND_ATTRIBUTES LUID_AND_ATTRIBUTES_ARRAY[ANYSIZE_ARRAY];
403 typedef LUID_AND_ATTRIBUTES_ARRAY *PLUID_AND_ATTRIBUTES_ARRAY;
404
405
406
407 //
408 // Privilege sets
409 //
410 #define PRIVILEGE_SET_ALL_NECESSARY (1)
411
412 typedef struct _PRIVILEGE_SET {
413 ULONG PrivilegeCount;
414 ULONG Control;
415 LUID_AND_ATTRIBUTES Privilege[ANYSIZE_ARRAY];
416 } PRIVILEGE_SET,*PPRIVILEGE_SET;
417
418 typedef enum _SECURITY_IMPERSONATION_LEVEL {
419 SecurityAnonymous,
420 SecurityIdentification,
421 SecurityImpersonation,
422 SecurityDelegation
423 } SECURITY_IMPERSONATION_LEVEL, * PSECURITY_IMPERSONATION_LEVEL;
424
425 #define SECURITY_MAX_IMPERSONATION_LEVEL SecurityDelegation
426 #define SECURITY_MIN_IMPERSONATION_LEVEL SecurityAnonymous
427 #define DEFAULT_IMPERSONATION_LEVEL SecurityImpersonation
428 #define VALID_IMPERSONATION_LEVEL(Level) (((Level) >= SECURITY_MIN_IMPERSONATION_LEVEL) && ((Level) <= SECURITY_MAX_IMPERSONATION_LEVEL))
429
430 #define SECURITY_DYNAMIC_TRACKING (TRUE)
431 #define SECURITY_STATIC_TRACKING (FALSE)
432
433 typedef BOOLEAN SECURITY_CONTEXT_TRACKING_MODE, *PSECURITY_CONTEXT_TRACKING_MODE;
434
435 typedef struct _SECURITY_QUALITY_OF_SERVICE {
436 ULONG Length;
437 SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
438 SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode;
439 BOOLEAN EffectiveOnly;
440 } SECURITY_QUALITY_OF_SERVICE, *PSECURITY_QUALITY_OF_SERVICE;
441
442 typedef struct _SE_IMPERSONATION_STATE {
443 PACCESS_TOKEN Token;
444 BOOLEAN CopyOnOpen;
445 BOOLEAN EffectiveOnly;
446 SECURITY_IMPERSONATION_LEVEL Level;
447 } SE_IMPERSONATION_STATE, *PSE_IMPERSONATION_STATE;
448
449 #define OWNER_SECURITY_INFORMATION (0x00000001L)
450 #define GROUP_SECURITY_INFORMATION (0x00000002L)
451 #define DACL_SECURITY_INFORMATION (0x00000004L)
452 #define SACL_SECURITY_INFORMATION (0x00000008L)
453 #define LABEL_SECURITY_INFORMATION (0x00000010L)
454
455 #define PROTECTED_DACL_SECURITY_INFORMATION (0x80000000L)
456 #define PROTECTED_SACL_SECURITY_INFORMATION (0x40000000L)
457 #define UNPROTECTED_DACL_SECURITY_INFORMATION (0x20000000L)
458 #define UNPROTECTED_SACL_SECURITY_INFORMATION (0x10000000L)
459
460
461
462 //
463 // Registry Access Rights
464 //
465 #define KEY_QUERY_VALUE (0x0001)
466 #define KEY_SET_VALUE (0x0002)
467 #define KEY_CREATE_SUB_KEY (0x0004)
468 #define KEY_ENUMERATE_SUB_KEYS (0x0008)
469 #define KEY_NOTIFY (0x0010)
470 #define KEY_CREATE_LINK (0x0020)
471 #define KEY_WOW64_32KEY (0x0200)
472 #define KEY_WOW64_64KEY (0x0100)
473 #define KEY_WOW64_RES (0x0300)
474
475 #define KEY_READ ((STANDARD_RIGHTS_READ |\
476 KEY_QUERY_VALUE |\
477 KEY_ENUMERATE_SUB_KEYS |\
478 KEY_NOTIFY) \
479 & \
480 (~SYNCHRONIZE))
481
482 #define KEY_WRITE ((STANDARD_RIGHTS_WRITE |\
483 KEY_SET_VALUE |\
484 KEY_CREATE_SUB_KEY) \
485 & \
486 (~SYNCHRONIZE))
487
488 #define KEY_EXECUTE ((KEY_READ) \
489 & \
490 (~SYNCHRONIZE))
491
492 #define KEY_ALL_ACCESS ((STANDARD_RIGHTS_ALL |\
493 KEY_QUERY_VALUE |\
494 KEY_SET_VALUE |\
495 KEY_CREATE_SUB_KEY |\
496 KEY_ENUMERATE_SUB_KEYS |\
497 KEY_NOTIFY |\
498 KEY_CREATE_LINK) \
499 & \
500 (~SYNCHRONIZE))
501
502 //
503 // Registry Open/Create Options
504 //
505 #define REG_OPTION_RESERVED (0x00000000L)
506 #define REG_OPTION_NON_VOLATILE (0x00000000L)
507 #define REG_OPTION_VOLATILE (0x00000001L)
508 #define REG_OPTION_CREATE_LINK (0x00000002L)
509 #define REG_OPTION_BACKUP_RESTORE (0x00000004L)
510 #define REG_OPTION_OPEN_LINK (0x00000008L)
511
512 #define REG_LEGAL_OPTION \
513 (REG_OPTION_RESERVED |\
514 REG_OPTION_NON_VOLATILE |\
515 REG_OPTION_VOLATILE |\
516 REG_OPTION_CREATE_LINK |\
517 REG_OPTION_BACKUP_RESTORE |\
518 REG_OPTION_OPEN_LINK)
519
520 //
521 // Key creation/open disposition
522 //
523 #define REG_CREATED_NEW_KEY (0x00000001L)
524 #define REG_OPENED_EXISTING_KEY (0x00000002L)
525
526 //
527 // Key restore & hive load flags
528 //
529 #define REG_WHOLE_HIVE_VOLATILE (0x00000001L)
530 #define REG_REFRESH_HIVE (0x00000002L)
531 #define REG_NO_LAZY_FLUSH (0x00000004L)
532 #define REG_FORCE_RESTORE (0x00000008L)
533 #define REG_APP_HIVE (0x00000010L)
534 #define REG_PROCESS_PRIVATE (0x00000020L)
535 #define REG_START_JOURNAL (0x00000040L)
536 #define REG_HIVE_EXACT_FILE_GROWTH (0x00000080L)
537 #define REG_HIVE_NO_RM (0x00000100L)
538 #define REG_HIVE_SINGLE_LOG (0x00000200L)
539
540 //
541 // Unload Flags
542 //
543 #define REG_FORCE_UNLOAD 1
544
545 //
546 // Notify Filter Values
547 //
548 #define REG_NOTIFY_CHANGE_NAME (0x00000001L)
549 #define REG_NOTIFY_CHANGE_ATTRIBUTES (0x00000002L)
550 #define REG_NOTIFY_CHANGE_LAST_SET (0x00000004L)
551 #define REG_NOTIFY_CHANGE_SECURITY (0x00000008L)
552
553 #define REG_LEGAL_CHANGE_FILTER \
554 (REG_NOTIFY_CHANGE_NAME |\
555 REG_NOTIFY_CHANGE_ATTRIBUTES |\
556 REG_NOTIFY_CHANGE_LAST_SET |\
557 REG_NOTIFY_CHANGE_SECURITY)
558
559
560
561 //
562 // Thread Access Rights
563 //
564 #define THREAD_TERMINATE (0x0001)
565 #define THREAD_SUSPEND_RESUME (0x0002)
566 #define THREAD_ALERT (0x0004)
567 #define THREAD_GET_CONTEXT (0x0008)
568 #define THREAD_SET_CONTEXT (0x0010)
569 #define THREAD_SET_INFORMATION (0x0020)
570 #define THREAD_SET_LIMITED_INFORMATION (0x0400)
571 #define THREAD_QUERY_LIMITED_INFORMATION (0x0800)
572 #if (NTDDI_VERSION >= NTDDI_VISTA)
573 #define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | \
574 0xFFFF)
575 #else
576 #define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | \
577 0x3FF)
578 #endif
579
580 //
581 // Service Start Types
582 //
583 #define SERVICE_BOOT_START 0x00000000
584 #define SERVICE_SYSTEM_START 0x00000001
585 #define SERVICE_AUTO_START 0x00000002
586 #define SERVICE_DEMAND_START 0x00000003
587 #define SERVICE_DISABLED 0x00000004
588
589 //
590 // Exception Records
591 //
592 #define EXCEPTION_NONCONTINUABLE 1
593 #define EXCEPTION_MAXIMUM_PARAMETERS 15
594
595 typedef struct _EXCEPTION_RECORD {
596 NTSTATUS ExceptionCode;
597 ULONG ExceptionFlags;
598 struct _EXCEPTION_RECORD *ExceptionRecord;
599 PVOID ExceptionAddress;
600 ULONG NumberParameters;
601 ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
602 } EXCEPTION_RECORD, *PEXCEPTION_RECORD;
603
604 typedef struct _EXCEPTION_RECORD32 {
605 NTSTATUS ExceptionCode;
606 ULONG ExceptionFlags;
607 ULONG ExceptionRecord;
608 ULONG ExceptionAddress;
609 ULONG NumberParameters;
610 ULONG ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
611 } EXCEPTION_RECORD32, *PEXCEPTION_RECORD32;
612
613 typedef struct _EXCEPTION_RECORD64 {
614 NTSTATUS ExceptionCode;
615 ULONG ExceptionFlags;
616 ULONG64 ExceptionRecord;
617 ULONG64 ExceptionAddress;
618 ULONG NumberParameters;
619 ULONG __unusedAlignment;
620 ULONG64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
621 } EXCEPTION_RECORD64, *PEXCEPTION_RECORD64;
622
623 typedef struct _EXCEPTION_POINTERS {
624 PEXCEPTION_RECORD ExceptionRecord;
625 PCONTEXT ContextRecord;
626 } EXCEPTION_POINTERS, *PEXCEPTION_POINTERS;
627
628
629
630 //
631 // Process Qoutas
632 //
633 typedef struct _QUOTA_LIMITS {
634 SIZE_T PagedPoolLimit;
635 SIZE_T NonPagedPoolLimit;
636 SIZE_T MinimumWorkingSetSize;
637 SIZE_T MaximumWorkingSetSize;
638 SIZE_T PagefileLimit;
639 LARGE_INTEGER TimeLimit;
640 } QUOTA_LIMITS, *PQUOTA_LIMITS;
641
642 #define QUOTA_LIMITS_HARDWS_MIN_ENABLE 0x00000001
643 #define QUOTA_LIMITS_HARDWS_MIN_DISABLE 0x00000002
644 #define QUOTA_LIMITS_HARDWS_MAX_ENABLE 0x00000004
645 #define QUOTA_LIMITS_HARDWS_MAX_DISABLE 0x00000008
646 #define QUOTA_LIMITS_USE_DEFAULT_LIMITS 0x00000010
647
648
649
650 #endif // _WDMDDK_