Avoid crash on usage message.
[wine/wine64.git] / include / ntddk.h
blob787d2ce204fdd2a12df6909e6fdfb90f4b3dc8ad
1 /*
2 this file defines interfaces mainly exposed to device drivers and
3 native nt dll's
5 */
6 #ifndef __WINE_NTDDK_H
7 #define __WINE_NTDDK_H
9 #include "ntdef.h"
10 #include "winnt.h"
11 #include "winbase.h" /* fixme: should be taken out sometimes */
13 #include "pshpack1.h"
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
19 /******************
20 * asynchronous I/O
22 #undef Status /* conflict with X11-includes*/
24 typedef struct _IO_STATUS_BLOCK
26 union {
27 NTSTATUS Status;
28 PVOID Pointer;
29 } DUMMYUNIONNAME;
30 ULONG_PTR Information;
31 } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;
33 typedef VOID (NTAPI *PIO_APC_ROUTINE) ( PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG Reserved );
36 registry
39 /* key information */
40 typedef struct _KEY_BASIC_INFORMATION {
41 FILETIME LastWriteTime;
42 ULONG TitleIndex;
43 ULONG NameLength;
44 WCHAR Name[1];
45 } KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION;
47 typedef struct _KEY_NODE_INFORMATION
49 FILETIME LastWriteTime;
50 ULONG TitleIndex;
51 ULONG ClassOffset;
52 ULONG ClassLength;
53 ULONG NameLength;
54 WCHAR Name[1];
55 /* Class[1]; */
56 } KEY_NODE_INFORMATION, *PKEY_NODE_INFORMATION;
58 typedef struct _KEY_FULL_INFORMATION
60 FILETIME LastWriteTime;
61 ULONG TitleIndex;
62 ULONG ClassOffset;
63 ULONG ClassLength;
64 ULONG SubKeys;
65 ULONG MaxNameLen;
66 ULONG MaxClassLen;
67 ULONG Values;
68 ULONG MaxValueNameLen;
69 ULONG MaxValueDataLen;
70 WCHAR Class[1];
71 } KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION;
73 typedef enum _KEY_INFORMATION_CLASS
75 KeyBasicInformation,
76 KeyNodeInformation,
77 KeyFullInformation
78 } KEY_INFORMATION_CLASS;
80 typedef struct _KEY_VALUE_ENTRY
82 PUNICODE_STRING ValueName;
83 ULONG DataLength;
84 ULONG DataOffset;
85 ULONG Type;
86 } KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY;
88 /* value information */
89 typedef struct _KEY_VALUE_BASIC_INFORMATION
91 ULONG TitleIndex;
92 ULONG Type;
93 ULONG NameLength;
94 WCHAR Name[1];
95 } KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION;
97 typedef struct _KEY_VALUE_FULL_INFORMATION
99 ULONG TitleIndex;
100 ULONG Type;
101 ULONG DataOffset;
102 ULONG DataLength;
103 ULONG NameLength;
104 WCHAR Name[1];
105 /* UCHAR Data[1];*/
106 } KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION;
108 typedef struct _KEY_VALUE_PARTIAL_INFORMATION
110 ULONG TitleIndex;
111 ULONG Type;
112 ULONG DataLength;
113 UCHAR Data[1];
114 } KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
116 typedef enum _KEY_VALUE_INFORMATION_CLASS
118 KeyValueBasicInformation,
119 KeyValueFullInformation,
120 KeyValuePartialInformation,
121 KeyValueFullInformationAlign64,
122 KeyValuePartialInformationAlign64
123 } KEY_VALUE_INFORMATION_CLASS;
125 NTSTATUS WINAPI RtlFormatCurrentUserKeyPath(
126 PUNICODE_STRING KeyPath);
128 /* thread information */
130 typedef enum _THREADINFOCLASS
131 { ThreadBasicInformation,
132 ThreadTimes,
133 ThreadPriority,
134 ThreadBasePriority,
135 ThreadAffinityMask,
136 ThreadImpersonationToken,
137 ThreadDescriptorTableEntry,
138 ThreadEnableAlignmentFaultFixup,
139 ThreadEventPair_Reusable,
140 ThreadQuerySetWin32StartAddress,
141 ThreadZeroTlsCell,
142 ThreadPerformanceCount,
143 ThreadAmILastThread,
144 ThreadIdealProcessor,
145 ThreadPriorityBoost,
146 ThreadSetTlsArrayAddress,
147 ThreadIsIoPending,
148 MaxThreadInfoClass
149 } THREADINFOCLASS;
151 /* file information */
153 typedef enum _FILE_INFORMATION_CLASS {
154 FileDirectoryInformation = 1,
155 FileFullDirectoryInformation,
156 FileBothDirectoryInformation,
157 FileBasicInformation,
158 FileStandardInformation,
159 FileInternalInformation,
160 FileEaInformation,
161 FileAccessInformation,
162 FileNameInformation,
163 FileRenameInformation,
164 FileLinkInformation,
165 FileNamesInformation,
166 FileDispositionInformation,
167 FilePositionInformation,
168 FileFullEaInformation,
169 FileModeInformation,
170 FileAlignmentInformation,
171 FileAllInformation,
172 FileAllocationInformation,
173 FileEndOfFileInformation,
174 FileAlternateNameInformation,
175 FileStreamInformation,
176 FilePipeInformation,
177 FilePipeLocalInformation,
178 FilePipeRemoteInformation,
179 FileMailslotQueryInformation,
180 FileMailslotSetInformation,
181 FileCompressionInformation,
182 FileObjectIdInformation,
183 FileCompletionInformation,
184 FileMoveClusterInformation,
185 FileQuotaInformation,
186 FileReparsePointInformation,
187 FileNetworkOpenInformation,
188 FileAttributeTagInformation,
189 FileTrackingInformation,
190 FileMaximumInformation
191 } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
193 typedef enum _FSINFOCLASS {
194 FileFsVolumeInformation = 1,
195 FileFsLabelInformation,
196 FileFsSizeInformation,
197 FileFsDeviceInformation,
198 FileFsAttributeInformation,
199 FileFsControlInformation,
200 FileFsFullSizeInformation,
201 FileFsObjectIdInformation,
202 FileFsMaximumInformation
203 } FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
205 typedef enum _SECTION_INHERIT
207 ViewShare = 1,
208 ViewUnmap = 2
210 } SECTION_INHERIT;
212 /* object information */
214 typedef enum _OBJECT_INFORMATION_CLASS
216 DunnoTheConstants1
218 } OBJECT_INFORMATION_CLASS, *POBJECT_INFORMATION_CLASS;
221 /* system information */
223 typedef enum SYSTEM_INFORMATION_CLASS
224 { Unknown1 = 1,
225 Unknown2,
226 Unknown3,
227 Unknown4,
228 SystemPerformanceInformation
229 } SYSTEM_INFORMATION_CLASS, *PSYSTEM_INFORMATION_CLASS;
231 /* reading coffee grounds... */
232 typedef struct _THREAD_INFO
233 { DWORD Unknown1[6];
234 DWORD ThreadID;
235 DWORD Unknown2[3];
236 DWORD Status;
237 DWORD WaitReason;
238 DWORD Unknown3[4];
239 } THREAD_INFO, PTHREAD_INFO;
241 typedef struct _VM_COUNTERS_
242 { ULONG PeakVirtualSize;
243 ULONG VirtualSize;
244 ULONG PageFaultCount;
245 ULONG PeakWorkingSetSize;
246 ULONG WorkingSetSize;
247 ULONG QuotaPeakPagedPoolUsage;
248 ULONG QuotaPagedPoolUsage;
249 ULONG QuotaPeakNonPagedPoolUsage;
250 ULONG QuotaNonPagedPoolUsage;
251 ULONG PagefileUsage;
252 ULONG PeakPagefileUsage;
253 } VM_COUNTERS, *PVM_COUNTERS;
255 /* process information */
257 typedef struct _PROCESS_INFO
258 { DWORD Offset; /* 00 offset to next PROCESS_INFO ok*/
259 DWORD ThreadCount; /* 04 number of ThreadInfo member ok */
260 DWORD Unknown1[6];
261 FILETIME CreationTime; /* 20 */
262 DWORD Unknown2[5];
263 PWCHAR ProcessName; /* 3c ok */
264 DWORD BasePriority;
265 DWORD ProcessID; /* 44 ok*/
266 DWORD ParentProcessID;
267 DWORD HandleCount;
268 DWORD Unknown3[2]; /* 50 */
269 ULONG PeakVirtualSize;
270 ULONG VirtualSize;
271 ULONG PageFaultCount;
272 ULONG PeakWorkingSetSize;
273 ULONG WorkingSetSize;
274 ULONG QuotaPeakPagedPoolUsage;
275 ULONG QuotaPagedPoolUsage;
276 ULONG QuotaPeakNonPagedPoolUsage;
277 ULONG QuotaNonPagedPoolUsage;
278 ULONG PagefileUsage;
279 ULONG PeakPagefileUsage;
280 DWORD PrivateBytes;
281 DWORD Unknown6[4];
282 THREAD_INFO ati[ANYSIZE_ARRAY]; /* 94 size=0x40*/
283 } PROCESS_INFO, PPROCESS_INFO;
285 NTSTATUS WINAPI NtQuerySystemInformation(
286 IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
287 OUT PVOID SystemInformation,
288 IN ULONG Length,
289 OUT PULONG ResultLength);
292 * system configuration
296 typedef struct _SYSTEM_TIME_ADJUSTMENT
298 ULONG TimeAdjustment;
299 BOOLEAN TimeAdjustmentDisabled;
301 } SYSTEM_TIME_ADJUSTMENT, *PSYSTEM_TIME_ADJUSTMENT;
303 typedef struct _SYSTEM_CONFIGURATION_INFO
305 union
306 { ULONG OemId;
307 struct
308 { WORD ProcessorArchitecture;
309 WORD Reserved;
310 } tag1;
311 } tag2;
312 ULONG PageSize;
313 PVOID MinimumApplicationAddress;
314 PVOID MaximumApplicationAddress;
315 ULONG ActiveProcessorMask;
316 ULONG NumberOfProcessors;
317 ULONG ProcessorType;
318 ULONG AllocationGranularity;
319 WORD ProcessorLevel;
320 WORD ProcessorRevision;
322 } SYSTEM_CONFIGURATION_INFO, *PSYSTEM_CONFIGURATION_INFO;
325 typedef struct _SYSTEM_CACHE_INFORMATION
327 ULONG CurrentSize;
328 ULONG PeakSize;
329 ULONG PageFaultCount;
330 ULONG MinimumWorkingSet;
331 ULONG MaximumWorkingSet;
332 ULONG Unused[4];
334 } SYSTEM_CACHE_INFORMATION;
337 * NtQueryProcessInformation
340 /* parameter ProcessInformationClass */
342 typedef enum _PROCESSINFOCLASS
343 { ProcessBasicInformation,
344 ProcessQuotaLimits,
345 ProcessIoCounters,
346 ProcessVmCounters,
347 ProcessTimes,
348 ProcessBasePriority,
349 ProcessRaisePriority,
350 ProcessDebugPort,
351 ProcessExceptionPort,
352 ProcessAccessToken,
353 ProcessLdtInformation,
354 ProcessLdtSize,
355 ProcessDefaultHardErrorMode,
356 ProcessIoPortHandlers,
357 ProcessPooledUsageAndLimits,
358 ProcessWorkingSetWatch,
359 ProcessUserModeIOPL,
360 ProcessEnableAlignmentFaultFixup,
361 ProcessPriorityClass,
362 ProcessWx86Information,
363 ProcessHandleCount,
364 ProcessAffinityMask,
365 ProcessPriorityBoost,
366 ProcessDeviceMap,
367 ProcessSessionInformation,
368 ProcessForegroundInformation,
369 ProcessWow64Information,
370 MaxProcessInfoClass
371 } PROCESSINFOCLASS;
373 /* parameter ProcessInformation (depending on ProcessInformationClass) */
375 typedef struct _PROCESS_BASIC_INFORMATION
376 { DWORD ExitStatus;
377 DWORD PebBaseAddress;
378 DWORD AffinityMask;
379 DWORD BasePriority;
380 ULONG UniqueProcessId;
381 ULONG InheritedFromUniqueProcessId;
382 } PROCESS_BASIC_INFORMATION;
384 NTSTATUS WINAPI NtQueryInformationProcess(
385 IN HANDLE ProcessHandle,
386 IN PROCESSINFOCLASS ProcessInformationClass,
387 OUT PVOID ProcessInformation,
388 IN ULONG ProcessInformationLength,
389 OUT PULONG ReturnLength);
391 #define NtCurrentProcess() ( (HANDLE) -1 )
394 * timer
397 typedef enum _TIMER_TYPE
399 NotificationTimer,
400 SynchronizationTimer
402 } TIMER_TYPE;
404 /* token functions */
406 NTSTATUS WINAPI NtOpenProcessToken(
407 HANDLE ProcessHandle,
408 DWORD DesiredAccess,
409 HANDLE *TokenHandle);
411 NTSTATUS WINAPI NtOpenThreadToken(
412 HANDLE ThreadHandle,
413 DWORD DesiredAccess,
414 BOOLEAN OpenAsSelf,
415 HANDLE *TokenHandle);
417 NTSTATUS WINAPI NtAdjustPrivilegesToken(
418 IN HANDLE TokenHandle,
419 IN BOOLEAN DisableAllPrivileges,
420 IN PTOKEN_PRIVILEGES NewState,
421 IN DWORD BufferLength,
422 OUT PTOKEN_PRIVILEGES PreviousState,
423 OUT PDWORD ReturnLength);
425 NTSTATUS WINAPI NtQueryInformationToken(
426 HANDLE token,
427 DWORD tokeninfoclass,
428 LPVOID tokeninfo,
429 DWORD tokeninfolength,
430 LPDWORD retlen );
432 /* sid functions */
434 BOOLEAN WINAPI RtlAllocateAndInitializeSid (
435 PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
436 BYTE nSubAuthorityCount,
437 DWORD nSubAuthority0, DWORD nSubAuthority1,
438 DWORD nSubAuthority2, DWORD nSubAuthority3,
439 DWORD nSubAuthority4, DWORD nSubAuthority5,
440 DWORD nSubAuthority6, DWORD nSubAuthority7,
441 PSID *pSid );
443 BOOL WINAPI RtlInitializeSid(
444 PSID pSid,
445 PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
446 BYTE nSubAuthorityCount);
448 DWORD WINAPI RtlFreeSid(
449 PSID pSid);
451 BOOL WINAPI RtlEqualSid(
452 PSID pSid1,
453 PSID pSid2 );
455 DWORD WINAPI RtlLengthRequiredSid(
456 DWORD nrofsubauths);
458 DWORD WINAPI RtlLengthSid(
459 PSID sid);
461 LPDWORD WINAPI RtlSubAuthoritySid(
462 PSID PSID,
463 DWORD nr);
465 LPBYTE WINAPI RtlSubAuthorityCountSid(
466 PSID pSid);
468 DWORD WINAPI RtlCopySid(
469 DWORD len,
470 PSID to,
471 PSID from);
473 BOOL WINAPI RtlValidSid(
474 PSID pSid);
476 BOOL WINAPI RtlEqualPrefixSid(
477 PSID pSid1,
478 PSID pSid2);
480 PSID_IDENTIFIER_AUTHORITY WINAPI RtlIdentifierAuthoritySid(
481 PSID pSid );
483 /* security descriptor functions */
485 NTSTATUS WINAPI RtlCreateSecurityDescriptor(
486 PSECURITY_DESCRIPTOR lpsd,
487 DWORD rev);
489 NTSTATUS WINAPI RtlValidSecurityDescriptor(
490 PSECURITY_DESCRIPTOR SecurityDescriptor);
492 ULONG WINAPI RtlLengthSecurityDescriptor(
493 PSECURITY_DESCRIPTOR SecurityDescriptor);
495 NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(
496 IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
497 OUT PBOOLEAN lpbDaclPresent,
498 OUT PACL *pDacl,
499 OUT PBOOLEAN lpbDaclDefaulted);
501 NTSTATUS WINAPI RtlSetDaclSecurityDescriptor (
502 PSECURITY_DESCRIPTOR lpsd,
503 BOOLEAN daclpresent,
504 PACL dacl,
505 BOOLEAN dacldefaulted );
507 NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(
508 IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
509 OUT PBOOLEAN lpbSaclPresent,
510 OUT PACL *pSacl,
511 OUT PBOOLEAN lpbSaclDefaulted);
513 NTSTATUS WINAPI RtlSetSaclSecurityDescriptor (
514 PSECURITY_DESCRIPTOR lpsd,
515 BOOLEAN saclpresent,
516 PACL sacl,
517 BOOLEAN sacldefaulted);
519 NTSTATUS WINAPI RtlGetOwnerSecurityDescriptor(
520 PSECURITY_DESCRIPTOR SecurityDescriptor,
521 PSID *Owner,
522 PBOOLEAN OwnerDefaulted);
524 NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(
525 PSECURITY_DESCRIPTOR lpsd,
526 PSID owner,
527 BOOLEAN ownerdefaulted);
529 NTSTATUS WINAPI RtlSetGroupSecurityDescriptor (
530 PSECURITY_DESCRIPTOR lpsd,
531 PSID group,
532 BOOLEAN groupdefaulted);
534 NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(
535 PSECURITY_DESCRIPTOR SecurityDescriptor,
536 PSID *Group,
537 PBOOLEAN GroupDefaulted);
539 NTSTATUS WINAPI RtlMakeSelfRelativeSD(
540 IN PSECURITY_DESCRIPTOR pAbsoluteSecurityDescriptor,
541 IN PSECURITY_DESCRIPTOR pSelfRelativeSecurityDescriptor,
542 IN OUT LPDWORD lpdwBufferLength);
544 NTSTATUS WINAPI RtlGetControlSecurityDescriptor(
545 PSECURITY_DESCRIPTOR pSecurityDescriptor,
546 PSECURITY_DESCRIPTOR_CONTROL pControl,
547 LPDWORD lpdwRevision);
549 /* acl functions */
551 NTSTATUS WINAPI RtlCreateAcl(
552 PACL acl,
553 DWORD size,
554 DWORD rev);
556 BOOLEAN WINAPI RtlFirstFreeAce(
557 PACL acl,
558 PACE_HEADER *x);
560 NTSTATUS WINAPI RtlAddAce(
561 PACL acl,
562 DWORD rev,
563 DWORD xnrofaces,
564 PACE_HEADER acestart,
565 DWORD acelen);
567 BOOL WINAPI RtlAddAccessAllowedAce(
568 IN OUT PACL pAcl,
569 IN DWORD dwAceRevision,
570 IN DWORD AccessMask,
571 IN PSID pSid);
573 BOOL WINAPI AddAccessAllowedAceEx(
574 IN OUT PACL pAcl,
575 IN DWORD dwAceRevision,
576 IN DWORD AceFlags,
577 IN DWORD AccessMask,
578 IN PSID pSid);
580 DWORD WINAPI RtlGetAce(
581 PACL pAcl,
582 DWORD dwAceIndex,
583 LPVOID *pAce );
585 /* string functions */
587 VOID WINAPI RtlInitAnsiString(
588 PANSI_STRING target,
589 LPCSTR source);
591 VOID WINAPI RtlInitString(
592 PSTRING target,
593 LPCSTR source);
595 VOID WINAPI RtlInitUnicodeString(
596 PUNICODE_STRING target,
597 LPCWSTR source);
599 VOID WINAPI RtlFreeUnicodeString(
600 PUNICODE_STRING str);
602 VOID WINAPI RtlFreeAnsiString(
603 PANSI_STRING AnsiString);
605 NTSTATUS WINAPI RtlAnsiStringToUnicodeString(
606 PUNICODE_STRING uni,
607 PANSI_STRING ansi,
608 BOOLEAN doalloc);
610 NTSTATUS WINAPI RtlOemStringToUnicodeString(
611 PUNICODE_STRING uni,
612 PSTRING ansi,
613 BOOLEAN doalloc);
615 NTSTATUS WINAPI RtlMultiByteToUnicodeN(
616 LPWSTR unistr,
617 DWORD unilen,
618 LPDWORD reslen,
619 LPSTR oemstr,
620 DWORD oemlen);
622 NTSTATUS WINAPI RtlOemToUnicodeN(
623 LPWSTR unistr,
624 DWORD unilen,
625 LPDWORD reslen,
626 LPSTR oemstr,
627 DWORD oemlen);
629 NTSTATUS WINAPI RtlUnicodeToOemN(
630 LPSTR oemstr,
631 DWORD oemlen,
632 LPDWORD reslen,
633 LPWSTR unistr,
634 DWORD unilen);
636 NTSTATUS WINAPI RtlUnicodeStringToOemString(
637 PANSI_STRING oem,
638 PUNICODE_STRING uni,
639 BOOLEAN alloc);
641 NTSTATUS WINAPI RtlUnicodeStringToAnsiString(
642 PANSI_STRING oem,
643 PUNICODE_STRING uni,
644 BOOLEAN alloc);
646 BOOLEAN WINAPI RtlEqualUnicodeString(
647 PUNICODE_STRING s1,
648 PUNICODE_STRING s2,
649 BOOLEAN x);
651 DWORD WINAPI RtlUpcaseUnicodeString(
652 PUNICODE_STRING dest,
653 PUNICODE_STRING src,
654 BOOLEAN doalloc);
656 UINT WINAPI RtlxOemStringToUnicodeSize(
657 PSTRING str);
659 UINT WINAPI RtlxAnsiStringToUnicodeSize(
660 PANSI_STRING str);
662 DWORD WINAPI RtlIsTextUnicode(
663 LPVOID buf,
664 DWORD len,
665 DWORD *pf);
667 NTSTATUS WINAPI RtlCompareUnicodeString(
668 PUNICODE_STRING String1,
669 PUNICODE_STRING String2,
670 BOOLEAN CaseInSensitive);
672 /* resource functions */
674 typedef struct _RTL_RWLOCK {
675 CRITICAL_SECTION rtlCS;
676 HANDLE hSharedReleaseSemaphore;
677 UINT uSharedWaiters;
678 HANDLE hExclusiveReleaseSemaphore;
679 UINT uExclusiveWaiters;
680 INT iNumberActive;
681 HANDLE hOwningThreadId;
682 DWORD dwTimeoutBoost;
683 PVOID pDebugInfo;
684 } RTL_RWLOCK, *LPRTL_RWLOCK;
686 VOID WINAPI RtlInitializeResource(
687 LPRTL_RWLOCK);
689 VOID WINAPI RtlDeleteResource(
690 LPRTL_RWLOCK);
692 BYTE WINAPI RtlAcquireResourceExclusive(
693 LPRTL_RWLOCK, BYTE fWait);
695 BYTE WINAPI RtlAcquireResourceShared(
696 LPRTL_RWLOCK, BYTE fWait);
698 VOID WINAPI RtlReleaseResource(
699 LPRTL_RWLOCK);
701 VOID WINAPI RtlDumpResource(
702 LPRTL_RWLOCK);
704 /* time functions */
706 typedef struct _TIME_FIELDS
707 { CSHORT Year;
708 CSHORT Month;
709 CSHORT Day;
710 CSHORT Hour;
711 CSHORT Minute;
712 CSHORT Second;
713 CSHORT Milliseconds;
714 CSHORT Weekday;
715 } TIME_FIELDS;
717 typedef TIME_FIELDS *PTIME_FIELDS;
719 VOID WINAPI RtlSystemTimeToLocalTime(
720 IN PLARGE_INTEGER SystemTime,
721 OUT PLARGE_INTEGER LocalTime);
723 VOID WINAPI RtlTimeToTimeFields(
724 PLARGE_INTEGER liTime,
725 PTIME_FIELDS TimeFields);
727 BOOLEAN WINAPI RtlTimeFieldsToTime(
728 PTIME_FIELDS tfTimeFields,
729 PLARGE_INTEGER Time);
731 VOID WINAPI RtlTimeToElapsedTimeFields(
732 PLARGE_INTEGER liTime,
733 PTIME_FIELDS TimeFields);
735 BOOLEAN WINAPI RtlTimeToSecondsSince1980(
736 LPFILETIME ft,
737 LPDWORD timeret);
739 BOOLEAN WINAPI RtlTimeToSecondsSince1970(
740 LPFILETIME ft,
741 LPDWORD timeret);
743 /* heap functions */
745 /* Data structure for heap definition. This includes various
746 sizing parameters and callback routines, which, if left NULL,
747 result in default behavior */
749 typedef struct
750 { ULONG Length; /* = sizeof(RTL_HEAP_DEFINITION) */
751 ULONG Unknown[11];
752 } RTL_HEAP_DEFINITION, *PRTL_HEAP_DEFINITION;
754 HANDLE WINAPI RtlCreateHeap(
755 ULONG Flags,
756 PVOID BaseAddress,
757 ULONG SizeToReserve,
758 ULONG SizeToCommit,
759 PVOID Unknown,
760 PRTL_HEAP_DEFINITION Definition);
762 PVOID WINAPI RtlAllocateHeap(
763 HANDLE Heap,
764 ULONG Flags,
765 ULONG Size);
768 BOOLEAN WINAPI RtlFreeHeap(
769 HANDLE Heap,
770 ULONG Flags,
771 PVOID Address);
773 /* exception */
775 void WINAPI NtRaiseException(
776 PEXCEPTION_RECORD,PCONTEXT,BOOL);
778 void WINAPI RtlRaiseException(
779 PEXCEPTION_RECORD);
781 void WINAPI RtlRaiseStatus(
782 NTSTATUS);
784 void WINAPI RtlUnwind(
785 PEXCEPTION_FRAME,
786 LPVOID,
787 PEXCEPTION_RECORD,DWORD);
789 /* process environment block */
790 VOID WINAPI RtlAcquirePebLock(void);
791 VOID WINAPI RtlReleasePebLock(void);
793 /* mathematics */
794 INT WINAPI RtlExtendedLargeIntegerDivide(
795 LARGE_INTEGER dividend,
796 DWORD divisor,
797 LPDWORD rest);
799 LARGE_INTEGER WINAPI RtlExtendedIntegerMultiply(
800 LARGE_INTEGER factor1,
801 INT factor2);
803 /* environment */
804 DWORD WINAPI RtlCreateEnvironment(
805 DWORD x1,
806 DWORD x2);
808 DWORD WINAPI RtlDestroyEnvironment(
809 DWORD x);
811 DWORD WINAPI RtlQueryEnvironmentVariable_U(
812 DWORD x1,
813 PUNICODE_STRING key,
814 PUNICODE_STRING val) ;
816 DWORD WINAPI RtlSetEnvironmentVariable(
817 DWORD x1,
818 PUNICODE_STRING key,
819 PUNICODE_STRING val);
821 /* object security */
823 DWORD WINAPI RtlNewSecurityObject(
824 DWORD x1,
825 DWORD x2,
826 DWORD x3,
827 DWORD x4,
828 DWORD x5,
829 DWORD x6);
831 DWORD WINAPI RtlDeleteSecurityObject(
832 DWORD x1);
834 NTSTATUS WINAPI
835 NtQuerySecurityObject(
836 IN HANDLE Object,
837 IN SECURITY_INFORMATION RequestedInformation,
838 OUT PSECURITY_DESCRIPTOR pSecurityDesriptor,
839 IN ULONG Length,
840 OUT PULONG ResultLength);
842 NTSTATUS WINAPI
843 NtSetSecurityObject(
844 IN HANDLE Handle,
845 IN SECURITY_INFORMATION SecurityInformation,
846 IN PSECURITY_DESCRIPTOR SecurityDescriptor);
849 /* misc */
851 void WINAPIV DbgPrint(LPCSTR fmt, ...);
853 DWORD WINAPI RtlAdjustPrivilege(DWORD x1,DWORD x2,DWORD x3,DWORD x4);
854 DWORD WINAPI RtlIntegerToChar(DWORD x1,DWORD x2,DWORD x3,DWORD x4);
855 LPVOID WINAPI RtlNormalizeProcessParams(LPVOID x);
856 DWORD WINAPI RtlNtStatusToDosError(DWORD error);
857 BOOLEAN WINAPI RtlGetNtProductType(LPDWORD type);
859 DWORD WINAPI RtlOpenCurrentUser(
860 IN ACCESS_MASK DesiredAccess,
861 OUT PHANDLE KeyHandle);
863 BOOLEAN WINAPI RtlDosPathNameToNtPathName_U( LPWSTR from,PUNICODE_STRING us,DWORD x2,DWORD x3);
864 BOOL WINAPI RtlImpersonateSelf(SECURITY_IMPERSONATION_LEVEL ImpersonationLevel);
866 NTSTATUS WINAPI
867 NtAccessCheck(
868 IN PSECURITY_DESCRIPTOR SecurityDescriptor,
869 IN HANDLE ClientToken,
870 IN ACCESS_MASK DesiredAccess,
871 IN PGENERIC_MAPPING GenericMapping,
872 OUT PPRIVILEGE_SET PrivilegeSet,
873 OUT PULONG ReturnLength,
874 OUT PULONG GrantedAccess,
875 OUT PBOOLEAN AccessStatus);
877 #ifdef __cplusplus
879 #endif
881 #include "poppack.h"
883 #endif