2 this file defines interfaces mainly exposed to device drivers and
12 #include "winbase.h" /* fixme: should be taken out sometimes */
23 #undef Status /* conflict with X11-includes*/
25 typedef struct _IO_STATUS_BLOCK
31 ULONG_PTR Information
;
32 } IO_STATUS_BLOCK
, *PIO_STATUS_BLOCK
;
34 typedef VOID
NTAPI (*PIO_APC_ROUTINE
) ( PVOID ApcContext
, PIO_STATUS_BLOCK IoStatusBlock
, ULONG Reserved
);
41 typedef struct _KEY_BASIC_INFORMATION
{
42 FILETIME LastWriteTime
;
46 } KEY_BASIC_INFORMATION
, *PKEY_BASIC_INFORMATION
;
48 typedef struct _KEY_NODE_INFORMATION
50 FILETIME LastWriteTime
;
57 } KEY_NODE_INFORMATION
, *PKEY_NODE_INFORMATION
;
59 typedef struct _KEY_FULL_INFORMATION
61 FILETIME LastWriteTime
;
69 ULONG MaxValueNameLen
;
70 ULONG MaxValueDataLen
;
72 } KEY_FULL_INFORMATION
, *PKEY_FULL_INFORMATION
;
74 typedef enum _KEY_INFORMATION_CLASS
79 } KEY_INFORMATION_CLASS
;
81 typedef struct _KEY_VALUE_ENTRY
83 PUNICODE_STRING ValueName
;
87 } KEY_VALUE_ENTRY
, *PKEY_VALUE_ENTRY
;
89 /* value information */
90 typedef struct _KEY_VALUE_BASIC_INFORMATION
96 } KEY_VALUE_BASIC_INFORMATION
, *PKEY_VALUE_BASIC_INFORMATION
;
98 typedef struct _KEY_VALUE_FULL_INFORMATION
107 } KEY_VALUE_FULL_INFORMATION
, *PKEY_VALUE_FULL_INFORMATION
;
109 typedef struct _KEY_VALUE_PARTIAL_INFORMATION
115 } KEY_VALUE_PARTIAL_INFORMATION
, *PKEY_VALUE_PARTIAL_INFORMATION
;
117 typedef enum _KEY_VALUE_INFORMATION_CLASS
119 KeyValueBasicInformation
,
120 KeyValueFullInformation
,
121 KeyValuePartialInformation
,
122 KeyValueFullInformationAlign64
,
123 KeyValuePartialInformationAlign64
124 } KEY_VALUE_INFORMATION_CLASS
;
126 NTSTATUS WINAPI
RtlFormatCurrentUserKeyPath(
127 PUNICODE_STRING KeyPath
);
129 /* thread information */
131 typedef enum _THREADINFOCLASS
132 { ThreadBasicInformation
,
137 ThreadImpersonationToken
,
138 ThreadDescriptorTableEntry
,
139 ThreadEnableAlignmentFaultFixup
,
140 ThreadEventPair_Reusable
,
141 ThreadQuerySetWin32StartAddress
,
143 ThreadPerformanceCount
,
145 ThreadIdealProcessor
,
147 ThreadSetTlsArrayAddress
,
152 /* file information */
154 typedef enum _FILE_INFORMATION_CLASS
{
155 FileDirectoryInformation
= 1,
156 FileFullDirectoryInformation
,
157 FileBothDirectoryInformation
,
158 FileBasicInformation
,
159 FileStandardInformation
,
160 FileInternalInformation
,
162 FileAccessInformation
,
164 FileRenameInformation
,
166 FileNamesInformation
,
167 FileDispositionInformation
,
168 FilePositionInformation
,
169 FileFullEaInformation
,
171 FileAlignmentInformation
,
173 FileAllocationInformation
,
174 FileEndOfFileInformation
,
175 FileAlternateNameInformation
,
176 FileStreamInformation
,
178 FilePipeLocalInformation
,
179 FilePipeRemoteInformation
,
180 FileMailslotQueryInformation
,
181 FileMailslotSetInformation
,
182 FileCompressionInformation
,
183 FileObjectIdInformation
,
184 FileCompletionInformation
,
185 FileMoveClusterInformation
,
186 FileQuotaInformation
,
187 FileReparsePointInformation
,
188 FileNetworkOpenInformation
,
189 FileAttributeTagInformation
,
190 FileTrackingInformation
,
191 FileMaximumInformation
192 } FILE_INFORMATION_CLASS
, *PFILE_INFORMATION_CLASS
;
194 typedef enum _FSINFOCLASS
{
195 FileFsVolumeInformation
= 1,
196 FileFsLabelInformation
,
197 FileFsSizeInformation
,
198 FileFsDeviceInformation
,
199 FileFsAttributeInformation
,
200 FileFsControlInformation
,
201 FileFsFullSizeInformation
,
202 FileFsObjectIdInformation
,
203 FileFsMaximumInformation
204 } FS_INFORMATION_CLASS
, *PFS_INFORMATION_CLASS
;
206 typedef enum _SECTION_INHERIT
213 /* object information */
215 typedef enum _OBJECT_INFORMATION_CLASS
219 } OBJECT_INFORMATION_CLASS
, *POBJECT_INFORMATION_CLASS
;
222 /* system information */
224 typedef enum SYSTEM_INFORMATION_CLASS
229 SystemPerformanceInformation
230 } SYSTEM_INFORMATION_CLASS
, *PSYSTEM_INFORMATION_CLASS
;
232 /* reading coffee grounds... */
233 typedef struct _THREAD_INFO
240 } THREAD_INFO
, PTHREAD_INFO
;
242 typedef struct _VM_COUNTERS_
243 { ULONG PeakVirtualSize
;
245 ULONG PageFaultCount
;
246 ULONG PeakWorkingSetSize
;
247 ULONG WorkingSetSize
;
248 ULONG QuotaPeakPagedPoolUsage
;
249 ULONG QuotaPagedPoolUsage
;
250 ULONG QuotaPeakNonPagedPoolUsage
;
251 ULONG QuotaNonPagedPoolUsage
;
253 ULONG PeakPagefileUsage
;
254 } VM_COUNTERS
, *PVM_COUNTERS
;
256 /* process information */
258 typedef struct _PROCESS_INFO
259 { DWORD Offset
; /* 00 offset to next PROCESS_INFO ok*/
260 DWORD ThreadCount
; /* 04 number of ThreadInfo member ok */
262 FILETIME CreationTime
; /* 20 */
264 PWCHAR ProcessName
; /* 3c ok */
266 DWORD ProcessID
; /* 44 ok*/
267 DWORD ParentProcessID
;
269 DWORD Unknown3
[2]; /* 50 */
270 ULONG PeakVirtualSize
;
272 ULONG PageFaultCount
;
273 ULONG PeakWorkingSetSize
;
274 ULONG WorkingSetSize
;
275 ULONG QuotaPeakPagedPoolUsage
;
276 ULONG QuotaPagedPoolUsage
;
277 ULONG QuotaPeakNonPagedPoolUsage
;
278 ULONG QuotaNonPagedPoolUsage
;
280 ULONG PeakPagefileUsage
;
283 THREAD_INFO ati
[ANYSIZE_ARRAY
]; /* 94 size=0x40*/
284 } PROCESS_INFO
, PPROCESS_INFO
;
286 NTSTATUS WINAPI
NtQuerySystemInformation(
287 IN SYSTEM_INFORMATION_CLASS SystemInformationClass
,
288 OUT PVOID SystemInformation
,
290 OUT PULONG ResultLength
);
293 * system configuration
297 typedef struct _SYSTEM_TIME_ADJUSTMENT
299 ULONG TimeAdjustment
;
300 BOOLEAN TimeAdjustmentDisabled
;
302 } SYSTEM_TIME_ADJUSTMENT
, *PSYSTEM_TIME_ADJUSTMENT
;
304 typedef struct _SYSTEM_CONFIGURATION_INFO
309 { WORD ProcessorArchitecture
;
314 PVOID MinimumApplicationAddress
;
315 PVOID MaximumApplicationAddress
;
316 ULONG ActiveProcessorMask
;
317 ULONG NumberOfProcessors
;
319 ULONG AllocationGranularity
;
321 WORD ProcessorRevision
;
323 } SYSTEM_CONFIGURATION_INFO
, *PSYSTEM_CONFIGURATION_INFO
;
326 typedef struct _SYSTEM_CACHE_INFORMATION
330 ULONG PageFaultCount
;
331 ULONG MinimumWorkingSet
;
332 ULONG MaximumWorkingSet
;
335 } SYSTEM_CACHE_INFORMATION
;
338 * NtQueryProcessInformation
341 /* parameter ProcessInformationClass */
343 typedef enum _PROCESSINFOCLASS
344 { ProcessBasicInformation
,
350 ProcessRaisePriority
,
352 ProcessExceptionPort
,
354 ProcessLdtInformation
,
356 ProcessDefaultHardErrorMode
,
357 ProcessIoPortHandlers
,
358 ProcessPooledUsageAndLimits
,
359 ProcessWorkingSetWatch
,
361 ProcessEnableAlignmentFaultFixup
,
362 ProcessPriorityClass
,
363 ProcessWx86Information
,
366 ProcessPriorityBoost
,
368 ProcessSessionInformation
,
369 ProcessForegroundInformation
,
370 ProcessWow64Information
,
374 /* parameter ProcessInformation (depending on ProcessInformationClass) */
376 typedef struct _PROCESS_BASIC_INFORMATION
378 DWORD PebBaseAddress
;
381 ULONG UniqueProcessId
;
382 ULONG InheritedFromUniqueProcessId
;
383 } PROCESS_BASIC_INFORMATION
;
385 NTSTATUS WINAPI
NtQueryInformationProcess(
386 IN HANDLE ProcessHandle
,
387 IN PROCESSINFOCLASS ProcessInformationClass
,
388 OUT PVOID ProcessInformation
,
389 IN ULONG ProcessInformationLength
,
390 OUT PULONG ReturnLength
);
392 #define NtCurrentProcess() ( (HANDLE) -1 )
398 typedef enum _TIMER_TYPE
405 /* token functions */
407 NTSTATUS WINAPI
NtOpenProcessToken(
408 HANDLE ProcessHandle
,
410 HANDLE
*TokenHandle
);
412 NTSTATUS WINAPI
NtOpenThreadToken(
416 HANDLE
*TokenHandle
);
418 NTSTATUS WINAPI
NtAdjustPrivilegesToken(
419 IN HANDLE TokenHandle
,
420 IN BOOLEAN DisableAllPrivileges
,
421 IN PTOKEN_PRIVILEGES NewState
,
422 IN DWORD BufferLength
,
423 OUT PTOKEN_PRIVILEGES PreviousState
,
424 OUT PDWORD ReturnLength
);
426 NTSTATUS WINAPI
NtQueryInformationToken(
428 DWORD tokeninfoclass
,
430 DWORD tokeninfolength
,
435 BOOLEAN WINAPI
RtlAllocateAndInitializeSid (
436 PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority
,
437 BYTE nSubAuthorityCount
,
438 DWORD nSubAuthority0
, DWORD nSubAuthority1
,
439 DWORD nSubAuthority2
, DWORD nSubAuthority3
,
440 DWORD nSubAuthority4
, DWORD nSubAuthority5
,
441 DWORD nSubAuthority6
, DWORD nSubAuthority7
,
444 BOOL WINAPI
RtlInitializeSid(
446 PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority
,
447 BYTE nSubAuthorityCount
);
449 DWORD WINAPI
RtlFreeSid(
452 BOOL WINAPI
RtlEqualSid(
456 DWORD WINAPI
RtlLengthRequiredSid(
459 DWORD WINAPI
RtlLengthSid(
462 LPDWORD WINAPI
RtlSubAuthoritySid(
466 LPBYTE WINAPI
RtlSubAuthorityCountSid(
469 DWORD WINAPI
RtlCopySid(
474 BOOL WINAPI
RtlValidSid(
477 BOOL WINAPI
RtlEqualPrefixSid(
481 PSID_IDENTIFIER_AUTHORITY WINAPI
RtlIdentifierAuthoritySid(
484 /* security descriptor functions */
486 NTSTATUS WINAPI
RtlCreateSecurityDescriptor(
487 PSECURITY_DESCRIPTOR lpsd
,
490 NTSTATUS WINAPI
RtlValidSecurityDescriptor(
491 PSECURITY_DESCRIPTOR SecurityDescriptor
);
493 ULONG WINAPI
RtlLengthSecurityDescriptor(
494 PSECURITY_DESCRIPTOR SecurityDescriptor
);
496 NTSTATUS WINAPI
RtlGetDaclSecurityDescriptor(
497 IN PSECURITY_DESCRIPTOR pSecurityDescriptor
,
498 OUT PBOOLEAN lpbDaclPresent
,
500 OUT PBOOLEAN lpbDaclDefaulted
);
502 NTSTATUS WINAPI
RtlSetDaclSecurityDescriptor (
503 PSECURITY_DESCRIPTOR lpsd
,
506 BOOLEAN dacldefaulted
);
508 NTSTATUS WINAPI
RtlGetSaclSecurityDescriptor(
509 IN PSECURITY_DESCRIPTOR pSecurityDescriptor
,
510 OUT PBOOLEAN lpbSaclPresent
,
512 OUT PBOOLEAN lpbSaclDefaulted
);
514 NTSTATUS WINAPI
RtlSetSaclSecurityDescriptor (
515 PSECURITY_DESCRIPTOR lpsd
,
518 BOOLEAN sacldefaulted
);
520 NTSTATUS WINAPI
RtlGetOwnerSecurityDescriptor(
521 PSECURITY_DESCRIPTOR SecurityDescriptor
,
523 PBOOLEAN OwnerDefaulted
);
525 NTSTATUS WINAPI
RtlSetOwnerSecurityDescriptor(
526 PSECURITY_DESCRIPTOR lpsd
,
528 BOOLEAN ownerdefaulted
);
530 NTSTATUS WINAPI
RtlSetGroupSecurityDescriptor (
531 PSECURITY_DESCRIPTOR lpsd
,
533 BOOLEAN groupdefaulted
);
535 NTSTATUS WINAPI
RtlGetGroupSecurityDescriptor(
536 PSECURITY_DESCRIPTOR SecurityDescriptor
,
538 PBOOLEAN GroupDefaulted
);
540 NTSTATUS WINAPI
RtlMakeSelfRelativeSD(
541 IN PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor
,
542 IN PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor
,
543 IN OUT LPDWORD lpdwBufferLength
);
545 NTSTATUS WINAPI
RtlGetControlSecurityDescriptor(
546 PSECURITY_DESCRIPTOR pSecurityDescriptor
,
547 PSECURITY_DESCRIPTOR_CONTROL pControl
,
548 LPDWORD lpdwRevision
);
552 NTSTATUS WINAPI
RtlCreateAcl(
557 BOOLEAN WINAPI
RtlFirstFreeAce(
561 NTSTATUS WINAPI
RtlAddAce(
565 PACE_HEADER acestart
,
568 BOOL WINAPI
RtlAddAccessAllowedAce(
570 IN DWORD dwAceRevision
,
574 BOOL WINAPI
AddAccessAllowedAceEx(
576 IN DWORD dwAceRevision
,
581 DWORD WINAPI
RtlGetAce(
586 /* string functions */
588 DWORD WINAPI
RtlAnsiStringToUnicodeSize(PSTRING
);
589 NTSTATUS WINAPI
RtlAnsiStringToUnicodeString(UNICODE_STRING
*,const STRING
*,BOOLEAN
);
590 NTSTATUS WINAPI
RtlAppendAsciizToString(STRING
*,LPCSTR
);
591 NTSTATUS WINAPI
RtlAppendStringToString(STRING
*,const STRING
*);
592 NTSTATUS WINAPI
RtlAppendUnicodeStringToString(UNICODE_STRING
*,const UNICODE_STRING
*);
593 NTSTATUS WINAPI
RtlAppendUnicodeToString(UNICODE_STRING
*,LPCWSTR
);
594 LONG WINAPI
RtlCompareString(const STRING
*,const STRING
*,BOOLEAN
);
595 LONG WINAPI
RtlCompareUnicodeString(const UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
596 void WINAPI
RtlCopyString(STRING
*,const STRING
*);
597 void WINAPI
RtlCopyUnicodeString(UNICODE_STRING
*,const UNICODE_STRING
*);
598 BOOLEAN WINAPI
RtlCreateUnicodeString(PUNICODE_STRING
,LPCWSTR
);
599 BOOLEAN WINAPI
RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING
,LPCSTR
);
600 void WINAPI
RtlEraseUnicodeString(UNICODE_STRING
*);
601 BOOLEAN WINAPI
RtlEqualString(const STRING
*,const STRING
*,BOOLEAN
);
602 BOOLEAN WINAPI
RtlEqualUnicodeString(const UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
603 void WINAPI
RtlFreeAnsiString(PSTRING
);
604 void WINAPI
RtlFreeOemString(PSTRING
);
605 void WINAPI
RtlFreeUnicodeString(PUNICODE_STRING
);
606 void WINAPI
RtlInitAnsiString(PSTRING
,LPCSTR
);
607 void WINAPI
RtlInitString(PSTRING
,LPCSTR
);
608 void WINAPI
RtlInitUnicodeString(PUNICODE_STRING
,LPCWSTR
);
609 NTSTATUS WINAPI
RtlMultiByteToUnicodeN(LPWSTR
,DWORD
,LPDWORD
,LPCSTR
,DWORD
);
610 NTSTATUS WINAPI
RtlMultiByteToUnicodeSize(DWORD
*,LPCSTR
,UINT
);
611 UINT WINAPI
RtlOemStringToUnicodeSize(PSTRING
);
612 NTSTATUS WINAPI
RtlOemStringToUnicodeString(UNICODE_STRING
*,const STRING
*,BOOLEAN
);
613 NTSTATUS WINAPI
RtlOemToUnicodeN(LPWSTR
,DWORD
,LPDWORD
,LPCSTR
,DWORD
);
614 BOOLEAN WINAPI
RtlPrefixString(const STRING
*,const STRING
*,BOOLEAN
);
615 BOOLEAN WINAPI
RtlPrefixUnicodeString(const UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
616 DWORD WINAPI
RtlUnicodeStringToAnsiSize(const UNICODE_STRING
*);
617 NTSTATUS WINAPI
RtlUnicodeStringToAnsiString(STRING
*,const UNICODE_STRING
*,BOOLEAN
);
618 DWORD WINAPI
RtlUnicodeStringToOemSize(const UNICODE_STRING
*);
619 NTSTATUS WINAPI
RtlUnicodeStringToOemString(STRING
*,const UNICODE_STRING
*,BOOLEAN
);
620 NTSTATUS WINAPI
RtlUnicodeToMultiByteN(LPSTR
,DWORD
,LPDWORD
,LPCWSTR
,DWORD
);
621 NTSTATUS WINAPI
RtlUnicodeToMultiByteSize(DWORD
*,LPCWSTR
,UINT
);
622 NTSTATUS WINAPI
RtlUnicodeToOemN(LPSTR
,DWORD
,LPDWORD
,LPCWSTR
,DWORD
);
623 NTSTATUS WINAPI
RtlUpcaseUnicodeString(UNICODE_STRING
*,const UNICODE_STRING
*,BOOLEAN
);
624 NTSTATUS WINAPI
RtlUpcaseUnicodeStringToAnsiString(STRING
*,const UNICODE_STRING
*,BOOLEAN
);
625 NTSTATUS WINAPI
RtlUpcaseUnicodeStringToOemString(STRING
*,const UNICODE_STRING
*,BOOLEAN
);
626 NTSTATUS WINAPI
RtlUpcaseUnicodeToMultiByteN(LPSTR
,DWORD
,LPDWORD
,LPCWSTR
,DWORD
);
627 NTSTATUS WINAPI
RtlUpcaseUnicodeToOemN(LPSTR
,DWORD
,LPDWORD
,LPCWSTR
,DWORD
);
629 DWORD WINAPI
RtlIsTextUnicode(
634 /* resource functions */
636 typedef struct _RTL_RWLOCK
{
637 CRITICAL_SECTION rtlCS
;
638 HANDLE hSharedReleaseSemaphore
;
640 HANDLE hExclusiveReleaseSemaphore
;
641 UINT uExclusiveWaiters
;
643 HANDLE hOwningThreadId
;
644 DWORD dwTimeoutBoost
;
646 } RTL_RWLOCK
, *LPRTL_RWLOCK
;
648 VOID WINAPI
RtlInitializeResource(
651 VOID WINAPI
RtlDeleteResource(
654 BYTE WINAPI
RtlAcquireResourceExclusive(
655 LPRTL_RWLOCK
, BYTE fWait
);
657 BYTE WINAPI
RtlAcquireResourceShared(
658 LPRTL_RWLOCK
, BYTE fWait
);
660 VOID WINAPI
RtlReleaseResource(
663 VOID WINAPI
RtlDumpResource(
668 typedef struct _TIME_FIELDS
679 typedef TIME_FIELDS
*PTIME_FIELDS
;
681 VOID WINAPI
RtlSystemTimeToLocalTime(
682 IN PLARGE_INTEGER SystemTime
,
683 OUT PLARGE_INTEGER LocalTime
);
685 VOID WINAPI
RtlTimeToTimeFields(
686 PLARGE_INTEGER liTime
,
687 PTIME_FIELDS TimeFields
);
689 BOOLEAN WINAPI
RtlTimeFieldsToTime(
690 PTIME_FIELDS tfTimeFields
,
691 PLARGE_INTEGER Time
);
693 VOID WINAPI
RtlTimeToElapsedTimeFields(
694 PLARGE_INTEGER liTime
,
695 PTIME_FIELDS TimeFields
);
697 BOOLEAN WINAPI
RtlTimeToSecondsSince1980(
701 BOOLEAN WINAPI
RtlTimeToSecondsSince1970(
705 void WINAPI
RtlSecondsSince1970ToTime( DWORD time
, LPFILETIME ft
);
706 void WINAPI
RtlSecondsSince1980ToTime( DWORD time
, LPFILETIME ft
);
710 /* Data structure for heap definition. This includes various
711 sizing parameters and callback routines, which, if left NULL,
712 result in default behavior */
715 { ULONG Length
; /* = sizeof(RTL_HEAP_DEFINITION) */
717 } RTL_HEAP_DEFINITION
, *PRTL_HEAP_DEFINITION
;
719 HANDLE WINAPI
RtlCreateHeap(
725 PRTL_HEAP_DEFINITION Definition
);
727 PVOID WINAPI
RtlAllocateHeap(
733 BOOLEAN WINAPI
RtlFreeHeap(
740 void WINAPI
NtRaiseException(
741 PEXCEPTION_RECORD
,PCONTEXT
,BOOL
);
743 void WINAPI
RtlRaiseException(
746 void WINAPI
RtlRaiseStatus(
749 void WINAPI
RtlUnwind(
752 PEXCEPTION_RECORD
,DWORD
);
754 /* process environment block */
755 VOID WINAPI
RtlAcquirePebLock(void);
756 VOID WINAPI
RtlReleasePebLock(void);
759 INT WINAPI
RtlExtendedLargeIntegerDivide(
760 LARGE_INTEGER dividend
,
764 LARGE_INTEGER WINAPI
RtlExtendedIntegerMultiply(
765 LARGE_INTEGER factor1
,
769 DWORD WINAPI
RtlCreateEnvironment(
773 DWORD WINAPI
RtlDestroyEnvironment(
776 DWORD WINAPI
RtlQueryEnvironmentVariable_U(
779 PUNICODE_STRING val
) ;
781 DWORD WINAPI
RtlSetEnvironmentVariable(
784 PUNICODE_STRING val
);
786 /* object security */
788 DWORD WINAPI
RtlNewSecurityObject(
796 DWORD WINAPI
RtlDeleteSecurityObject(
800 NtQuerySecurityObject(
802 IN SECURITY_INFORMATION RequestedInformation
,
803 OUT PSECURITY_DESCRIPTOR pSecurityDesriptor
,
805 OUT PULONG ResultLength
);
810 IN SECURITY_INFORMATION SecurityInformation
,
811 IN PSECURITY_DESCRIPTOR SecurityDescriptor
);
813 /* registry functions */
815 NTSTATUS WINAPI
NtCreateKey(PHANDLE
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,ULONG
,
816 const UNICODE_STRING
*,ULONG
,PULONG
);
817 NTSTATUS WINAPI
NtDeleteKey(HANDLE
);
818 NTSTATUS WINAPI
NtDeleteValueKey(HANDLE
,const UNICODE_STRING
*);
819 NTSTATUS WINAPI
NtOpenKey(PHANDLE
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*);
821 NTSTATUS WINAPI
NtEnumerateKey(
824 KEY_INFORMATION_CLASS KeyInformationClass
,
825 PVOID KeyInformation
,
827 PULONG ResultLength
);
829 NTSTATUS WINAPI
NtQueryKey(
831 KEY_INFORMATION_CLASS KeyInformationClass
,
832 PVOID KeyInformation
,
834 PULONG ResultLength
);
836 NTSTATUS WINAPI
NtEnumerateValueKey(
839 KEY_VALUE_INFORMATION_CLASS KeyInformationClass
,
840 PVOID KeyInformation
,
842 PULONG ResultLength
);
844 NTSTATUS WINAPI
NtFlushKey(HANDLE KeyHandle
);
846 NTSTATUS WINAPI
NtLoadKey(
848 POBJECT_ATTRIBUTES ObjectAttributes
);
850 NTSTATUS WINAPI
NtNotifyChangeKey(
853 IN PIO_APC_ROUTINE ApcRoutine OPTIONAL
,
854 IN PVOID ApcContext OPTIONAL
,
855 OUT PIO_STATUS_BLOCK IoStatusBlock
,
856 IN ULONG CompletionFilter
,
857 IN BOOLEAN Asynchroneous
,
858 OUT PVOID ChangeBuffer
,
860 IN BOOLEAN WatchSubtree
);
862 NTSTATUS WINAPI
NtQueryMultipleValueKey(
864 PVALENTW ListOfValuesToQuery
,
866 PVOID MultipleValueInformation
,
868 PULONG ReturnLength
);
870 NTSTATUS WINAPI
NtQueryValueKey(
872 IN PUNICODE_STRING ValueName
,
873 IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass
,
874 OUT PVOID KeyValueInformation
,
876 OUT PULONG ResultLength
);
878 NTSTATUS WINAPI
NtReplaceKey(
879 IN POBJECT_ATTRIBUTES ObjectAttributes
,
881 IN POBJECT_ATTRIBUTES ReplacedObjectAttributes
);
883 NTSTATUS WINAPI
NtRestoreKey(
888 NTSTATUS WINAPI
NtSaveKey(
890 IN HANDLE FileHandle
);
892 NTSTATUS WINAPI
NtSetInformationKey(
894 IN
const int KeyInformationClass
,
895 IN PVOID KeyInformation
,
896 IN ULONG KeyInformationLength
);
898 NTSTATUS WINAPI
NtSetValueKey(
900 PUNICODE_STRING ValueName
,
906 NTSTATUS WINAPI
NtUnloadKey(
907 IN HANDLE KeyHandle
);
909 NTSTATUS WINAPI
NtClose(
912 NTSTATUS WINAPI
NtTerminateProcess( HANDLE handle
, LONG exit_code
);
913 NTSTATUS WINAPI
NtTerminateThread( HANDLE handle
, LONG exit_code
);
915 NTSTATUS WINAPI
NtCreateEvent(PHANDLE
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,BOOLEAN
,BOOLEAN
);
916 NTSTATUS WINAPI
NtCreateSemaphore(PHANDLE
,ACCESS_MASK
,const OBJECT_ATTRIBUTES
*,ULONG
,ULONG
);
917 NTSTATUS WINAPI
NtReleaseSemaphore( IN HANDLE SemaphoreHandle
,
918 IN ULONG ReleaseCount
,
919 IN PULONG PreviousCount
);
922 /* string functions */
923 extern LPSTR
_strlwr( LPSTR str
);
924 extern LPSTR
_strupr( LPSTR str
);
928 #if defined(__i386__) && defined(__GNUC__)
929 static inline void WINAPI
DbgBreakPoint(void) { __asm__
__volatile__("int3"); }
930 static inline void WINAPI
DbgUserBreakPoint(void) { __asm__
__volatile__("int3"); }
931 #else /* __i386__ && __GNUC__ */
932 void WINAPI
DbgBreakPoint(void);
933 void WINAPI
DbgUserBreakPoint(void);
934 #endif /* __i386__ && __GNUC__ */
935 void WINAPIV
DbgPrint(LPCSTR fmt
, ...);
937 DWORD WINAPI
RtlAdjustPrivilege(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
);
938 DWORD WINAPI
RtlIntegerToChar(DWORD x1
,DWORD x2
,DWORD x3
,DWORD x4
);
939 LPVOID WINAPI
RtlNormalizeProcessParams(LPVOID x
);
940 DWORD WINAPI
RtlNtStatusToDosError(DWORD error
);
941 BOOLEAN WINAPI
RtlGetNtProductType(LPDWORD type
);
942 PIMAGE_NT_HEADERS WINAPI
RtlImageNtHeader(HMODULE hModule
);
944 DWORD WINAPI
RtlOpenCurrentUser(
945 IN ACCESS_MASK DesiredAccess
,
946 OUT PHANDLE KeyHandle
);
948 BOOLEAN WINAPI
RtlDosPathNameToNtPathName_U( LPWSTR from
,PUNICODE_STRING us
,DWORD x2
,DWORD x3
);
949 BOOL WINAPI
RtlImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
);
953 IN PSECURITY_DESCRIPTOR SecurityDescriptor
,
954 IN HANDLE ClientToken
,
955 IN ACCESS_MASK DesiredAccess
,
956 IN PGENERIC_MAPPING GenericMapping
,
957 OUT PPRIVILEGE_SET PrivilegeSet
,
958 OUT PULONG ReturnLength
,
959 OUT PULONG GrantedAccess
,
960 OUT PBOOLEAN AccessStatus
);