ReactOS 0.4.15-dev-5669-g09dde2c
nt_native.h
Go to the documentation of this file.
1
2// Copyright (C) Alexander Telyatnikov, Ivan Keliukh, Yegor Anchishkin, SKIF Software, 1999-2013. Kiev, Ukraine
3// All rights reserved
4// This file was released under the GPLv2 on June 2015.
6
7//======================================================================
8//
9// NT_Native.h
10//
11//======================================================================
12
13#ifndef __NT_NATIVE_DEFS__H__
14#define __NT_NATIVE_DEFS__H__
15
16#ifdef __cplusplus
17extern "C" {
18#endif //__cplusplus
19
20#include <excpt.h>
21#include <ntdef.h>
22#include <ntstatus.h>
23#include <string.h>
24#include <DEVIOCTL.H>
25#include <NTDDSTOR.H>
26#include <NTDDDISK.H>
27
28typedef struct _KTHREAD *PKTHREAD;
29typedef struct _ETHREAD *PETHREAD;
30typedef struct _EPROCESS *PEPROCESS;
31typedef struct _PEB *PPEB;
32typedef struct _KINTERRUPT *PKINTERRUPT;
33typedef struct _IO_TIMER *PIO_TIMER;
34typedef struct _OBJECT_TYPE *POBJECT_TYPE;
36typedef struct _DEVICE_HANDLER_OBJECT *PDEVICE_HANDLER_OBJECT;
37typedef struct _BUS_HANDLER *PBUS_HANDLER;
38
39
42
43#define BOOL BOOLEAN
44#define DWORD ULONG
45#define LPVOID PVOID
46#define LPDWORD PULONG
47
48#define APIENTRY __stdcall
49
50#define FASTCALL _fastcall
51
52// end_winnt
53//
54// The following are masks for the predefined standard access types
55//
56
57#define DELETE (0x00010000L)
58#define READ_CONTROL (0x00020000L)
59#define WRITE_DAC (0x00040000L)
60#define WRITE_OWNER (0x00080000L)
61#define SYNCHRONIZE (0x00100000L)
62
63#define STANDARD_RIGHTS_REQUIRED (0x000F0000L)
64
65#define STANDARD_RIGHTS_READ (READ_CONTROL)
66#define STANDARD_RIGHTS_WRITE (READ_CONTROL)
67#define STANDARD_RIGHTS_EXECUTE (READ_CONTROL)
68
69#define STANDARD_RIGHTS_ALL (0x001F0000L)
70
71#define SPECIFIC_RIGHTS_ALL (0x0000FFFFL)
72
73//
74// AccessSystemAcl access type
75//
76
77#define ACCESS_SYSTEM_SECURITY (0x01000000L)
78
79//
80// MaximumAllowed access type
81//
82
83#define MAXIMUM_ALLOWED (0x02000000L)
84
85//
86// These are the generic rights.
87//
88
89#define GENERIC_READ (0x80000000L)
90#define GENERIC_WRITE (0x40000000L)
91#define GENERIC_EXECUTE (0x20000000L)
92#define GENERIC_ALL (0x10000000L)
93
94
95//
96// Subroutines for dealing with the Registry
97//
98
106 );
107
116
118
119
120//
121// The following flags specify how the Name field of a RTL_QUERY_REGISTRY_TABLE
122// entry is interpreted. A NULL name indicates the end of the table.
123//
124
125#define RTL_QUERY_REGISTRY_SUBKEY 0x00000001 // Name is a subkey and remainder of
126 // table or until next subkey are value
127 // names for that subkey to look at.
128
129#define RTL_QUERY_REGISTRY_TOPKEY 0x00000002 // Reset current key to original key for
130 // this and all following table entries.
131
132#define RTL_QUERY_REGISTRY_REQUIRED 0x00000004 // Fail if no match found for this table
133 // entry.
134
135#define RTL_QUERY_REGISTRY_NOVALUE 0x00000008 // Used to mark a table entry that has no
136 // value name, just wants a call out, not
137 // an enumeration of all values.
138
139#define RTL_QUERY_REGISTRY_NOEXPAND 0x00000010 // Used to suppress the expansion of
140 // REG_MULTI_SZ into multiple callouts or
141 // to prevent the expansion of environment
142 // variable values in REG_EXPAND_SZ
143
144#define RTL_QUERY_REGISTRY_DIRECT 0x00000020 // QueryRoutine field ignored. EntryContext
145 // field points to location to store value.
146 // For null terminated strings, EntryContext
147 // points to UNICODE_STRING structure that
148 // that describes maximum size of buffer.
149 // If .Buffer field is NULL then a buffer is
150 // allocated.
151 //
152
153#define RTL_QUERY_REGISTRY_DELETE 0x00000040 // Used to delete value keys after they
154 // are queried.
155
156//
157// The following values for the RelativeTo parameter determine what the
158// Path parameter to RtlQueryRegistryValues is relative to.
159//
160
161#define RTL_REGISTRY_ABSOLUTE 0 // Path is a full path
162#define RTL_REGISTRY_SERVICES 1 // \Registry\Machine\System\CurrentControlSet\Services
163#define RTL_REGISTRY_CONTROL 2 // \Registry\Machine\System\CurrentControlSet\Control
164#define RTL_REGISTRY_WINDOWS_NT 3 // \Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion
165#define RTL_REGISTRY_DEVICEMAP 4 // \Registry\Machine\Hardware\DeviceMap
166#define RTL_REGISTRY_USER 5 // \Registry\User\CurrentUser
167#define RTL_REGISTRY_MAXIMUM 6
168#define RTL_REGISTRY_HANDLE 0x40000000 // Low order bits are registry handle
169#define RTL_REGISTRY_OPTIONAL 0x80000000 // Indicates the key node is optional
170
171
172
175NTAPI
177 PCSZ String,
178 ULONG Base,
180 );
181
184NTAPI
186 ULONG Value,
187 ULONG Base,
189 );
190
193NTAPI
196 ULONG Base,
198 );
199
200
201//
202// String manipulation routines
203//
204
205#ifdef _NTSYSTEM_
206
207#define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
208#define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
209
210#else
211
212#define NLS_MB_CODE_PAGE_TAG (*NlsMbCodePageTag)
213#define NLS_MB_OEM_CODE_PAGE_TAG (*NlsMbOemCodePageTag)
214
215#endif // _NTSYSTEM_
216
217extern BOOLEAN NLS_MB_CODE_PAGE_TAG; // TRUE -> Multibyte CP, FALSE -> Singlebyte
218extern BOOLEAN NLS_MB_OEM_CODE_PAGE_TAG; // TRUE -> Multibyte CP, FALSE -> Singlebyte
219
221VOID
222NTAPI
226 );
227
229VOID
230NTAPI
234 );
235
237VOID
238NTAPI
242 );
243
244
246VOID
247NTAPI
251 );
252
254CHAR
255NTAPI
257 CHAR Character
258 );
259
261LONG
262NTAPI
264 PSTRING String1,
267 );
268
271NTAPI
273 PSTRING String1,
276 );
277
278
280VOID
281NTAPI
285 );
286
287//
288// NLS String functions
289//
290
293NTAPI
298 );
299
300
303NTAPI
308 );
309
310
312LONG
313NTAPI
315 PUNICODE_STRING String1,
318 );
319
322NTAPI
324 PUNICODE_STRING String1,
327 );
328
331NTAPI
333 IN PUNICODE_STRING String1,
336 );
337
340NTAPI
345 );
346
347
349VOID
350NTAPI
354 );
355
358NTAPI
362 );
363
366NTAPI
370 );
371
372
374VOID
375NTAPI
378 );
379
381VOID
382NTAPI
385 );
386
387
389ULONG
390NTAPI
393 );
394
395//
396// NTSYSAPI
397// ULONG
398// NTAPI
399// RtlAnsiStringToUnicodeSize(
400// PANSI_STRING AnsiString
401// );
402//
403
404#define RtlAnsiStringToUnicodeSize(STRING) ( \
405 NLS_MB_CODE_PAGE_TAG ? \
406 RtlxAnsiStringToUnicodeSize(STRING) : \
407 ((STRING)->Length + sizeof((UCHAR)NULL)) * sizeof(WCHAR) \
408)
409
410#if DBG
412VOID
413NTAPI
415 PVOID FailedAssertion,
419 );
420
421#define ASSERT( exp ) \
422 if (!(exp)) \
423 RtlAssert( #exp, __FILE__, __LINE__, NULL )
424
425#define ASSERTMSG( msg, exp ) \
426 if (!(exp)) \
427 RtlAssert( #exp, __FILE__, __LINE__, msg )
428
429#else
430#define ASSERT( exp )
431#define ASSERTMSG( msg, exp )
432#endif // DBG
433
434//
435// Fast primitives to compare, move, and zero memory
436//
437
438// begin_winnt begin_ntndis
439#if defined(_M_IX86) || defined(_M_MRX000) || defined(_M_ALPHA)
440
441#if defined(_M_MRX000)
443ULONG
444NTAPI
446 CONST VOID *Source1,
447 CONST VOID *Source2,
449 );
450
451#else
452#define RtlEqualMemory(Destination,Source,Length) (!memcmp((Destination),(Source),(Length)))
453#endif
454
455#define RtlMoveMemory(Destination,Source,Length) memmove((Destination),(Source),(Length))
456#define RtlCopyMemory(Destination,Source,Length) memcpy((Destination),(Source),(Length))
457#define RtlFillMemory(Destination,Length,Fill) memset((Destination),(Fill),(Length))
458#define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length))
459
460#else // _M_PPC
461
463ULONG
464NTAPI
466 CONST VOID *Source1,
467 CONST VOID *Source2,
469 );
470
472VOID
473NTAPI
478 );
479
481VOID
482NTAPI
487 );
488
490VOID
491NTAPI
496 );
497
499VOID
500NTAPI
504 UCHAR Fill
505 );
506
508VOID
509NTAPI
513 );
514#endif
515// end_winnt end_ntndis
516
518ULONG
519NTAPI
521 PVOID Source1,
522 PVOID Source2,
524 );
525
526typedef struct _TIME_FIELDS {
527 CSHORT Year; // range [1601...]
528 CSHORT Month; // range [1..12]
529 CSHORT Day; // range [1..31]
530 CSHORT Hour; // range [0..23]
531 CSHORT Minute; // range [0..59]
532 CSHORT Second; // range [0..59]
533 CSHORT Milliseconds;// range [0..999]
534 CSHORT Weekday; // range [0..6] == [Sunday..Saturday]
537
538
540VOID
541NTAPI
545 );
546
547//
548// A time field record (Weekday ignored) -> 64 bit Time value
549//
550
553NTAPI
557 );
558
559//
560// Define the generic mapping array. This is used to denote the
561// mapping of each generic access right to a specific access mask.
562//
563
564typedef struct _GENERIC_MAPPING {
571
572//
573// Define the various device type values. Note that values used by Microsoft
574// Corporation are in the range 0-32767, and 32768-65535 are reserved for use
575// by customers.
576//
577
578#define DEVICE_TYPE ULONG
579
580//
581// Macro definition for defining IOCTL and FSCTL function control codes. Note
582// that function codes 0-2047 are reserved for Microsoft Corporation, and
583// 2048-4095 are reserved for customers.
584//
585
586#define CTL_CODE( DeviceType, Function, Method, Access ) ( \
587 ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
588)
589
590//
591// Define the method codes for how buffers are passed for I/O and FS controls
592//
593
594#define METHOD_BUFFERED 0
595#define METHOD_IN_DIRECT 1
596#define METHOD_OUT_DIRECT 2
597#define METHOD_NEITHER 3
598
599//
600// Define the access check value for any access
601//
602//
603// The FILE_READ_ACCESS and FILE_WRITE_ACCESS constants are also defined in
604// ntioapi.h as FILE_READ_DATA and FILE_WRITE_DATA. The values for these
605// constants *MUST* always be in sync.
606//
607
608
609#define FILE_ANY_ACCESS 0
610#define FILE_READ_ACCESS ( 0x0001 ) // file & pipe
611#define FILE_WRITE_ACCESS ( 0x0002 ) // file & pipe
612
613
614// begin_winnt
615
616//
617// Define access rights to files and directories
618//
619
620//
621// The FILE_READ_DATA and FILE_WRITE_DATA constants are also defined in
622// devioctl.h as FILE_READ_ACCESS and FILE_WRITE_ACCESS. The values for these
623// constants *MUST* always be in sync.
624// The values are redefined in devioctl.h because they must be available to
625// both DOS and NT.
626//
627
628#define FILE_READ_DATA ( 0x0001 ) // file & pipe
629#define FILE_LIST_DIRECTORY ( 0x0001 ) // directory
630
631#define FILE_WRITE_DATA ( 0x0002 ) // file & pipe
632#define FILE_ADD_FILE ( 0x0002 ) // directory
633
634#define FILE_APPEND_DATA ( 0x0004 ) // file
635#define FILE_ADD_SUBDIRECTORY ( 0x0004 ) // directory
636#define FILE_CREATE_PIPE_INSTANCE ( 0x0004 ) // named pipe
637
638#define FILE_READ_EA ( 0x0008 ) // file & directory
639
640#define FILE_WRITE_EA ( 0x0010 ) // file & directory
641
642#define FILE_EXECUTE ( 0x0020 ) // file
643#define FILE_TRAVERSE ( 0x0020 ) // directory
644
645#define FILE_DELETE_CHILD ( 0x0040 ) // directory
646
647#define FILE_READ_ATTRIBUTES ( 0x0080 ) // all
648
649#define FILE_WRITE_ATTRIBUTES ( 0x0100 ) // all
650
651#define FILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF)
652
653#define FILE_GENERIC_READ (STANDARD_RIGHTS_READ |\
654 FILE_READ_DATA |\
655 FILE_READ_ATTRIBUTES |\
656 FILE_READ_EA |\
657 SYNCHRONIZE)
658
659
660#define FILE_GENERIC_WRITE (STANDARD_RIGHTS_WRITE |\
661 FILE_WRITE_DATA |\
662 FILE_WRITE_ATTRIBUTES |\
663 FILE_WRITE_EA |\
664 FILE_APPEND_DATA |\
665 SYNCHRONIZE)
666
667
668#define FILE_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE |\
669 FILE_READ_ATTRIBUTES |\
670 FILE_EXECUTE |\
671 SYNCHRONIZE)
672
673// end_winnt
674
675
676//
677// Define share access rights to files and directories
678//
679
680#define FILE_SHARE_READ 0x00000001 // winnt
681#define FILE_SHARE_WRITE 0x00000002 // winnt
682#define FILE_SHARE_DELETE 0x00000004 // winnt
683#define FILE_SHARE_VALID_FLAGS 0x00000007
684
685//
686// Define the file attributes values
687//
688// Note: 0x00000008 is reserved for use for the old DOS VOLID (volume ID)
689// and is therefore not considered valid in NT.
690//
691// Note: 0x00000010 is reserved for use for the old DOS SUBDIRECTORY flag
692// and is therefore not considered valid in NT. This flag has
693// been disassociated with file attributes since the other flags are
694// protected with READ_ and WRITE_ATTRIBUTES access to the file.
695//
696// Note: Note also that the order of these flags is set to allow both the
697// FAT and the Pinball File Systems to directly set the attributes
698// flags in attributes words without having to pick each flag out
699// individually. The order of these flags should not be changed!
700//
701
702#define FILE_ATTRIBUTE_READONLY 0x00000001 // winnt
703#define FILE_ATTRIBUTE_HIDDEN 0x00000002 // winnt
704#define FILE_ATTRIBUTE_SYSTEM 0x00000004 // winnt
705#define FILE_ATTRIBUTE_DIRECTORY 0x00000010 // winnt
706#define FILE_ATTRIBUTE_ARCHIVE 0x00000020 // winnt
707#define FILE_ATTRIBUTE_NORMAL 0x00000080 // winnt
708#define FILE_ATTRIBUTE_TEMPORARY 0x00000100 // winnt
709#define FILE_ATTRIBUTE_RESERVED0 0x00000200
710#define FILE_ATTRIBUTE_RESERVED1 0x00000400
711#define FILE_ATTRIBUTE_COMPRESSED 0x00000800 // winnt
712#define FILE_ATTRIBUTE_OFFLINE 0x00001000 // winnt
713#define FILE_ATTRIBUTE_PROPERTY_SET 0x00002000
714#define FILE_ATTRIBUTE_VALID_FLAGS 0x00003fb7
715#define FILE_ATTRIBUTE_VALID_SET_FLAGS 0x00003fa7
716
717//
718// Define the create disposition values
719//
720
721#define FILE_SUPERSEDE 0x00000000
722#define FILE_OPEN 0x00000001
723#define FILE_CREATE 0x00000002
724#define FILE_OPEN_IF 0x00000003
725#define FILE_OVERWRITE 0x00000004
726#define FILE_OVERWRITE_IF 0x00000005
727#define FILE_MAXIMUM_DISPOSITION 0x00000005
728
729
730//
731// Define the create/open option flags
732//
733
734#define FILE_DIRECTORY_FILE 0x00000001
735#define FILE_WRITE_THROUGH 0x00000002
736#define FILE_SEQUENTIAL_ONLY 0x00000004
737#define FILE_NO_INTERMEDIATE_BUFFERING 0x00000008
738
739#define FILE_SYNCHRONOUS_IO_ALERT 0x00000010
740#define FILE_SYNCHRONOUS_IO_NONALERT 0x00000020
741#define FILE_NON_DIRECTORY_FILE 0x00000040
742#define FILE_CREATE_TREE_CONNECTION 0x00000080
743
744#define FILE_COMPLETE_IF_OPLOCKED 0x00000100
745#define FILE_NO_EA_KNOWLEDGE 0x00000200
746//UNUSED 0x00000400
747#define FILE_RANDOM_ACCESS 0x00000800
748
749#define FILE_DELETE_ON_CLOSE 0x00001000
750#define FILE_OPEN_BY_FILE_ID 0x00002000
751#define FILE_OPEN_FOR_BACKUP_INTENT 0x00004000
752#define FILE_NO_COMPRESSION 0x00008000
753
754
755#define FILE_RESERVE_OPFILTER 0x00100000
756#define FILE_TRANSACTED_MODE 0x00200000
757#define FILE_OPEN_OFFLINE_FILE 0x00400000
758
759#define FILE_VALID_OPTION_FLAGS 0x007fffff
760#define FILE_VALID_PIPE_OPTION_FLAGS 0x00000032
761#define FILE_VALID_MAILSLOT_OPTION_FLAGS 0x00000032
762#define FILE_VALID_SET_FLAGS 0x00000036
763
764//
765// Define the I/O status information return values for NtCreateFile/NtOpenFile
766//
767
768#define FILE_SUPERSEDED 0x00000000
769#define FILE_OPENED 0x00000001
770#define FILE_CREATED 0x00000002
771#define FILE_OVERWRITTEN 0x00000003
772#define FILE_EXISTS 0x00000004
773#define FILE_DOES_NOT_EXIST 0x00000005
774
775//
776// Define special ByteOffset parameters for read and write operations
777//
778
779#define FILE_WRITE_TO_END_OF_FILE 0xffffffff
780#define FILE_USE_FILE_POINTER_POSITION 0xfffffffe
781
782//
783// Define alignment requirement values
784//
785
786#define FILE_BYTE_ALIGNMENT 0x00000000
787#define FILE_WORD_ALIGNMENT 0x00000001
788#define FILE_LONG_ALIGNMENT 0x00000003
789#define FILE_QUAD_ALIGNMENT 0x00000007
790#define FILE_OCTA_ALIGNMENT 0x0000000f
791#define FILE_32_BYTE_ALIGNMENT 0x0000001f
792#define FILE_64_BYTE_ALIGNMENT 0x0000003f
793#define FILE_128_BYTE_ALIGNMENT 0x0000007f
794#define FILE_256_BYTE_ALIGNMENT 0x000000ff
795#define FILE_512_BYTE_ALIGNMENT 0x000001ff
796
797//
798// Define the maximum length of a filename string
799//
800
801#define MAXIMUM_FILENAME_LENGTH 256
802
803//
804// Define the various device characteristics flags
805//
806
807#define FILE_REMOVABLE_MEDIA 0x00000001
808#define FILE_READ_ONLY_DEVICE 0x00000002
809#define FILE_FLOPPY_DISKETTE 0x00000004
810#define FILE_WRITE_ONCE_MEDIA 0x00000008
811#define FILE_REMOTE_DEVICE 0x00000010
812#define FILE_DEVICE_IS_MOUNTED 0x00000020
813#define FILE_VIRTUAL_VOLUME 0x00000040
814
815#ifndef _FILESYSTEMFSCTL_
816#define _FILESYSTEMFSCTL_
817
818#endif // _FILESYSTEMFSCTL_
819
820//
821// The following is a list of the native file system fsctls followed by
822// additional network file system fsctls. Some values have been
823// decommissioned.
824//
825
826#define FSCTL_REQUEST_OPLOCK_LEVEL_1 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
827#define FSCTL_REQUEST_OPLOCK_LEVEL_2 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
828#define FSCTL_REQUEST_BATCH_OPLOCK CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
829#define FSCTL_OPLOCK_BREAK_ACKNOWLEDGE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
830#define FSCTL_OPBATCH_ACK_CLOSE_PENDING CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
831#define FSCTL_OPLOCK_BREAK_NOTIFY CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
832#define FSCTL_LOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
833#define FSCTL_UNLOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
834#define FSCTL_DISMOUNT_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
835// decommissioned fsctl value 9
836#define FSCTL_IS_VOLUME_MOUNTED CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
837#define FSCTL_IS_PATHNAME_VALID CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 11, METHOD_BUFFERED, FILE_ANY_ACCESS) // PATHNAME_BUFFER,
838#define FSCTL_MARK_VOLUME_DIRTY CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
839// decommissioned fsctl value 13
840#define FSCTL_QUERY_RETRIEVAL_POINTERS CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 14, METHOD_NEITHER, FILE_ANY_ACCESS)
841#define FSCTL_GET_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 15, METHOD_BUFFERED, FILE_ANY_ACCESS)
842#define FSCTL_SET_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 16, METHOD_BUFFERED, FILE_READ_DATA | FILE_WRITE_DATA)
843// decommissioned fsctl value 17
844// decommissioned fsctl value 18
845#define FSCTL_MARK_AS_SYSTEM_HIVE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 19, METHOD_NEITHER, FILE_ANY_ACCESS)
846#define FSCTL_OPLOCK_BREAK_ACK_NO_2 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 20, METHOD_BUFFERED, FILE_ANY_ACCESS)
847#define FSCTL_INVALIDATE_VOLUMES CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 21, METHOD_BUFFERED, FILE_ANY_ACCESS)
848#define FSCTL_QUERY_FAT_BPB CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 22, METHOD_BUFFERED, FILE_ANY_ACCESS) // FSCTL_QUERY_FAT_BPB_BUFFER
849#define FSCTL_REQUEST_FILTER_OPLOCK CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 23, METHOD_BUFFERED, FILE_ANY_ACCESS)
850#define FSCTL_FILESYSTEM_GET_STATISTICS CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 24, METHOD_BUFFERED, FILE_ANY_ACCESS) // FILESYSTEM_STATISTICS
851#if(_WIN32_WINNT >= 0x0400)
852#define FSCTL_GET_NTFS_VOLUME_DATA CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 25, METHOD_BUFFERED, FILE_ANY_ACCESS) // NTFS_VOLUME_DATA_BUFFER
853#define FSCTL_GET_NTFS_FILE_RECORD CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 26, METHOD_BUFFERED, FILE_ANY_ACCESS) // NTFS_FILE_RECORD_INPUT_BUFFER, NTFS_FILE_RECORD_OUTPUT_BUFFER
854#define FSCTL_GET_VOLUME_BITMAP CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 27, METHOD_NEITHER, FILE_ANY_ACCESS) // STARTING_LCN_INPUT_BUFFER, VOLUME_BITMAP_BUFFER
855#define FSCTL_GET_RETRIEVAL_POINTERS CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 28, METHOD_NEITHER, FILE_ANY_ACCESS) // STARTING_VCN_INPUT_BUFFER, RETRIEVAL_POINTERS_BUFFER
856#define FSCTL_MOVE_FILE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 29, METHOD_BUFFERED, FILE_SPECIAL_ACCESS) // MOVE_FILE_DATA,
857#define FSCTL_IS_VOLUME_DIRTY CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 30, METHOD_BUFFERED, FILE_ANY_ACCESS)
858// decomissioned fsctl value 31
859#define FSCTL_ALLOW_EXTENDED_DASD_IO CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 32, METHOD_NEITHER, FILE_ANY_ACCESS)
860#endif /* _WIN32_WINNT >= 0x0400 */
861
862//
863// Define the base asynchronous I/O argument types
864//
865
866typedef struct _IO_STATUS_BLOCK {
870
871//
872// Define an Asynchronous Procedure Call from I/O viewpoint
873//
874
875typedef
881 );
882
883//
884// Define the file information class values
885//
886// WARNING: The order of the following values are assumed by the I/O system.
887// Any changes made here should be reflected there as well.
888//
889
933
934//
935// Define the various structures which are returned on query operations
936//
937
945
946typedef struct _FILE_STANDARD_INFORMATION {
953
957
961
962typedef struct _FILE_NETWORK_OPEN_INFORMATION {
971
975
979
980
981typedef struct _FILE_FULL_EA_INFORMATION {
983 UCHAR Flags;
986 CHAR EaName[1];
988
989//
990// Define the file system information class values
991//
992// WARNING: The order of the following values are assumed by the I/O system.
993// Any changes made here should be reflected there as well.
994
995typedef enum _FSINFOCLASS {
1006
1011
1012//
1013// Registry Specific Access Rights.
1014//
1015
1016#define KEY_QUERY_VALUE (0x0001)
1017#define KEY_SET_VALUE (0x0002)
1018#define KEY_CREATE_SUB_KEY (0x0004)
1019#define KEY_ENUMERATE_SUB_KEYS (0x0008)
1020#define KEY_NOTIFY (0x0010)
1021#define KEY_CREATE_LINK (0x0020)
1022
1023#define KEY_READ ((STANDARD_RIGHTS_READ |\
1024 KEY_QUERY_VALUE |\
1025 KEY_ENUMERATE_SUB_KEYS |\
1026 KEY_NOTIFY) \
1027 & \
1028 (~SYNCHRONIZE))
1029
1030
1031#define KEY_WRITE ((STANDARD_RIGHTS_WRITE |\
1032 KEY_SET_VALUE |\
1033 KEY_CREATE_SUB_KEY) \
1034 & \
1035 (~SYNCHRONIZE))
1036
1037#define KEY_EXECUTE ((KEY_READ) \
1038 & \
1039 (~SYNCHRONIZE))
1040
1041#define KEY_ALL_ACCESS ((STANDARD_RIGHTS_ALL |\
1042 KEY_QUERY_VALUE |\
1043 KEY_SET_VALUE |\
1044 KEY_CREATE_SUB_KEY |\
1045 KEY_ENUMERATE_SUB_KEYS |\
1046 KEY_NOTIFY |\
1047 KEY_CREATE_LINK) \
1048 & \
1049 (~SYNCHRONIZE))
1050
1051//
1052// Open/Create Options
1053//
1054
1055#define REG_OPTION_RESERVED (0x00000000L) // Parameter is reserved
1056
1057#define REG_OPTION_NON_VOLATILE (0x00000000L) // Key is preserved
1058 // when system is rebooted
1059
1060#define REG_OPTION_VOLATILE (0x00000001L) // Key is not preserved
1061 // when system is rebooted
1062
1063#define REG_OPTION_CREATE_LINK (0x00000002L) // Created key is a
1064 // symbolic link
1065
1066#define REG_OPTION_BACKUP_RESTORE (0x00000004L) // open for backup or restore
1067 // special access rules
1068 // privilege required
1069
1070#define REG_OPTION_OPEN_LINK (0x00000008L) // Open symbolic link
1071
1072#define REG_LEGAL_OPTION \
1073 (REG_OPTION_RESERVED |\
1074 REG_OPTION_NON_VOLATILE |\
1075 REG_OPTION_VOLATILE |\
1076 REG_OPTION_CREATE_LINK |\
1077 REG_OPTION_BACKUP_RESTORE |\
1078 REG_OPTION_OPEN_LINK)
1079
1080//
1081// Key creation/open disposition
1082//
1083
1084#define REG_CREATED_NEW_KEY (0x00000001L) // New Registry Key created
1085#define REG_OPENED_EXISTING_KEY (0x00000002L) // Existing Key opened
1086
1087//
1088// Key restore flags
1089//
1090
1091#define REG_WHOLE_HIVE_VOLATILE (0x00000001L) // Restore whole hive volatile
1092#define REG_REFRESH_HIVE (0x00000002L) // Unwind changes to last flush
1093#define REG_NO_LAZY_FLUSH (0x00000004L) // Never lazy flush this hive
1094
1095//
1096// Key query structures
1097//
1098
1103 WCHAR Name[1]; // Variable length string
1105
1112 WCHAR Name[1]; // Variable length string
1113// Class[1]; // Variable length string not declared
1115
1127 WCHAR Class[1]; // Variable length
1129
1135
1139
1143
1144//
1145// Value entry query structures
1146//
1147
1152 WCHAR Name[1]; // Variable size
1154
1161 WCHAR Name[1]; // Variable size
1162// Data[1]; // Variable size data not declared
1164
1169 UCHAR Data[1]; // Variable size
1171
1172typedef struct _KEY_VALUE_ENTRY {
1178
1184
1185
1188NTAPI
1191 IN ULONG Index,
1193 IN PVOID KeyInformation,
1194 IN ULONG Length,
1196 );
1197
1200NTAPI
1201NtOpenKey(
1205 );
1206
1209NTAPI
1214 IN PVOID KeyValueInformation,
1215 IN ULONG Length,
1217 );
1218
1221NTAPI
1226 IN ULONG Type,
1227 IN PVOID Data,
1229 );
1230
1233NTAPI
1237 );
1238
1239
1240#define OBJ_NAME_PATH_SEPARATOR ((WCHAR)L'\\')
1241
1242//
1243// Object Manager Object Type Specific Access Rights.
1244//
1245
1246#define OBJECT_TYPE_CREATE (0x0001)
1247
1248#define OBJECT_TYPE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
1249
1250//
1251// Object Manager Directory Specific Access Rights.
1252//
1253
1254#define DIRECTORY_QUERY (0x0001)
1255#define DIRECTORY_TRAVERSE (0x0002)
1256#define DIRECTORY_CREATE_OBJECT (0x0004)
1257#define DIRECTORY_CREATE_SUBDIRECTORY (0x0008)
1258
1259#define DIRECTORY_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0xF)
1260
1261//
1262// Object Manager Symbolic Link Specific Access Rights.
1263//
1264
1265#define SYMBOLIC_LINK_QUERY (0x0001)
1266
1267#define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
1268
1272
1273//
1274// Section Information Structures.
1275//
1276
1277typedef enum _SECTION_INHERIT {
1279 ViewUnmap = 2
1281
1282//
1283// Section Access Rights.
1284//
1285
1286// begin_winnt
1287#define SECTION_QUERY 0x0001
1288#define SECTION_MAP_WRITE 0x0002
1289#define SECTION_MAP_READ 0x0004
1290#define SECTION_MAP_EXECUTE 0x0008
1291#define SECTION_EXTEND_SIZE 0x0010
1292
1293#define SECTION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SECTION_QUERY|\
1294 SECTION_MAP_WRITE | \
1295 SECTION_MAP_READ | \
1296 SECTION_MAP_EXECUTE | \
1297 SECTION_EXTEND_SIZE)
1298// end_winnt
1299
1300#define SEGMENT_ALL_ACCESS SECTION_ALL_ACCESS
1301
1302#define PAGE_NOACCESS 0x01 // winnt
1303#define PAGE_READONLY 0x02 // winnt
1304#define PAGE_READWRITE 0x04 // winnt
1305#define PAGE_WRITECOPY 0x08 // winnt
1306#define PAGE_EXECUTE 0x10 // winnt
1307#define PAGE_EXECUTE_READ 0x20 // winnt
1308#define PAGE_EXECUTE_READWRITE 0x40 // winnt
1309#define PAGE_EXECUTE_WRITECOPY 0x80 // winnt
1310#define PAGE_GUARD 0x100 // winnt
1311#define PAGE_NOCACHE 0x200 // winnt
1312
1313#define MEM_COMMIT 0x1000
1314#define MEM_RESERVE 0x2000
1315#define MEM_DECOMMIT 0x4000
1316#define MEM_RELEASE 0x8000
1317#define MEM_FREE 0x10000
1318#define MEM_PRIVATE 0x20000
1319#define MEM_MAPPED 0x40000
1320#define MEM_RESET 0x80000
1321#define MEM_TOP_DOWN 0x100000
1322#define MEM_LARGE_PAGES 0x20000000
1323#define SEC_RESERVE 0x4000000
1324#define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | \
1325 0xFFF)
1326
1327
1328#define MAXIMUM_PROCESSORS 32
1329
1330// end_winnt
1331
1332//
1333// Thread Specific Access Rights
1334//
1335
1336#define THREAD_TERMINATE (0x0001) // winnt
1337#define THREAD_SET_INFORMATION (0x0020) // winnt
1338
1339#define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | \
1340 0x3FF)
1341
1342//
1343// ClientId
1344//
1345
1346typedef struct _CLIENT_ID {
1351
1352//
1353// Define the size of the 80387 save area, which is in the context frame.
1354//
1355
1356#define SIZE_OF_80387_REGISTERS 80
1357
1358//
1359// The following flags control the contents of the CONTEXT structure.
1360//
1361
1362#if !defined(RC_INVOKED)
1363
1364#define CONTEXT_i386 0x00010000 // this assumes that i386 and
1365#define CONTEXT_i486 0x00010000 // i486 have identical context records
1366
1367// end_wx86
1368
1369#define CONTEXT_CONTROL (CONTEXT_i386 | 0x00000001L) // SS:SP, CS:IP, FLAGS, BP
1370#define CONTEXT_INTEGER (CONTEXT_i386 | 0x00000002L) // AX, BX, CX, DX, SI, DI
1371#define CONTEXT_SEGMENTS (CONTEXT_i386 | 0x00000004L) // DS, ES, FS, GS
1372#define CONTEXT_FLOATING_POINT (CONTEXT_i386 | 0x00000008L) // 387 state
1373#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386 | 0x00000010L) // DB 0-3,6,7
1374
1375#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER |\
1376 CONTEXT_SEGMENTS)
1377
1378// begin_wx86
1379
1380#endif
1381
1382typedef struct _FLOATING_SAVE_AREA {
1393
1395
1396//
1397// Context Frame
1398//
1399// This frame has a several purposes: 1) it is used as an argument to
1400// NtContinue, 2) is is used to constuct a call frame for APC delivery,
1401// and 3) it is used in the user level thread creation routines.
1402//
1403// The layout of the record conforms to a standard call frame.
1404//
1405
1406typedef struct _CONTEXT {
1407
1408 //
1409 // The flags values within this flag control the contents of
1410 // a CONTEXT record.
1411 //
1412 // If the context record is used as an input parameter, then
1413 // for each portion of the context record controlled by a flag
1414 // whose value is set, it is assumed that that portion of the
1415 // context record contains valid context. If the context record
1416 // is being used to modify a threads context, then only that
1417 // portion of the threads context will be modified.
1418 //
1419 // If the context record is used as an IN OUT parameter to capture
1420 // the context of a thread, then only those portions of the thread's
1421 // context corresponding to set flags will be returned.
1422 //
1423 // The context record is never used as an OUT only parameter.
1424 //
1425
1427
1428 //
1429 // This section is specified/returned if CONTEXT_DEBUG_REGISTERS is
1430 // set in ContextFlags. Note that CONTEXT_DEBUG_REGISTERS is NOT
1431 // included in CONTEXT_FULL.
1432 //
1433
1440
1441 //
1442 // This section is specified/returned if the
1443 // ContextFlags word contians the flag CONTEXT_FLOATING_POINT.
1444 //
1445
1447
1448 //
1449 // This section is specified/returned if the
1450 // ContextFlags word contians the flag CONTEXT_SEGMENTS.
1451 //
1452
1457
1458 //
1459 // This section is specified/returned if the
1460 // ContextFlags word contians the flag CONTEXT_INTEGER.
1461 //
1462
1469
1470 //
1471 // This section is specified/returned if the
1472 // ContextFlags word contians the flag CONTEXT_CONTROL.
1473 //
1474
1477 ULONG SegCs; // MUST BE SANITIZED
1478 ULONG EFlags; // MUST BE SANITIZED
1481
1483
1484
1485
1487
1488//
1489// Predefined Value Types.
1490//
1491
1492#define REG_NONE ( 0 ) // No value type
1493#define REG_SZ ( 1 ) // Unicode nul terminated string
1494#define REG_EXPAND_SZ ( 2 ) // Unicode nul terminated string
1495 // (with environment variable references)
1496#define REG_BINARY ( 3 ) // Free form binary
1497#define REG_DWORD ( 4 ) // 32-bit number
1498#define REG_DWORD_LITTLE_ENDIAN ( 4 ) // 32-bit number (same as REG_DWORD)
1499#define REG_DWORD_BIG_ENDIAN ( 5 ) // 32-bit number
1500#define REG_LINK ( 6 ) // Symbolic Link (unicode)
1501#define REG_MULTI_SZ ( 7 ) // Multiple Unicode strings
1502#define REG_RESOURCE_LIST ( 8 ) // Resource list in the resource map
1503#define REG_FULL_RESOURCE_DESCRIPTOR ( 9 ) // Resource list in the hardware description
1504#define REG_RESOURCE_REQUIREMENTS_LIST ( 10 )
1505
1506/*
1507LONG
1508FASTCALL
1509InterlockedIncrement(
1510 IN PLONG Addend
1511 );
1512
1513LONG
1514FASTCALL
1515InterlockedDecrement(
1516 IN PLONG Addend
1517 );
1518
1519LONG
1520FASTCALL
1521InterlockedExchange(
1522 IN OUT PLONG Target,
1523 IN LONG Value
1524 );
1525
1526LONG
1527FASTCALL
1528InterlockedExchangeAdd(
1529 IN OUT PLONG Addend,
1530 IN LONG Increment
1531 );
1532
1533PVOID
1534FASTCALL
1535InterlockedCompareExchange(
1536 IN OUT PVOID *Destination,
1537 IN PVOID ExChange,
1538 IN PVOID Comperand
1539 );
1540*/
1541//
1542// Environment information, which includes command line and
1543// image file name
1544//
1545typedef struct {
1550
1551//
1552// This structure is passed as NtProcessStartup's parameter
1553//
1554typedef struct {
1558
1559//
1560// Data structure for heap definition. This includes various
1561// sizing parameters and callback routines, which, if left NULL,
1562// result in default behavior
1563//
1564typedef struct {
1568
1569//
1570// Native NT api function to write something to the boot-time
1571// blue screen
1572//
1574NTAPI
1577 );
1578
1579//
1580// Native applications must kill themselves when done - the job
1581// of this native API
1582//
1584NTAPI
1588 );
1589
1590//
1591// Thread start function
1592//
1593
1594typedef
1596(*PKSTART_ROUTINE) (
1597 IN PVOID StartContext
1598 );
1599
1600typedef struct StackInfo_t {
1607
1610NTAPI
1612 OUT PHANDLE phThread,
1616 OUT PCLIENT_ID pClientId,
1617 IN PCONTEXT pContext,
1618 OUT PSTACKINFO pStackInfo,
1619 IN BOOLEAN bSuspended
1620);
1621
1622/*NTSTATUS
1623PsCreateSystemThread(
1624 OUT PHANDLE ThreadHandle,
1625 IN ACCESS_MASK DesiredAccess,
1626 IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
1627 IN HANDLE ProcessHandle OPTIONAL,
1628 OUT PCLIENT_ID ClientId OPTIONAL,
1629 IN PKSTART_ROUTINE StartRoutine,
1630 IN PVOID StartContext
1631 );
1632*/
1635 IN HANDLE ThreadHandle OPTIONAL,
1637 );
1638
1639/*
1640BOOLEAN
1641PsGetVersion(
1642 PULONG MajorVersion OPTIONAL,
1643 PULONG MinorVersion OPTIONAL,
1644 PULONG BuildNumber OPTIONAL,
1645 PUNICODE_STRING CSDVersion OPTIONAL
1646 );
1647
1648HANDLE
1649PsGetCurrentProcessId( VOID );
1650
1651HANDLE
1652PsGetCurrentThreadId( VOID );
1653*/
1654//
1655// Definition to represent current process
1656//
1657#define NtCurrentProcess() ( (HANDLE) -1 )
1658
1661 IN PVOID Base,
1664 );
1665
1666typedef struct _RTL_HEAP_PARAMETERS {
1679
1681PVOID
1682NTAPI
1684 IN ULONG Flags,
1690 );
1691
1692#define HEAP_NO_SERIALIZE 0x00000001 // winnt
1693#define HEAP_GROWABLE 0x00000002 // winnt
1694#define HEAP_GENERATE_EXCEPTIONS 0x00000004 // winnt
1695#define HEAP_ZERO_MEMORY 0x00000008 // winnt
1696#define HEAP_REALLOC_IN_PLACE_ONLY 0x00000010 // winnt
1697#define HEAP_TAIL_CHECKING_ENABLED 0x00000020 // winnt
1698#define HEAP_FREE_CHECKING_ENABLED 0x00000040 // winnt
1699#define HEAP_DISABLE_COALESCE_ON_FREE 0x00000080 // winnt
1700
1701#define HEAP_CREATE_ALIGN_16 0x00010000 // winnt Create heap with 16 byte alignment
1702#define HEAP_CREATE_ENABLE_TRACING 0x00020000 // winnt Create heap call tracing enabled
1703
1704#define HEAP_SETTABLE_USER_VALUE 0x00000100
1705#define HEAP_SETTABLE_USER_FLAG1 0x00000200
1706#define HEAP_SETTABLE_USER_FLAG2 0x00000400
1707#define HEAP_SETTABLE_USER_FLAG3 0x00000800
1708#define HEAP_SETTABLE_USER_FLAGS 0x00000E00
1709
1710#define HEAP_CLASS_0 0x00000000 // process heap
1711#define HEAP_CLASS_1 0x00001000 // private heap
1712#define HEAP_CLASS_2 0x00002000 // Kernel Heap
1713#define HEAP_CLASS_3 0x00003000 // GDI heap
1714#define HEAP_CLASS_4 0x00004000 // User heap
1715#define HEAP_CLASS_5 0x00005000 // Console heap
1716#define HEAP_CLASS_6 0x00006000 // User Desktop heap
1717#define HEAP_CLASS_7 0x00007000 // Csrss Shared heap
1718#define HEAP_CLASS_8 0x00008000 // Csr Port heap
1719#define HEAP_CLASS_MASK 0x0000F000
1720
1721#define HEAP_MAXIMUM_TAG 0x0FFF // winnt
1722#define HEAP_GLOBAL_TAG 0x0800
1723#define HEAP_PSEUDO_TAG_FLAG 0x8000 // winnt
1724#define HEAP_TAG_SHIFT 16 // winnt
1725#define HEAP_MAKE_TAG_FLAGS( b, o ) ((ULONG)((b) + ((o) << 16))) // winnt
1726#define HEAP_TAG_MASK (HEAP_MAXIMUM_TAG << HEAP_TAG_SHIFT)
1727
1728#define HEAP_CREATE_VALID_MASK (HEAP_NO_SERIALIZE | \
1729 HEAP_GROWABLE | \
1730 HEAP_GENERATE_EXCEPTIONS | \
1731 HEAP_ZERO_MEMORY | \
1732 HEAP_REALLOC_IN_PLACE_ONLY | \
1733 HEAP_TAIL_CHECKING_ENABLED | \
1734 HEAP_FREE_CHECKING_ENABLED | \
1735 HEAP_DISABLE_COALESCE_ON_FREE | \
1736 HEAP_CLASS_MASK | \
1737 HEAP_CREATE_ALIGN_16 | \
1738 HEAP_CREATE_ENABLE_TRACING)
1739
1741PVOID
1742NTAPI
1744 IN PVOID HeapHandle
1745 );
1746
1747//
1748// Heap allocation function (ala "malloc")
1749//
1750PVOID
1751NTAPI
1753 HANDLE Heap,
1754 ULONG Flags,
1755 ULONG Size
1756 );
1757
1758//
1759// Heap free function (ala "free")
1760//
1761BOOLEAN
1762NTAPI
1764 HANDLE Heap,
1765 ULONG Flags,
1767 );
1768
1769
1771NTAPI
1784 );
1785
1788NTAPI
1790 OUT PHANDLE phFile,
1793 OUT PIO_STATUS_BLOCK pIoStatusBlock,
1794 IN ULONG ShareMode,
1795 IN ULONG OpenMode
1796);
1797
1800NTAPI
1802 IN HANDLE hFile,
1804 IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL,
1805 IN PVOID IoApcContext OPTIONAL,
1806 OUT PIO_STATUS_BLOCK pIoStatusBlock,
1807 IN ULONG DeviceIoControlCode,
1808 IN PVOID InBuffer OPTIONAL,
1809 IN ULONG InBufferLength,
1812);
1813
1816NTAPI
1818 IN HANDLE hFile,
1820 IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL,
1821 IN PVOID IoApcContext OPTIONAL,
1822 OUT PIO_STATUS_BLOCK pIoStatusBlock,
1823 IN ULONG DeviceIoControlCode,
1824 IN PVOID InBuffer OPTIONAL,
1825 IN ULONG InBufferLength,
1828);
1829
1832NTAPI
1834 IN HANDLE hFile,
1836 IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL,
1837 IN PVOID IoApcContext OPTIONAL,
1838 OUT PIO_STATUS_BLOCK pIoStatusBlock,
1840 IN ULONG ReadBufferLength,
1842 IN PULONG LockOperationKey
1843);
1844
1847NTAPI
1849 IN HANDLE hFile,
1851 IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL,
1852 IN PVOID IoApcContext OPTIONAL,
1853 OUT PIO_STATUS_BLOCK pIoStatusBlock,
1855 IN ULONG WriteBufferLength,
1857 IN PULONG LockOperationKey OPTIONAL
1858);
1859
1862NTAPI
1864 IN HANDLE hFile,
1865 OUT PIO_STATUS_BLOCK pIoStatusBlock,
1866 OUT PVOID FileInformationBuffer,
1867 IN ULONG FileInformationBufferLength,
1868 IN FILE_INFORMATION_CLASS FileInfoClass
1869);
1870
1873NTAPI
1875 IN HANDLE hFile,
1876 OUT PIO_STATUS_BLOCK pIoStatusBlock,
1877 IN PVOID FileInformationBuffer,
1878 IN ULONG FileInformationBufferLength,
1879 IN FILE_INFORMATION_CLASS FileInfoClass
1880);
1881
1883NTAPI
1884NtClose(
1886 );
1887
1890NTAPI
1892 IN HANDLE hObject,
1893 IN BOOLEAN bAlertable,
1895);
1896
1898NTAPI
1901 IN PLARGE_INTEGER DelayInterval
1902 );
1903
1904#ifdef __cplusplus
1905};
1906#endif //__cplusplus
1907
1908#endif //__NT_NATIVE_DEFS__H__
unsigned char BOOLEAN
Type
Definition: Type.h:7
#define VOID
Definition: acefi.h:82
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 LineNumber
Definition: acpixf.h:1220
#define WriteBuffer(BaseIoAddress, Buffer, Count)
Definition: atapi.h:344
#define ReadBuffer(BaseIoAddress, Buffer, Count)
Definition: atapi.h:339
LONG NTSTATUS
Definition: precomp.h:26
#define NTSYSAPI
Definition: ntoskrnl.h:12
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:160
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define UNALIGNED
Definition: crtdefs.h:144
#define NTSTATUS
Definition: precomp.h:20
static const WCHAR Message[]
Definition: register.c:74
@ AnsiString
Definition: dnslib.h:19
void Fill(HDC hdc, LONG x, LONG y, COLORREF color)
Definition: drawing.cpp:109
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK _In_ USHORT ShareAccess
Definition: create.c:4147
#define RtlCompareMemory(s1, s2, l)
Definition: env_spec_w32.h:465
IN PVCB IN PDIRENT OUT PULONG EaLength
Definition: fatprocs.h:878
IN PFCB IN PFILE_OBJECT FileObject IN ULONG AllocationSize
Definition: fatprocs.h:322
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE _In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG FileAttributes
Definition: fltkernel.h:1236
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
Definition: fltkernel.h:1231
_FILE_INFORMATION_CLASS
Definition: from_kernel.h:61
enum _FILE_INFORMATION_CLASS FILE_INFORMATION_CLASS
Definition: directory.c:44
_FSINFOCLASS
Definition: from_kernel.h:218
ULONG Handle
Definition: gdb_input.c:15
_In_ GUID _In_ PVOID ValueData
Definition: hubbusif.h:312
@ Unknown
Definition: i8042prt.h:114
#define RtlFillMemory(Dest, Length, Fill)
Definition: winternl.h:593
#define RtlEqualMemory(a, b, c)
Definition: kdvm.h:18
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:71
static HANDLE hEvent
Definition: comm.c:54
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
static ACCESS_MASK const OBJECT_ATTRIBUTES ULONG TitleIndex
Definition: reg.c:131
static PLARGE_INTEGER Time
Definition: time.c:105
static PTIME_FIELDS TimeFields
Definition: time.c:104
_In_ HANDLE hFile
Definition: mswsock.h:90
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
Definition: ndis.h:4755
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
Definition: ndis.h:4715
_In_ ULONG _In_ KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass
Definition: cmfuncs.h:94
_In_ PVOID _In_ BOOLEAN Alertable
Definition: exfuncs.h:453
_In_ ACCESS_MASK AccessMask
Definition: exfuncs.h:186
_In_opt_ HANDLE _In_opt_ PIO_APC_ROUTINE _In_opt_ PVOID ApcContext
Definition: iofuncs.h:727
_In_ HANDLE ProcessHandle
Definition: mmfuncs.h:403
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T CommitSize
Definition: mmfuncs.h:406
_In_ NTSTATUS ExitStatus
Definition: psfuncs.h:859
_In_ const STRING * String2
Definition: rtlfuncs.h:2345
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
Definition: rtlfuncs.h:1910
_In_ const STRING _In_ BOOLEAN CaseInSensitive
Definition: rtlfuncs.h:2378
_In_ PCWSTR _Inout_ _At_ QueryTable EntryContext
Definition: rtlfuncs.h:4196
_In_ PSID _In_ BOOLEAN AllocateDestinationString
Definition: rtlfuncs.h:1349
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:2992
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2427
_Out_ _Inout_ POEM_STRING DestinationString
Definition: rtlfuncs.h:1909
NTSYSAPI PVOID NTAPI RtlDestroyHeap(IN PVOID HeapHandle)
struct STARTUP_ARGUMENT * PSTARTUP_ARGUMENT
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
struct _KEY_VALUE_BASIC_INFORMATION KEY_VALUE_BASIC_INFORMATION
struct _FILE_FULL_EA_INFORMATION * PFILE_FULL_EA_INFORMATION
struct _KTHREAD * PKTHREAD
Definition: nt_native.h:28
struct _TIME_FIELDS TIME_FIELDS
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
Definition: file.c:3952
@ FilePositionInformation
Definition: nt_native.h:904
@ FileMoveClusterInformation
Definition: nt_native.h:921
@ FileInheritContentIndexInformation
Definition: nt_native.h:929
@ FilePipeLocalInformation
Definition: nt_native.h:914
@ FileMaximumInformation
Definition: nt_native.h:931
@ FileEndOfFileInformation
Definition: nt_native.h:910
@ FileNameInformation
Definition: nt_native.h:899
@ FileOleAllInformation
Definition: nt_native.h:926
@ FileCompressionInformation
Definition: nt_native.h:918
@ FileOleDirectoryInformation
Definition: nt_native.h:927
@ FileRenameInformation
Definition: nt_native.h:900
@ FileAllInformation
Definition: nt_native.h:908
@ FilePipeRemoteInformation
Definition: nt_native.h:915
@ FileOleInformation
Definition: nt_native.h:930
@ FileLinkInformation
Definition: nt_native.h:901
@ FileInternalInformation
Definition: nt_native.h:896
@ FileStandardInformation
Definition: nt_native.h:895
@ FileDirectoryInformation
Definition: nt_native.h:891
@ FileContentIndexInformation
Definition: nt_native.h:928
@ FileOleStateBitsInformation
Definition: nt_native.h:923
@ FileAlignmentInformation
Definition: nt_native.h:907
@ FileObjectIdInformation
Definition: nt_native.h:925
@ FileEaInformation
Definition: nt_native.h:897
@ FilePipeInformation
Definition: nt_native.h:913
@ FileAlternateNameInformation
Definition: nt_native.h:911
@ FileCopyOnWriteInformation
Definition: nt_native.h:919
@ FileNamesInformation
Definition: nt_native.h:902
@ FileMailslotSetInformation
Definition: nt_native.h:917
@ FileMailslotQueryInformation
Definition: nt_native.h:916
@ FileAllocationInformation
Definition: nt_native.h:909
@ FileCompletionInformation
Definition: nt_native.h:920
@ FileAccessInformation
Definition: nt_native.h:898
@ FileFullDirectoryInformation
Definition: nt_native.h:892
@ FileOleClassIdInformation
Definition: nt_native.h:922
@ FileNetworkOpenInformation
Definition: nt_native.h:924
@ FileStreamInformation
Definition: nt_native.h:912
@ FileModeInformation
Definition: nt_native.h:906
@ FileBasicInformation
Definition: nt_native.h:894
@ FileDispositionInformation
Definition: nt_native.h:903
@ FileFullEaInformation
Definition: nt_native.h:905
@ FileBothDirectoryInformation
Definition: nt_native.h:893
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
TIME_FIELDS * PTIME_FIELDS
Definition: nt_native.h:536
NTSYSAPI NTSTATUS NTAPI NtOpenKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
Definition: ntapi.c:336
enum _FSINFOCLASS * PFS_INFORMATION_CLASS
NTSYSAPI NTSTATUS NTAPI NtReadFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, OUT PVOID ReadBuffer, IN ULONG ReadBufferLength, IN PLARGE_INTEGER FileOffset OPTIONAL, IN PULONG LockOperationKey)
NTSYSAPI LONG NTAPI RtlCompareUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
Definition: string_lib.cpp:31
struct _FILE_NETWORK_OPEN_INFORMATION FILE_NETWORK_OPEN_INFORMATION
NTSTATUS NTAPI NtDisplayString(PUNICODE_STRING String)
NTSYSAPI BOOLEAN NTAPI RtlTimeFieldsToTime(PTIME_FIELDS TimeFields, PLARGE_INTEGER Time)
NTSYSAPI NTSTATUS NTAPI NtSetValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN ULONG TitleIndex OPTIONAL, IN ULONG Type, IN PVOID Data, IN ULONG DataSize)
Definition: ntapi.c:859
struct _KEY_VALUE_FULL_INFORMATION KEY_VALUE_FULL_INFORMATION
_KEY_INFORMATION_CLASS
Definition: nt_native.h:1130
@ KeyBasicInformation
Definition: nt_native.h:1131
@ KeyNodeInformation
Definition: nt_native.h:1132
@ KeyFullInformation
Definition: nt_native.h:1133
struct _KEY_NODE_INFORMATION * PKEY_NODE_INFORMATION
struct _PEB * PPEB
Definition: nt_native.h:31
enum _FILE_INFORMATION_CLASS * PFILE_INFORMATION_CLASS
NTSYSAPI VOID NTAPI RtlFreeAnsiString(PANSI_STRING AnsiString)
#define NLS_MB_OEM_CODE_PAGE_TAG
Definition: nt_native.h:213
struct _CONTEXT CONTEXT
struct _CALLBACK_OBJECT * PCALLBACK_OBJECT
Definition: nt_native.h:35
FLOATING_SAVE_AREA * PFLOATING_SAVE_AREA
Definition: nt_native.h:1394
_KEY_VALUE_INFORMATION_CLASS
Definition: nt_native.h:1179
@ KeyValueBasicInformation
Definition: nt_native.h:1180
@ KeyValuePartialInformation
Definition: nt_native.h:1182
@ KeyValueFullInformation
Definition: nt_native.h:1181
enum _KEY_SET_INFORMATION_CLASS KEY_SET_INFORMATION_CLASS
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PUNICODE_STRING Source)
struct _FILE_BASIC_INFORMATION FILE_BASIC_INFORMATION
struct StackInfo_t * PSTACKINFO
NTSYSAPI VOID NTAPI RtlInitString(PSTRING DestinationString, PCSZ SourceString)
ULONG ACCESS_MASK
Definition: nt_native.h:40
struct _FILE_STANDARD_INFORMATION * PFILE_STANDARD_INFORMATION
struct _FILE_NETWORK_OPEN_INFORMATION * PFILE_NETWORK_OPEN_INFORMATION
struct _CLIENT_ID CLIENT_ID
NTSYSAPI NTSTATUS NTAPI NtWriteFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN PVOID WriteBuffer, IN ULONG WriteBufferLength, IN PLARGE_INTEGER FileOffset OPTIONAL, IN PULONG LockOperationKey OPTIONAL)
NTSYSAPI VOID NTAPI RtlCopyString(PSTRING DestinationString, PSTRING SourceString)
struct _DEVICE_HANDLER_OBJECT * PDEVICE_HANDLER_OBJECT
Definition: nt_native.h:36
NTSTATUS NtTerminateThread(IN HANDLE ThreadHandle OPTIONAL, IN NTSTATUS ExitStatus)
Definition: kill.c:1279
struct _FLOATING_SAVE_AREA FLOATING_SAVE_AREA
NTSYSAPI NTSTATUS NTAPI NtDeleteValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName)
Definition: ntapi.c:1014
CONTEXT * PCONTEXT
Definition: nt_native.h:1486
ACCESS_MASK * PACCESS_MASK
Definition: nt_native.h:41
struct _KEY_BASIC_INFORMATION KEY_BASIC_INFORMATION
struct _GENERIC_MAPPING GENERIC_MAPPING
enum _FILE_INFORMATION_CLASS FILE_INFORMATION_CLASS
NTSYSAPI CHAR NTAPI RtlUpperChar(CHAR Character)
struct _FILE_FS_DEVICE_INFORMATION * PFILE_FS_DEVICE_INFORMATION
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
struct _RTL_QUERY_REGISTRY_TABLE * PRTL_QUERY_REGISTRY_TABLE
Definition: reg.c:122
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
struct _KINTERRUPT * PKINTERRUPT
Definition: nt_native.h:32
struct _KEY_VALUE_ENTRY KEY_VALUE_ENTRY
struct _IO_STATUS_BLOCK IO_STATUS_BLOCK
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
struct _KEY_NODE_INFORMATION KEY_NODE_INFORMATION
struct _KEY_WRITE_TIME_INFORMATION KEY_WRITE_TIME_INFORMATION
NTSYSAPI PVOID NTAPI RtlCreateHeap(IN ULONG Flags, IN PVOID HeapBase OPTIONAL, IN ULONG ReserveSize OPTIONAL, IN ULONG CommitSize OPTIONAL, IN PVOID Lock OPTIONAL, IN PRTL_HEAP_PARAMETERS Parameters OPTIONAL)
struct _KEY_BASIC_INFORMATION * PKEY_BASIC_INFORMATION
NTSTATUS NTAPI NtTerminateProcess(HANDLE ProcessHandle, LONG ExitStatus)
NTSYSAPI NTSTATUS NTAPI NtSetInformationFile(IN HANDLE hFile, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN PVOID FileInformationBuffer, IN ULONG FileInformationBufferLength, IN FILE_INFORMATION_CLASS FileInfoClass)
Definition: iofunc.c:3096
NTSYSAPI NTSTATUS NTAPI NtQueryValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, IN PVOID KeyValueInformation, IN ULONG Length, IN PULONG ResultLength)
NTSYSAPI NTSTATUS NTAPI NtQueryInformationFile(IN HANDLE hFile, OUT PIO_STATUS_BLOCK pIoStatusBlock, OUT PVOID FileInformationBuffer, IN ULONG FileInformationBufferLength, IN FILE_INFORMATION_CLASS FileInfoClass)
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToInteger(PUNICODE_STRING String, ULONG Base, PULONG Value)
struct _KEY_VALUE_ENTRY * PKEY_VALUE_ENTRY
struct _FILE_FS_DEVICE_INFORMATION FILE_FS_DEVICE_INFORMATION
struct _FILE_POSITION_INFORMATION FILE_POSITION_INFORMATION
struct _IO_STATUS_BLOCK * PIO_STATUS_BLOCK
struct _KEY_FULL_INFORMATION KEY_FULL_INFORMATION
struct StackInfo_t STACKINFO
enum _SECTION_INHERIT SECTION_INHERIT
struct _OBJECT_NAME_INFORMATION OBJECT_NAME_INFORMATION
NTSYSAPI NTSTATUS NTAPI NtDeviceIoControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
struct RTL_HEAP_DEFINITION * PRTL_HEAP_DEFINITION
struct _FILE_END_OF_FILE_INFORMATION * PFILE_END_OF_FILE_INFORMATION
NTSYSAPI VOID NTAPI RtlCopyMemory32(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
_KEY_SET_INFORMATION_CLASS
Definition: nt_native.h:1140
@ KeyWriteTimeInformation
Definition: nt_native.h:1141
struct _OBJECT_NAME_INFORMATION * POBJECT_NAME_INFORMATION
struct _FILE_BASIC_INFORMATION * PFILE_BASIC_INFORMATION
struct _FILE_DISPOSITION_INFORMATION FILE_DISPOSITION_INFORMATION
struct _FILE_ALIGNMENT_INFORMATION FILE_ALIGNMENT_INFORMATION
struct _BUS_HANDLER * PBUS_HANDLER
Definition: nt_native.h:37
@ FileFsControlInformation
Definition: nt_native.h:1001
@ FileFsDeviceInformation
Definition: nt_native.h:999
@ FileFsLabelInformation
Definition: nt_native.h:997
@ FileFsQuotaSetInformation
Definition: nt_native.h:1003
@ FileFsAttributeInformation
Definition: nt_native.h:1000
@ FileFsVolumeInformation
Definition: nt_native.h:996
@ FileFsSizeInformation
Definition: nt_native.h:998
@ FileFsMaximumInformation
Definition: nt_native.h:1004
@ FileFsQuotaQueryInformation
Definition: nt_native.h:1002
struct _KEY_VALUE_PARTIAL_INFORMATION KEY_VALUE_PARTIAL_INFORMATION
struct _EPROCESS * PEPROCESS
Definition: nt_native.h:30
_SECTION_INHERIT
Definition: nt_native.h:1277
@ ViewUnmap
Definition: nt_native.h:1279
@ ViewShare
Definition: nt_native.h:1278
enum _KEY_VALUE_INFORMATION_CLASS KEY_VALUE_INFORMATION_CLASS
Definition: reg.c:135
NTSYSAPI NTSTATUS NTAPI NtEnumerateKey(IN HANDLE KeyHandle, IN ULONG Index, IN KEY_INFORMATION_CLASS KeyInformationClass, IN PVOID KeyInformation, IN ULONG Length, IN PULONG ResultLength)
NTSTATUS NTAPI NtDelayExecution(IN BOOLEAN Alertable, IN PLARGE_INTEGER DelayInterval)
Definition: wait.c:876
NTSYSAPI VOID NTAPI RtlTimeToTimeFields(PLARGE_INTEGER Time, PTIME_FIELDS TimeFields)
NTSYSAPI NTSTATUS NTAPI RtlIntegerToUnicodeString(ULONG Value, ULONG Base, PUNICODE_STRING String)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3402
struct ENVIRONMENT_INFORMATION * PENVIRONMENT_INFORMATION
struct _OBJECT_TYPE * POBJECT_TYPE
Definition: nt_native.h:34
enum _KEY_INFORMATION_CLASS KEY_INFORMATION_CLASS
NTSYSAPI LONG NTAPI RtlCompareString(PSTRING String1, PSTRING String2, BOOLEAN CaseInSensitive)
struct _FILE_ALIGNMENT_INFORMATION * PFILE_ALIGNMENT_INFORMATION
struct _KEY_WRITE_TIME_INFORMATION * PKEY_WRITE_TIME_INFORMATION
BOOLEAN NTAPI RtlFreeHeap(HANDLE Heap, ULONG Flags, PVOID Address)
Definition: heap.c:2267
struct _KEY_VALUE_PARTIAL_INFORMATION * PKEY_VALUE_PARTIAL_INFORMATION
struct _KEY_VALUE_BASIC_INFORMATION * PKEY_VALUE_BASIC_INFORMATION
GENERIC_MAPPING * PGENERIC_MAPPING
Definition: nt_native.h:570
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeToString(PUNICODE_STRING Destination, PWSTR Source)
struct _ETHREAD * PETHREAD
Definition: nt_native.h:29
struct _FILE_STANDARD_INFORMATION FILE_STANDARD_INFORMATION
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
struct _RTL_HEAP_PARAMETERS * PRTL_HEAP_PARAMETERS
CLIENT_ID * PCLIENT_ID
Definition: nt_native.h:1350
NTSYSAPI BOOLEAN NTAPI RtlEqualString(PSTRING String1, PSTRING String2, BOOLEAN CaseInSensitive)
NTSYSAPI BOOLEAN NTAPI RtlPrefixUnicodeString(IN PUNICODE_STRING String1, IN PUNICODE_STRING String2, IN BOOLEAN CaseInSensitive)
PVOID NTAPI RtlAllocateHeap(HANDLE Heap, ULONG Flags, ULONG Size)
enum _FSINFOCLASS FS_INFORMATION_CLASS
struct _RTL_QUERY_REGISTRY_TABLE RTL_QUERY_REGISTRY_TABLE
struct _FILE_DISPOSITION_INFORMATION * PFILE_DISPOSITION_INFORMATION
struct _KEY_FULL_INFORMATION * PKEY_FULL_INFORMATION
NTSYSAPI NTSTATUS NTAPI RtlUpcaseUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
Definition: string_lib.cpp:46
struct _FILE_POSITION_INFORMATION * PFILE_POSITION_INFORMATION
NTSYSAPI NTSTATUS NTAPI NtWaitForSingleObject(IN HANDLE hObject, IN BOOLEAN bAlertable, IN PLARGE_INTEGER Timeout)
struct _FILE_FULL_EA_INFORMATION FILE_FULL_EA_INFORMATION
NTSTATUS NTAPI NtCreateFile(OUT PHANDLE FileHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK IoStatusBlock, IN PLARGE_INTEGER AllocationSize OPTIONAL, IN ULONG FileAttributes, IN ULONG ShareAccess, IN ULONG CreateDisposition, IN ULONG CreateOptions, IN PVOID EaBuffer OPTIONAL, IN ULONG EaLength)
NTSYSAPI NTSTATUS NTAPI NtCreateThread(OUT PHANDLE phThread, IN ACCESS_MASK AccessMask, IN POBJECT_ATTRIBUTES ObjectAttributes, IN HANDLE hProcess, OUT PCLIENT_ID pClientId, IN PCONTEXT pContext, OUT PSTACKINFO pStackInfo, IN BOOLEAN bSuspended)
#define SIZE_OF_80387_REGISTERS
Definition: nt_native.h:1356
NTSYSAPI VOID NTAPI RtlUpperString(PSTRING DestinationString, PSTRING SourceString)
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
NTSYSAPI NTSTATUS NTAPI NtFsControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
struct _IO_TIMER * PIO_TIMER
Definition: nt_native.h:33
VOID(* PIO_APC_ROUTINE)(IN PVOID ApcContext, IN PIO_STATUS_BLOCK IoStatusBlock, IN ULONG Reserved)
Definition: nt_native.h:877
struct _KEY_VALUE_FULL_INFORMATION * PKEY_VALUE_FULL_INFORMATION
NTSYSAPI NTSTATUS NTAPI RtlCharToInteger(PCSZ String, ULONG Base, PULONG Value)
Definition: unicode.c:261
NTSTATUS(* PRTL_HEAP_COMMIT_ROUTINE)(IN PVOID Base, IN OUT PVOID *CommitAddress, IN OUT PULONG CommitSize)
Definition: nt_native.h:1660
NTSYSAPI ULONG NTAPI RtlxAnsiStringToUnicodeSize(PANSI_STRING AnsiString)
struct _FILE_END_OF_FILE_INFORMATION FILE_END_OF_FILE_INFORMATION
#define NLS_MB_CODE_PAGE_TAG
Definition: nt_native.h:212
struct _RTL_HEAP_PARAMETERS RTL_HEAP_PARAMETERS
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
#define CONST
Definition: pedump.c:81
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
static WCHAR Address[46]
Definition: ping.c:68
static ULONG Timeout
Definition: ping.c:61
VOID NTAPI RtlAssert(IN PVOID FailedAssertion, IN PVOID FileName, IN ULONG LineNumber, IN PCHAR Message OPTIONAL)
Definition: rtlcompat.c:68
_In_ UCHAR _In_ ULONG _Out_ PUCHAR _Outptr_result_bytebuffer_ OutBufferLength PVOID * OutBuffer
Definition: scsi.h:4071
_In_ UCHAR _In_ UCHAR OutBufferLength
Definition: scsi.h:4016
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
UNICODE_STRING CommandLine
Definition: nt_native.h:1547
UNICODE_STRING ImageFile
Definition: nt_native.h:1548
PENVIRONMENT_INFORMATION Environment
Definition: nt_native.h:1556
ULONG BottomOfStack
Definition: nt_native.h:1605
ULONG TopOfStack
Definition: nt_native.h:1603
ULONG OnePageBelowTopOfStack
Definition: nt_native.h:1604
ULONG Unknown2
Definition: nt_native.h:1602
ULONG Unknown1
Definition: nt_native.h:1601
HANDLE UniqueThread
Definition: compat.h:826
HANDLE UniqueProcess
Definition: compat.h:825
ULONG Esp
Definition: nt_native.h:1479
ULONG SegFs
Definition: nt_native.h:1454
ULONG Dr3
Definition: nt_native.h:1437
ULONG Dr1
Definition: nt_native.h:1435
ULONG Edx
Definition: nt_native.h:1466
ULONG Esi
Definition: nt_native.h:1464
ULONG Ebp
Definition: nt_native.h:1475
ULONG ContextFlags
Definition: nt_native.h:1426
ULONG Dr6
Definition: nt_native.h:1438
ULONG SegSs
Definition: nt_native.h:1480
ULONG Ecx
Definition: nt_native.h:1467
ULONG Dr0
Definition: nt_native.h:1434
ULONG Eip
Definition: nt_native.h:1476
ULONG SegCs
Definition: nt_native.h:1477
ULONG SegDs
Definition: nt_native.h:1456
ULONG EFlags
Definition: nt_native.h:1478
ULONG SegGs
Definition: nt_native.h:1453
ULONG Dr2
Definition: nt_native.h:1436
ULONG Eax
Definition: nt_native.h:1468
FLOATING_SAVE_AREA FloatSave
Definition: nt_native.h:1446
ULONG SegEs
Definition: nt_native.h:1455
ULONG Ebx
Definition: nt_native.h:1465
ULONG Edi
Definition: nt_native.h:1463
ULONG Dr7
Definition: nt_native.h:1439
LARGE_INTEGER LastWriteTime
Definition: nt_native.h:941
LARGE_INTEGER CreationTime
Definition: nt_native.h:939
LARGE_INTEGER ChangeTime
Definition: nt_native.h:942
LARGE_INTEGER LastAccessTime
Definition: nt_native.h:940
LARGE_INTEGER CurrentByteOffset
Definition: nt_native.h:955
LARGE_INTEGER AllocationSize
Definition: propsheet.cpp:54
UCHAR RegisterArea[SIZE_OF_80387_REGISTERS]
Definition: nt_native.h:1390
ACCESS_MASK GenericExecute
Definition: nt_native.h:567
ACCESS_MASK GenericRead
Definition: nt_native.h:565
ACCESS_MASK GenericAll
Definition: nt_native.h:568
ACCESS_MASK GenericWrite
Definition: nt_native.h:566
NTSTATUS Status
Definition: nt_native.h:867
LARGE_INTEGER LastWriteTime
Definition: nt_native.h:1100
LARGE_INTEGER LastWriteTime
Definition: nt_native.h:1117
LARGE_INTEGER LastWriteTime
Definition: nt_native.h:1107
Definition: nt_native.h:1172
PUNICODE_STRING ValueName
Definition: nt_native.h:1173
ULONG DataLength
Definition: nt_native.h:1174
ULONG DataOffset
Definition: nt_native.h:1175
ULONG Type
Definition: nt_native.h:1176
LARGE_INTEGER LastWriteTime
Definition: nt_native.h:1137
UNICODE_STRING Name
Definition: nt_native.h:1270
ULONG DeCommitFreeBlockThreshold
Definition: nt_native.h:1670
PRTL_HEAP_COMMIT_ROUTINE CommitRoutine
Definition: nt_native.h:1676
ULONG VirtualMemoryThreshold
Definition: nt_native.h:1673
ULONG DeCommitTotalFreeThreshold
Definition: nt_native.h:1671
PRTL_QUERY_REGISTRY_ROUTINE QueryRoutine
Definition: nt_native.h:109
CSHORT Month
Definition: nt_native.h:528
CSHORT Milliseconds
Definition: nt_native.h:533
CSHORT Minute
Definition: nt_native.h:531
CSHORT Day
Definition: nt_native.h:529
CSHORT Year
Definition: nt_native.h:527
CSHORT Weekday
Definition: nt_native.h:534
CSHORT Hour
Definition: nt_native.h:530
CSHORT Second
Definition: nt_native.h:532
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t * PULONG
Definition: typedefs.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define NTAPI
Definition: typedefs.h:36
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define IN
Definition: typedefs.h:39
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:264
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
char * PCHAR
Definition: typedefs.h:51
CONST char * PCSZ
Definition: umtypes.h:125
short CSHORT
Definition: umtypes.h:127
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2658
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:869
_Must_inspect_result_ _In_opt_ WDFKEY _In_ PCUNICODE_STRING _In_ ACCESS_MASK _In_ ULONG _Out_opt_ PULONG CreateDisposition
Definition: wdfregistry.h:120
_Must_inspect_result_ _In_opt_ WDFKEY _In_ PCUNICODE_STRING _In_ ACCESS_MASK _In_ ULONG CreateOptions
Definition: wdfregistry.h:118
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG _Out_opt_ PULONG _Out_opt_ PULONG ValueType
Definition: wdfregistry.h:282
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:243
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG ValueLength
Definition: wdfregistry.h:275
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG _In_opt_ PVOID EaBuffer
Definition: iofuncs.h:845
#define DEVICE_TYPE
KSTART_ROUTINE * PKSTART_ROUTINE
Definition: ketypes.h:487
_In_opt_ PVOID HeapBase
Definition: rtlfuncs.h:2167
_In_opt_ PVOID _In_opt_ SIZE_T ReserveSize
Definition: rtlfuncs.h:2168
RTL_QUERY_REGISTRY_ROUTINE * PRTL_QUERY_REGISTRY_ROUTINE
Definition: rtltypes.h:53
_Inout_ PVOID * CommitAddress
Definition: rtltypes.h:578
$ULONG ACCESS_MASK
Definition: setypes.h:9
unsigned char UCHAR
Definition: xmlstorage.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175
_In_ ULONG _In_ KEY_INFORMATION_CLASS KeyInformationClass
Definition: zwfuncs.h:167