2 this file defines interfaces mainly exposed to device drivers and
12 #include "winbase.h" /* fixme: should be taken out sometimes */
21 #undef Status /* conflict with X11-includes*/
23 typedef struct _IO_STATUS_BLOCK
29 ULONG_PTR Information;
30 } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
32 typedef VOID NTAPI (*PIO_APC_ROUTINE) ( PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG Reserved );
39 typedef struct _KEY_BASIC_INFORMATION {
40 LARGE_INTEGER LastWriteTime;
44 } KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION;
46 typedef struct _KEY_NODE_INFORMATION
48 LARGE_INTEGER LastWriteTime;
55 } KEY_NODE_INFORMATION, *PKEY_NODE_INFORMATION;
57 typedef struct _KEY_FULL_INFORMATION
59 LARGE_INTEGER LastWriteTime;
67 ULONG MaxValueNameLen;
68 ULONG MaxValueDataLen;
70 } KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION;
72 typedef enum _KEY_INFORMATION_CLASS
77 } KEY_INFORMATION_CLASS;
79 typedef struct _KEY_VALUE_ENTRY
81 PUNICODE_STRING ValueName;
85 } KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY;
87 /* value information */
88 typedef struct _KEY_VALUE_BASIC_INFORMATION
94 } KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION;
96 typedef struct _KEY_VALUE_FULL_INFORMATION
105 } KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION;
107 typedef struct _KEY_VALUE_PARTIAL_INFORMATION
113 } KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
115 typedef enum _KEY_VALUE_INFORMATION_CLASS
117 KeyValueBasicInformation,
118 KeyValueFullInformation,
119 KeyValuePartialInformation,
120 KeyValueFullInformationAlign64,
121 KeyValuePartialInformationAlign64
122 } KEY_VALUE_INFORMATION_CLASS;
124 NTSTATUS WINAPI RtlFormatCurrentUserKeyPath(
125 PUNICODE_STRING KeyPath);
127 /* thread information */
129 typedef enum _THREADINFOCLASS
130 { ThreadBasicInformation,
135 ThreadImpersonationToken,
136 ThreadDescriptorTableEntry,
137 ThreadEnableAlignmentFaultFixup,
138 ThreadEventPair_Reusable,
139 ThreadQuerySetWin32StartAddress,
141 ThreadPerformanceCount,
143 ThreadIdealProcessor,
145 ThreadSetTlsArrayAddress,
150 /* file information */
152 typedef enum _FILE_INFORMATION_CLASS {
153 FileDirectoryInformation = 1,
154 FileFullDirectoryInformation,
155 FileBothDirectoryInformation,
156 FileBasicInformation,
157 FileStandardInformation,
158 FileInternalInformation,
160 FileAccessInformation,
162 FileRenameInformation,
164 FileNamesInformation,
165 FileDispositionInformation,
166 FilePositionInformation,
167 FileFullEaInformation,
169 FileAlignmentInformation,
171 FileAllocationInformation,
172 FileEndOfFileInformation,
173 FileAlternateNameInformation,
174 FileStreamInformation,
176 FilePipeLocalInformation,
177 FilePipeRemoteInformation,
178 FileMailslotQueryInformation,
179 FileMailslotSetInformation,
180 FileCompressionInformation,
181 FileObjectIdInformation,
182 FileCompletionInformation,
183 FileMoveClusterInformation,
184 FileQuotaInformation,
185 FileReparsePointInformation,
186 FileNetworkOpenInformation,
187 FileAttributeTagInformation,
188 FileTrackingInformation,
189 FileMaximumInformation
190 } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
192 typedef enum _FSINFOCLASS {
193 FileFsVolumeInformation = 1,
194 FileFsLabelInformation,
195 FileFsSizeInformation,
196 FileFsDeviceInformation,
197 FileFsAttributeInformation,
198 FileFsControlInformation,
199 FileFsFullSizeInformation,
200 FileFsObjectIdInformation,
201 FileFsMaximumInformation
202 } FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
204 typedef enum _SECTION_INHERIT
211 /* object information */
213 typedef enum _OBJECT_INFORMATION_CLASS
217 } OBJECT_INFORMATION_CLASS, *POBJECT_INFORMATION_CLASS;
220 /* system information */
222 typedef enum SYSTEM_INFORMATION_CLASS
227 SystemPerformanceInformation
228 } SYSTEM_INFORMATION_CLASS, *PSYSTEM_INFORMATION_CLASS;
230 /* reading coffee grounds... */
231 typedef struct _THREAD_INFO
238 } THREAD_INFO, PTHREAD_INFO;
240 typedef struct _VM_COUNTERS_
241 { ULONG PeakVirtualSize;
243 ULONG PageFaultCount;
244 ULONG PeakWorkingSetSize;
245 ULONG WorkingSetSize;
246 ULONG QuotaPeakPagedPoolUsage;
247 ULONG QuotaPagedPoolUsage;
248 ULONG QuotaPeakNonPagedPoolUsage;
249 ULONG QuotaNonPagedPoolUsage;
251 ULONG PeakPagefileUsage;
252 } VM_COUNTERS, *PVM_COUNTERS;
254 /* process information */
256 typedef struct _PROCESS_INFO
257 { DWORD Offset; /* 00 offset to next PROCESS_INFO ok*/
258 DWORD ThreadCount; /* 04 number of ThreadInfo member ok */
260 FILETIME CreationTime; /* 20 */
262 PWCHAR ProcessName; /* 3c ok */
264 DWORD ProcessID; /* 44 ok*/
265 DWORD ParentProcessID;
267 DWORD Unknown3[2]; /* 50 */
268 ULONG PeakVirtualSize;
270 ULONG PageFaultCount;
271 ULONG PeakWorkingSetSize;
272 ULONG WorkingSetSize;
273 ULONG QuotaPeakPagedPoolUsage;
274 ULONG QuotaPagedPoolUsage;
275 ULONG QuotaPeakNonPagedPoolUsage;
276 ULONG QuotaNonPagedPoolUsage;
278 ULONG PeakPagefileUsage;
281 THREAD_INFO ati[ANYSIZE_ARRAY]; /* 94 size=0x40*/
282 } PROCESS_INFO, PPROCESS_INFO;
284 NTSTATUS WINAPI NtQuerySystemInformation(
285 IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
286 OUT PVOID SystemInformation,
288 OUT PULONG ResultLength);
291 * system configuration
295 typedef struct _SYSTEM_TIME_ADJUSTMENT
297 ULONG TimeAdjustment;
298 BOOLEAN TimeAdjustmentDisabled;
300 } SYSTEM_TIME_ADJUSTMENT, *PSYSTEM_TIME_ADJUSTMENT;
302 typedef struct _SYSTEM_CONFIGURATION_INFO
307 { WORD ProcessorArchitecture;
312 PVOID MinimumApplicationAddress;
313 PVOID MaximumApplicationAddress;
314 ULONG ActiveProcessorMask;
315 ULONG NumberOfProcessors;
317 ULONG AllocationGranularity;
319 WORD ProcessorRevision;
321 } SYSTEM_CONFIGURATION_INFO, *PSYSTEM_CONFIGURATION_INFO;
324 typedef struct _SYSTEM_CACHE_INFORMATION
328 ULONG PageFaultCount;
329 ULONG MinimumWorkingSet;
330 ULONG MaximumWorkingSet;
333 } SYSTEM_CACHE_INFORMATION;
336 * NtQueryProcessInformation
339 /* parameter ProcessInformationClass */
341 typedef enum _PROCESSINFOCLASS
342 { ProcessBasicInformation,
348 ProcessRaisePriority,
350 ProcessExceptionPort,
352 ProcessLdtInformation,
354 ProcessDefaultHardErrorMode,
355 ProcessIoPortHandlers,
356 ProcessPooledUsageAndLimits,
357 ProcessWorkingSetWatch,
359 ProcessEnableAlignmentFaultFixup,
360 ProcessPriorityClass,
361 ProcessWx86Information,
364 ProcessPriorityBoost,
366 ProcessSessionInformation,
367 ProcessForegroundInformation,
368 ProcessWow64Information,
372 /* parameter ProcessInformation (depending on ProcessInformationClass) */
374 typedef struct _PROCESS_BASIC_INFORMATION
376 DWORD PebBaseAddress;
379 ULONG UniqueProcessId;
380 ULONG InheritedFromUniqueProcessId;
381 } PROCESS_BASIC_INFORMATION;
383 NTSTATUS WINAPI NtQueryInformationProcess(
384 IN HANDLE ProcessHandle,
385 IN PROCESSINFOCLASS ProcessInformationClass,
386 OUT PVOID ProcessInformation,
387 IN ULONG ProcessInformationLength,
388 OUT PULONG ReturnLength);
390 #define NtCurrentProcess() ( (HANDLE) -1 )
396 typedef enum _TIMER_TYPE
403 /* token functions */
405 NTSTATUS WINAPI NtOpenProcessToken(
406 HANDLE ProcessHandle,
408 HANDLE *TokenHandle);
410 NTSTATUS WINAPI NtOpenThreadToken(
414 HANDLE *TokenHandle);
416 NTSTATUS WINAPI NtAdjustPrivilegesToken(
417 IN HANDLE TokenHandle,
418 IN BOOLEAN DisableAllPrivileges,
419 IN PTOKEN_PRIVILEGES NewState,
420 IN DWORD BufferLength,
421 OUT PTOKEN_PRIVILEGES PreviousState,
422 OUT PDWORD ReturnLength);
424 NTSTATUS WINAPI NtQueryInformationToken(
426 DWORD tokeninfoclass,
428 DWORD tokeninfolength,
433 BOOLEAN WINAPI RtlAllocateAndInitializeSid (
434 PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
435 BYTE nSubAuthorityCount,
436 DWORD nSubAuthority0, DWORD nSubAuthority1,
437 DWORD nSubAuthority2, DWORD nSubAuthority3,
438 DWORD nSubAuthority4, DWORD nSubAuthority5,
439 DWORD nSubAuthority6, DWORD nSubAuthority7,
442 BOOL WINAPI RtlInitializeSid(
444 PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
445 BYTE nSubAuthorityCount);
447 DWORD WINAPI RtlFreeSid(
450 BOOL WINAPI RtlEqualSid(
454 DWORD WINAPI RtlLengthRequiredSid(
457 DWORD WINAPI RtlLengthSid(
460 LPDWORD WINAPI RtlSubAuthoritySid(
464 LPBYTE WINAPI RtlSubAuthorityCountSid(
467 DWORD WINAPI RtlCopySid(
472 BOOL WINAPI RtlValidSid(
475 BOOL WINAPI RtlEqualPrefixSid(
479 PSID_IDENTIFIER_AUTHORITY WINAPI RtlIdentifierAuthoritySid(
482 /* security descriptor functions */
484 NTSTATUS WINAPI RtlCreateSecurityDescriptor(
485 PSECURITY_DESCRIPTOR lpsd,
488 NTSTATUS WINAPI RtlValidSecurityDescriptor(
489 PSECURITY_DESCRIPTOR SecurityDescriptor);
491 ULONG WINAPI RtlLengthSecurityDescriptor(
492 PSECURITY_DESCRIPTOR SecurityDescriptor);
494 NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(
495 IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
496 OUT PBOOLEAN lpbDaclPresent,
498 OUT PBOOLEAN lpbDaclDefaulted);
500 NTSTATUS WINAPI RtlSetDaclSecurityDescriptor (
501 PSECURITY_DESCRIPTOR lpsd,
504 BOOLEAN dacldefaulted );
506 NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(
507 IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
508 OUT PBOOLEAN lpbSaclPresent,
510 OUT PBOOLEAN lpbSaclDefaulted);
512 NTSTATUS WINAPI RtlSetSaclSecurityDescriptor (
513 PSECURITY_DESCRIPTOR lpsd,
516 BOOLEAN sacldefaulted);
518 NTSTATUS WINAPI RtlGetOwnerSecurityDescriptor(
519 PSECURITY_DESCRIPTOR SecurityDescriptor,
521 PBOOLEAN OwnerDefaulted);
523 NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(
524 PSECURITY_DESCRIPTOR lpsd,
526 BOOLEAN ownerdefaulted);
528 NTSTATUS WINAPI RtlSetGroupSecurityDescriptor (
529 PSECURITY_DESCRIPTOR lpsd,
531 BOOLEAN groupdefaulted);
533 NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(
534 PSECURITY_DESCRIPTOR SecurityDescriptor,
536 PBOOLEAN GroupDefaulted);
538 NTSTATUS WINAPI RtlMakeSelfRelativeSD(
539 IN PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
540 IN PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
541 IN OUT LPDWORD lpdwBufferLength);
543 NTSTATUS WINAPI RtlGetControlSecurityDescriptor(
544 PSECURITY_DESCRIPTOR pSecurityDescriptor,
545 PSECURITY_DESCRIPTOR_CONTROL pControl,
546 LPDWORD lpdwRevision);
550 NTSTATUS WINAPI RtlCreateAcl(
555 BOOLEAN WINAPI RtlFirstFreeAce(
559 NTSTATUS WINAPI RtlAddAce(
563 PACE_HEADER acestart,
566 BOOL WINAPI RtlAddAccessAllowedAce(
568 IN DWORD dwAceRevision,
572 BOOL WINAPI AddAccessAllowedAceEx(
574 IN DWORD dwAceRevision,
579 DWORD WINAPI RtlGetAce(
584 /* string functions */
586 DWORD WINAPI RtlAnsiStringToUnicodeSize(const STRING*);
587 NTSTATUS WINAPI RtlAnsiStringToUnicodeString(UNICODE_STRING*,const STRING *,BOOLEAN);
588 NTSTATUS WINAPI RtlAppendAsciizToString(STRING*,LPCSTR);
589 NTSTATUS WINAPI RtlAppendStringToString(STRING*,const STRING*);
590 NTSTATUS WINAPI RtlAppendUnicodeStringToString(UNICODE_STRING*,const UNICODE_STRING*);
591 NTSTATUS WINAPI RtlAppendUnicodeToString(UNICODE_STRING*,LPCWSTR);
592 LONG WINAPI RtlCompareString(const STRING*,const STRING*,BOOLEAN);
593 LONG WINAPI RtlCompareUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
594 void WINAPI RtlCopyString(STRING*,const STRING*);
595 void WINAPI RtlCopyUnicodeString(UNICODE_STRING*,const UNICODE_STRING*);
596 BOOLEAN WINAPI RtlCreateUnicodeString(PUNICODE_STRING,LPCWSTR);
597 BOOLEAN WINAPI RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING,LPCSTR);
598 void WINAPI RtlEraseUnicodeString(UNICODE_STRING*);
599 BOOLEAN WINAPI RtlEqualString(const STRING*,const STRING*,BOOLEAN);
600 BOOLEAN WINAPI RtlEqualUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
601 void WINAPI RtlFreeAnsiString(PSTRING);
602 void WINAPI RtlFreeOemString(PSTRING);
603 void WINAPI RtlFreeUnicodeString(PUNICODE_STRING);
604 void WINAPI RtlInitAnsiString(PSTRING,LPCSTR);
605 void WINAPI RtlInitString(PSTRING,LPCSTR);
606 void WINAPI RtlInitUnicodeString(PUNICODE_STRING,LPCWSTR);
607 NTSTATUS WINAPI RtlMultiByteToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
608 NTSTATUS WINAPI RtlMultiByteToUnicodeSize(DWORD*,LPCSTR,UINT);
609 UINT WINAPI RtlOemStringToUnicodeSize(const STRING*);
610 NTSTATUS WINAPI RtlOemStringToUnicodeString(UNICODE_STRING*,const STRING*,BOOLEAN);
611 NTSTATUS WINAPI RtlOemToUnicodeN(LPWSTR,DWORD,LPDWORD,LPCSTR,DWORD);
612 BOOLEAN WINAPI RtlPrefixString(const STRING*,const STRING*,BOOLEAN);
613 BOOLEAN WINAPI RtlPrefixUnicodeString(const UNICODE_STRING*,const UNICODE_STRING*,BOOLEAN);
614 DWORD WINAPI RtlUnicodeStringToAnsiSize(const UNICODE_STRING*);
615 NTSTATUS WINAPI RtlUnicodeStringToAnsiString(STRING*,const UNICODE_STRING*,BOOLEAN);
616 DWORD WINAPI RtlUnicodeStringToOemSize(const UNICODE_STRING*);
617 NTSTATUS WINAPI RtlUnicodeStringToOemString(STRING*,const UNICODE_STRING*,BOOLEAN);
618 NTSTATUS WINAPI RtlUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
619 NTSTATUS WINAPI RtlUnicodeToMultiByteSize(DWORD*,LPCWSTR,UINT);
620 NTSTATUS WINAPI RtlUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
621 NTSTATUS WINAPI RtlUpcaseUnicodeString(UNICODE_STRING*,const UNICODE_STRING *,BOOLEAN);
622 NTSTATUS WINAPI RtlUpcaseUnicodeStringToAnsiString(STRING*,const UNICODE_STRING*,BOOLEAN);
623 NTSTATUS WINAPI RtlUpcaseUnicodeStringToOemString(STRING*,const UNICODE_STRING*,BOOLEAN);
624 NTSTATUS WINAPI RtlUpcaseUnicodeToMultiByteN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
625 NTSTATUS WINAPI RtlUpcaseUnicodeToOemN(LPSTR,DWORD,LPDWORD,LPCWSTR,DWORD);
627 DWORD WINAPI RtlIsTextUnicode(
632 INT __cdecl wcstol(LPCWSTR,LPWSTR*,INT);
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 void WINAPI NtQuerySystemTime( LARGE_INTEGER *time );
699 BOOLEAN WINAPI RtlTimeToSecondsSince1980( const FILETIME *time, LPDWORD res );
700 BOOLEAN WINAPI RtlTimeToSecondsSince1970( const FILETIME *time, LPDWORD res );
701 void WINAPI RtlSecondsSince1970ToTime( DWORD time, FILETIME *res );
702 void WINAPI RtlSecondsSince1980ToTime( DWORD time, FILETIME *res );
706 /* Data structure for heap definition. This includes various
707 sizing parameters and callback routines, which, if left NULL,
708 result in default behavior */
711 { ULONG Length; /* = sizeof(RTL_HEAP_DEFINITION) */
713 } RTL_HEAP_DEFINITION, *PRTL_HEAP_DEFINITION;
715 HANDLE WINAPI RtlCreateHeap(ULONG,PVOID,ULONG,ULONG,PVOID,PRTL_HEAP_DEFINITION);
716 HANDLE WINAPI RtlDestroyHeap(HANDLE);
717 PVOID WINAPI RtlAllocateHeap(HANDLE,ULONG,ULONG);
718 BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID);
719 PVOID WINAPI RtlReAllocateHeap(HANDLE,ULONG,PVOID,ULONG);
720 ULONG WINAPI RtlCompactHeap(HANDLE,ULONG);
721 BOOLEAN WINAPI RtlLockHeap(HANDLE);
722 BOOLEAN WINAPI RtlUnlockHeap(HANDLE);
723 ULONG WINAPI RtlSizeHeap(HANDLE,ULONG,PVOID);
724 BOOLEAN WINAPI RtlValidateHeap(HANDLE,ULONG,PCVOID);
725 ULONG WINAPI RtlGetProcessHeaps(ULONG,HANDLE*);
729 void WINAPI NtRaiseException(
730 PEXCEPTION_RECORD,PCONTEXT,BOOL);
732 void WINAPI RtlRaiseException(
735 void WINAPI RtlRaiseStatus(
738 void WINAPI RtlUnwind(
741 PEXCEPTION_RECORD,DWORD);
743 /* process environment block */
744 VOID WINAPI RtlAcquirePebLock(void);
745 VOID WINAPI RtlReleasePebLock(void);
748 LONGLONG WINAPI RtlConvertLongToLargeInteger( LONG a );
749 LONGLONG WINAPI RtlEnlargedIntegerMultiply( INT a, INT b );
750 LONGLONG WINAPI RtlExtendedMagicDivide( LONGLONG a, LONGLONG b, INT shift );
751 LONGLONG WINAPI RtlExtendedIntegerMultiply( LONGLONG a, INT b );
752 LONGLONG WINAPI RtlExtendedLargeIntegerDivide( LONGLONG a, INT b, INT *rem );
753 LONGLONG WINAPI RtlLargeIntegerAdd( LONGLONG a, LONGLONG b );
754 LONGLONG WINAPI RtlLargeIntegerArithmeticShift( LONGLONG a, INT count );
755 LONGLONG WINAPI RtlLargeIntegerNegate( LONGLONG a );
756 LONGLONG WINAPI RtlLargeIntegerShiftLeft( LONGLONG a, INT count );
757 LONGLONG WINAPI RtlLargeIntegerShiftRight( LONGLONG a, INT count );
758 LONGLONG WINAPI RtlLargeIntegerSubtract( LONGLONG a, LONGLONG b );
759 ULONGLONG WINAPI RtlEnlargedUnsignedMultiply( UINT a, UINT b );
760 UINT WINAPI RtlEnlargedUnsignedDivide( ULONGLONG a, UINT b, UINT *remptr );
761 ULONGLONG WINAPI RtlConvertUlongToLargeInteger( ULONG a );
762 ULONGLONG WINAPI RtlLargeIntegerDivide( ULONGLONG a, ULONGLONG b, ULONGLONG *rem );
765 DWORD WINAPI RtlCreateEnvironment(
769 DWORD WINAPI RtlDestroyEnvironment(
772 DWORD WINAPI RtlQueryEnvironmentVariable_U(
775 PUNICODE_STRING val) ;
777 DWORD WINAPI RtlSetEnvironmentVariable(
780 PUNICODE_STRING val);
782 /* object security */
784 DWORD WINAPI RtlNewSecurityObject(
792 DWORD WINAPI RtlDeleteSecurityObject(
796 NtQuerySecurityObject(
798 IN SECURITY_INFORMATION RequestedInformation,
799 OUT PSECURITY_DESCRIPTOR pSecurityDesriptor,
801 OUT PULONG ResultLength);
806 IN SECURITY_INFORMATION SecurityInformation,
807 IN PSECURITY_DESCRIPTOR SecurityDescriptor);
809 /* registry functions */
811 NTSTATUS WINAPI NtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,
812 const UNICODE_STRING*,ULONG,PULONG);
813 NTSTATUS WINAPI NtDeleteKey(HANDLE);
814 NTSTATUS WINAPI NtDeleteValueKey(HANDLE,const UNICODE_STRING*);
815 NTSTATUS WINAPI NtOpenKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*);
816 NTSTATUS WINAPI NtQueryKey(HANDLE,KEY_INFORMATION_CLASS,void*,DWORD,DWORD*);
817 NTSTATUS WINAPI NtSetValueKey(HANDLE,const UNICODE_STRING*,ULONG,ULONG,const void*,ULONG);
818 NTSTATUS WINAPI NtEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void*,DWORD,DWORD*);
819 NTSTATUS WINAPI NtQueryValueKey(HANDLE,const UNICODE_STRING*,KEY_VALUE_INFORMATION_CLASS,
821 NTSTATUS WINAPI NtLoadKey(const OBJECT_ATTRIBUTES*,const OBJECT_ATTRIBUTES*);
824 NTSTATUS WINAPI NtEnumerateValueKey(
827 KEY_VALUE_INFORMATION_CLASS KeyInformationClass,
828 PVOID KeyInformation,
830 PULONG ResultLength);
832 NTSTATUS WINAPI NtFlushKey(HANDLE KeyHandle);
834 NTSTATUS WINAPI NtNotifyChangeKey(
837 IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
838 IN PVOID ApcContext OPTIONAL,
839 OUT PIO_STATUS_BLOCK IoStatusBlock,
840 IN ULONG CompletionFilter,
841 IN BOOLEAN Asynchroneous,
842 OUT PVOID ChangeBuffer,
844 IN BOOLEAN WatchSubtree);
846 NTSTATUS WINAPI NtQueryMultipleValueKey(
848 PVALENTW ListOfValuesToQuery,
850 PVOID MultipleValueInformation,
852 PULONG ReturnLength);
854 NTSTATUS WINAPI NtReplaceKey(
855 IN POBJECT_ATTRIBUTES ObjectAttributes,
857 IN POBJECT_ATTRIBUTES ReplacedObjectAttributes);
859 NTSTATUS WINAPI NtRestoreKey(
864 NTSTATUS WINAPI NtSaveKey(
866 IN HANDLE FileHandle);
868 NTSTATUS WINAPI NtSetInformationKey(
870 IN const int KeyInformationClass,
871 IN PVOID KeyInformation,
872 IN ULONG KeyInformationLength);
874 NTSTATUS WINAPI NtUnloadKey(
875 IN HANDLE KeyHandle);
877 NTSTATUS WINAPI NtClose(
880 NTSTATUS WINAPI NtTerminateProcess( HANDLE handle, LONG exit_code );
881 NTSTATUS WINAPI NtTerminateThread( HANDLE handle, LONG exit_code );
883 NTSTATUS WINAPI NtClearEvent(HANDLE);
884 NTSTATUS WINAPI NtCreateEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *,BOOLEAN,BOOLEAN);
885 NTSTATUS WINAPI NtCreateSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,ULONG);
886 NTSTATUS WINAPI NtOpenEvent(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES *attr);
887 NTSTATUS WINAPI NtPulseEvent(HANDLE,PULONG);
888 NTSTATUS WINAPI NtReleaseSemaphore(HANDLE,ULONG,PULONG);
889 NTSTATUS WINAPI NtResetEvent(HANDLE,PULONG);
890 NTSTATUS WINAPI NtSetEvent(HANDLE,PULONG);
892 NTSTATUS WINAPI RtlInitializeCriticalSection( RTL_CRITICAL_SECTION *crit );
893 NTSTATUS WINAPI RtlInitializeCriticalSectionAndSpinCount( RTL_CRITICAL_SECTION *crit, DWORD spincount );
894 NTSTATUS WINAPI RtlDeleteCriticalSection( RTL_CRITICAL_SECTION *crit );
895 NTSTATUS WINAPI RtlpWaitForCriticalSection( RTL_CRITICAL_SECTION *crit );
896 NTSTATUS WINAPI RtlpUnWaitCriticalSection( RTL_CRITICAL_SECTION *crit );
897 NTSTATUS WINAPI RtlEnterCriticalSection( RTL_CRITICAL_SECTION *crit );
898 BOOL WINAPI RtlTryEnterCriticalSection( RTL_CRITICAL_SECTION *crit );
899 NTSTATUS WINAPI RtlLeaveCriticalSection( RTL_CRITICAL_SECTION *crit );
901 /* string functions */
902 extern LPSTR _strlwr( LPSTR str );
903 extern LPSTR _strupr( LPSTR str );
907 #if defined(__i386__) && defined(__GNUC__)
908 static inline void WINAPI DbgBreakPoint(void) { __asm__ __volatile__("int3"); }
909 static inline void WINAPI DbgUserBreakPoint(void) { __asm__ __volatile__("int3"); }
910 #else /* __i386__ && __GNUC__ */
911 void WINAPI DbgBreakPoint(void);
912 void WINAPI DbgUserBreakPoint(void);
913 #endif /* __i386__ && __GNUC__ */
914 void WINAPIV DbgPrint(LPCSTR fmt, ...);
916 DWORD WINAPI RtlAdjustPrivilege(DWORD x1,DWORD x2,DWORD x3,DWORD x4);
917 DWORD WINAPI RtlIntegerToChar(DWORD x1,DWORD x2,DWORD x3,DWORD x4);
918 LPVOID WINAPI RtlNormalizeProcessParams(LPVOID x);
919 DWORD WINAPI RtlNtStatusToDosError(DWORD error);
920 BOOLEAN WINAPI RtlGetNtProductType(LPDWORD type);
921 PIMAGE_NT_HEADERS WINAPI RtlImageNtHeader(HMODULE hModule);
923 DWORD WINAPI RtlOpenCurrentUser(
924 IN ACCESS_MASK DesiredAccess,
925 OUT PHANDLE KeyHandle);
927 BOOLEAN WINAPI RtlDosPathNameToNtPathName_U( LPWSTR from,PUNICODE_STRING us,DWORD x2,DWORD x3);
928 BOOL WINAPI RtlImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel);
932 IN PSECURITY_DESCRIPTOR SecurityDescriptor,
933 IN HANDLE ClientToken,
934 IN ACCESS_MASK DesiredAccess,
935 IN PGENERIC_MAPPING GenericMapping,
936 OUT PPRIVILEGE_SET PrivilegeSet,
937 OUT PULONG ReturnLength,
938 OUT PULONG GrantedAccess,
939 OUT PBOOLEAN AccessStatus);