Ensure that the WM_ENTERIDLE message is not sent if the wake-up event
[wine] / include / ntddk.h
1 /*
2         this file defines interfaces mainly exposed to device drivers and
3         native nt dll's
4
5 */
6 #ifndef __WINE_NTDDK_H
7 #define __WINE_NTDDK_H
8
9 #include "ntdef.h"
10 #include "winnt.h"
11 #include "winbase.h"    /* fixme: should be taken out sometimes */
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 /****************** 
18  * asynchronous I/O 
19  */
20 #undef Status   /* conflict with X11-includes*/
21
22 typedef struct _IO_STATUS_BLOCK 
23 {       union 
24         { NTSTATUS Status;
25           PVOID Pointer;
26         } u;
27         ULONG_PTR Information;
28 } IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;    
29
30 typedef VOID (NTAPI *PIO_APC_ROUTINE) ( PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG Reserved );
31
32 typedef enum _KEY_INFORMATION_CLASS {
33         KeyBasicInformation,
34         KeyNodeInformation,
35         KeyFullInformation
36 } KEY_INFORMATION_CLASS;
37
38 typedef enum _KEY_VALUE_INFORMATION_CLASS {
39         KeyValueBasicInformation,
40         KeyValueFullInformation,
41         KeyValuePartialInformation,
42         KeyValueFullInformationAlign64,
43         KeyValuePartialInformationAlign64
44 } KEY_VALUE_INFORMATION_CLASS;
45
46 typedef enum _THREADINFOCLASS 
47 {       ThreadBasicInformation,
48         ThreadTimes,
49         ThreadPriority,
50         ThreadBasePriority,
51         ThreadAffinityMask,
52         ThreadImpersonationToken,
53         ThreadDescriptorTableEntry,
54         ThreadEnableAlignmentFaultFixup,
55         ThreadEventPair_Reusable,
56         ThreadQuerySetWin32StartAddress,
57         ThreadZeroTlsCell,
58         ThreadPerformanceCount,
59         ThreadAmILastThread,
60         ThreadIdealProcessor,
61         ThreadPriorityBoost,
62         ThreadSetTlsArrayAddress,
63         ThreadIsIoPending,
64         MaxThreadInfoClass
65 } THREADINFOCLASS;
66
67 typedef enum _FILE_INFORMATION_CLASS {
68         FileDirectoryInformation = 1,
69         FileFullDirectoryInformation,
70         FileBothDirectoryInformation,
71         FileBasicInformation,
72         FileStandardInformation,
73         FileInternalInformation,
74         FileEaInformation,
75         FileAccessInformation,
76         FileNameInformation,
77         FileRenameInformation,
78         FileLinkInformation,
79         FileNamesInformation,
80         FileDispositionInformation,
81         FilePositionInformation,
82         FileFullEaInformation,
83         FileModeInformation,
84         FileAlignmentInformation,
85         FileAllInformation,
86         FileAllocationInformation,
87         FileEndOfFileInformation,
88         FileAlternateNameInformation,
89         FileStreamInformation,
90         FilePipeInformation,
91         FilePipeLocalInformation,
92         FilePipeRemoteInformation,
93         FileMailslotQueryInformation,
94         FileMailslotSetInformation,
95         FileCompressionInformation,
96         FileObjectIdInformation,
97         FileCompletionInformation,
98         FileMoveClusterInformation,
99         FileQuotaInformation,
100         FileReparsePointInformation,
101         FileNetworkOpenInformation,
102         FileAttributeTagInformation,
103         FileTrackingInformation,
104         FileMaximumInformation
105 } FILE_INFORMATION_CLASS, *PFILE_INFORMATION_CLASS;
106
107 typedef enum _FSINFOCLASS {
108         FileFsVolumeInformation = 1,
109         FileFsLabelInformation,
110         FileFsSizeInformation,
111         FileFsDeviceInformation,
112         FileFsAttributeInformation,
113         FileFsControlInformation,
114         FileFsFullSizeInformation,
115         FileFsObjectIdInformation,
116         FileFsMaximumInformation
117 } FS_INFORMATION_CLASS, *PFS_INFORMATION_CLASS;
118
119 typedef enum _SECTION_INHERIT 
120 {
121         ViewShare = 1,
122         ViewUnmap = 2
123
124 } SECTION_INHERIT;
125  
126 /*
127         placeholder
128 */
129 typedef enum _OBJECT_INFORMATION_CLASS
130 {
131         DunnoTheConstants1
132
133 } OBJECT_INFORMATION_CLASS, *POBJECT_INFORMATION_CLASS;
134
135
136 /*
137  *      NtQuerySystemInformation
138  */
139
140 typedef enum SYSTEM_INFORMATION_CLASS
141 {       Unknown1 = 1,
142         Unknown2,
143         Unknown3,
144         Unknown4,
145         SystemPerformanceInformation
146 } SYSTEM_INFORMATION_CLASS, *PSYSTEM_INFORMATION_CLASS;
147
148 /* reading coffee grounds... */
149 typedef struct _THREAD_INFO
150 {       DWORD   Unknown1[6];
151         DWORD   ThreadID;
152         DWORD   Unknown2[3];
153         DWORD   Status;
154         DWORD   WaitReason;
155         DWORD   Unknown3[4];
156 } THREAD_INFO, PTHREAD_INFO;
157
158 typedef struct _VM_COUNTERS_
159 {       ULONG PeakVirtualSize;
160         ULONG VirtualSize;
161         ULONG PageFaultCount;
162         ULONG PeakWorkingSetSize;
163         ULONG WorkingSetSize;
164         ULONG QuotaPeakPagedPoolUsage;
165         ULONG QuotaPagedPoolUsage;
166         ULONG QuotaPeakNonPagedPoolUsage;
167         ULONG QuotaNonPagedPoolUsage;
168         ULONG PagefileUsage;
169         ULONG PeakPagefileUsage;
170 } VM_COUNTERS, *PVM_COUNTERS;
171
172 typedef struct _PROCESS_INFO
173 {       DWORD           Offset;         /* 00 offset to next PROCESS_INFO ok*/
174         DWORD           ThreadCount;    /* 04 number of ThreadInfo member ok */
175         DWORD           Unknown1[6];
176         FILETIME        CreationTime;   /* 20 */
177         DWORD           Unknown2[5];
178         PWCHAR          ProcessName;    /* 3c ok */
179         DWORD           BasePriority;
180         DWORD           ProcessID;      /* 44 ok*/
181         DWORD           ParentProcessID;
182         DWORD           HandleCount;
183         DWORD           Unknown3[2];    /* 50 */
184         ULONG           PeakVirtualSize;
185         ULONG           VirtualSize;
186         ULONG           PageFaultCount;
187         ULONG           PeakWorkingSetSize;
188         ULONG           WorkingSetSize;
189         ULONG           QuotaPeakPagedPoolUsage;
190         ULONG           QuotaPagedPoolUsage;
191         ULONG           QuotaPeakNonPagedPoolUsage;
192         ULONG           QuotaNonPagedPoolUsage;
193         ULONG           PagefileUsage;
194         ULONG           PeakPagefileUsage;
195         DWORD           PrivateBytes;
196         DWORD           Unknown6[4];
197         THREAD_INFO     ati[ANYSIZE_ARRAY];     /* 94 size=0x40*/
198 } PROCESS_INFO, PPROCESS_INFO;
199
200 NTSTATUS WINAPI NtQuerySystemInformation(
201         IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
202         OUT PVOID SystemInformation,
203         IN ULONG Length,
204         OUT PULONG ResultLength);
205
206 /*
207  *      system configuration
208  */
209
210
211 typedef struct _SYSTEM_TIME_ADJUSTMENT
212 {
213         ULONG   TimeAdjustment;
214         BOOLEAN TimeAdjustmentDisabled;
215
216 } SYSTEM_TIME_ADJUSTMENT, *PSYSTEM_TIME_ADJUSTMENT;
217
218 typedef struct _SYSTEM_CONFIGURATION_INFO 
219 {
220         union 
221         { ULONG OemId;
222           struct 
223           { WORD        ProcessorArchitecture;
224             WORD        Reserved;
225           } tag1;
226         } tag2;
227         ULONG   PageSize;
228         PVOID   MinimumApplicationAddress;
229         PVOID   MaximumApplicationAddress;
230         ULONG   ActiveProcessorMask;
231         ULONG   NumberOfProcessors;
232         ULONG   ProcessorType;
233         ULONG   AllocationGranularity;
234         WORD    ProcessorLevel;
235         WORD    ProcessorRevision;
236
237 } SYSTEM_CONFIGURATION_INFO, *PSYSTEM_CONFIGURATION_INFO;
238
239
240 typedef struct _SYSTEM_CACHE_INFORMATION 
241 {
242         ULONG   CurrentSize;
243         ULONG   PeakSize;
244         ULONG   PageFaultCount;
245         ULONG   MinimumWorkingSet;
246         ULONG   MaximumWorkingSet;
247         ULONG   Unused[4];
248
249 } SYSTEM_CACHE_INFORMATION;
250
251 /*
252  *      NtQueryProcessInformation
253  */
254
255 /* parameter ProcessInformationClass */
256
257 typedef enum _PROCESSINFOCLASS 
258 {       ProcessBasicInformation,
259         ProcessQuotaLimits,
260         ProcessIoCounters,
261         ProcessVmCounters,
262         ProcessTimes,
263         ProcessBasePriority,
264         ProcessRaisePriority,
265         ProcessDebugPort,
266         ProcessExceptionPort,
267         ProcessAccessToken,
268         ProcessLdtInformation,
269         ProcessLdtSize,
270         ProcessDefaultHardErrorMode,
271         ProcessIoPortHandlers,
272         ProcessPooledUsageAndLimits,
273         ProcessWorkingSetWatch,
274         ProcessUserModeIOPL,
275         ProcessEnableAlignmentFaultFixup,
276         ProcessPriorityClass,
277         ProcessWx86Information,
278         ProcessHandleCount,
279         ProcessAffinityMask,
280         ProcessPriorityBoost,
281         ProcessDeviceMap,
282         ProcessSessionInformation,
283         ProcessForegroundInformation,
284         ProcessWow64Information,
285         MaxProcessInfoClass
286 } PROCESSINFOCLASS;
287
288 /* parameter ProcessInformation (depending on ProcessInformationClass) */
289
290 typedef struct _PROCESS_BASIC_INFORMATION 
291 {       DWORD   ExitStatus;
292         DWORD   PebBaseAddress;
293         DWORD   AffinityMask;
294         DWORD   BasePriority;
295         ULONG   UniqueProcessId;
296         ULONG   InheritedFromUniqueProcessId;
297 } PROCESS_BASIC_INFORMATION;
298
299 NTSTATUS WINAPI NtQueryInformationProcess(
300         IN HANDLE ProcessHandle,
301         IN PROCESSINFOCLASS ProcessInformationClass,
302         OUT PVOID ProcessInformation,
303         IN ULONG ProcessInformationLength,
304         OUT PULONG ReturnLength);
305
306 #define NtCurrentProcess() ( (HANDLE) -1 )
307
308 /*
309  *      timer
310  */
311
312 typedef enum _TIMER_TYPE 
313 {
314         NotificationTimer,
315         SynchronizationTimer
316
317 } TIMER_TYPE;
318
319 /*
320  *      token functions
321  */
322  
323 NTSTATUS WINAPI NtOpenProcessToken(
324         HANDLE ProcessHandle,
325         DWORD DesiredAccess, 
326         HANDLE *TokenHandle);
327         
328 NTSTATUS WINAPI NtOpenThreadToken(
329         HANDLE ThreadHandle,
330         DWORD DesiredAccess, 
331         BOOLEAN OpenAsSelf,
332         HANDLE *TokenHandle);
333
334 NTSTATUS WINAPI NtAdjustPrivilegesToken(
335         IN HANDLE TokenHandle,
336         IN BOOLEAN DisableAllPrivileges,
337         IN PTOKEN_PRIVILEGES NewState,
338         IN DWORD BufferLength,
339         OUT PTOKEN_PRIVILEGES PreviousState,
340         OUT PDWORD ReturnLength);
341
342 NTSTATUS WINAPI NtQueryInformationToken(
343         HANDLE token,
344         DWORD tokeninfoclass, 
345         LPVOID tokeninfo,
346         DWORD tokeninfolength,
347         LPDWORD retlen );
348
349 /*
350  *      sid functions
351  */
352
353 BOOLEAN WINAPI RtlAllocateAndInitializeSid (
354         PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
355         DWORD nSubAuthorityCount,
356         DWORD x3,
357         DWORD x4,
358         DWORD x5,
359         DWORD x6,
360         DWORD x7,
361         DWORD x8,
362         DWORD x9,
363         DWORD x10,
364         PSID pSid);
365         
366 DWORD WINAPI RtlEqualSid(DWORD x1,DWORD x2);
367 DWORD WINAPI RtlFreeSid(DWORD x1);
368 DWORD WINAPI RtlLengthRequiredSid(DWORD nrofsubauths);
369 DWORD WINAPI RtlLengthSid(PSID sid);
370 DWORD WINAPI RtlInitializeSid(PSID PSID,PSID_IDENTIFIER_AUTHORITY PSIDauth, DWORD c);
371 LPDWORD WINAPI RtlSubAuthoritySid(PSID PSID,DWORD nr);
372 LPBYTE WINAPI RtlSubAuthorityCountSid(PSID PSID);
373 DWORD WINAPI RtlCopySid(DWORD len,PSID to,PSID from);
374
375 /*
376  *      security descriptor functions
377  */
378
379 NTSTATUS WINAPI RtlCreateSecurityDescriptor(
380         PSECURITY_DESCRIPTOR lpsd,
381         DWORD rev);
382
383 NTSTATUS WINAPI RtlValidSecurityDescriptor(
384         PSECURITY_DESCRIPTOR SecurityDescriptor);
385
386 ULONG WINAPI RtlLengthSecurityDescriptor(
387         PSECURITY_DESCRIPTOR SecurityDescriptor);
388
389 NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(
390         IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
391         OUT PBOOLEAN lpbDaclPresent,
392         OUT PACL *pDacl,
393         OUT PBOOLEAN lpbDaclDefaulted);
394
395 NTSTATUS WINAPI RtlSetDaclSecurityDescriptor (
396         PSECURITY_DESCRIPTOR lpsd,
397         BOOLEAN daclpresent,
398         PACL dacl,
399         BOOLEAN dacldefaulted );
400
401 NTSTATUS WINAPI RtlGetSaclSecurityDescriptor(
402         IN PSECURITY_DESCRIPTOR pSecurityDescriptor,
403         OUT PBOOLEAN lpbSaclPresent,
404         OUT PACL *pSacl,
405         OUT PBOOLEAN lpbSaclDefaulted);
406
407 NTSTATUS WINAPI RtlSetSaclSecurityDescriptor (
408         PSECURITY_DESCRIPTOR lpsd,
409         BOOLEAN saclpresent,
410         PACL sacl,
411         BOOLEAN sacldefaulted);
412
413 NTSTATUS WINAPI RtlGetOwnerSecurityDescriptor(
414         PSECURITY_DESCRIPTOR SecurityDescriptor,
415         PSID *Owner,
416         PBOOLEAN OwnerDefaulted);
417
418 NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(
419         PSECURITY_DESCRIPTOR lpsd,
420         PSID owner,
421         BOOLEAN ownerdefaulted);
422
423 NTSTATUS WINAPI RtlSetGroupSecurityDescriptor (
424         PSECURITY_DESCRIPTOR lpsd,
425         PSID group,
426         BOOLEAN groupdefaulted);
427
428 NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(
429         PSECURITY_DESCRIPTOR SecurityDescriptor,
430         PSID *Group,
431         PBOOLEAN GroupDefaulted);
432
433 /*      ##############################
434         ######  ACL FUNCTIONS   ######
435         ##############################
436 */
437
438 DWORD WINAPI RtlCreateAcl(PACL acl,DWORD size,DWORD rev);
439
440 BOOLEAN WINAPI RtlFirstFreeAce(
441         PACL acl,
442         PACE_HEADER *x);
443
444 NTSTATUS WINAPI RtlAddAce(
445         PACL acl,
446         DWORD rev,
447         DWORD xnrofaces,
448         PACE_HEADER acestart,
449         DWORD acelen);
450         
451 DWORD WINAPI RtlAddAccessAllowedAce(DWORD x1,DWORD x2,DWORD x3,DWORD x4);
452 DWORD WINAPI RtlGetAce(PACL pAcl,DWORD dwAceIndex,LPVOID *pAce );
453
454 /*
455  *      string functions
456  */
457
458 DWORD WINAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING uni,PANSI_STRING ansi,BOOLEAN doalloc);
459 DWORD WINAPI RtlOemStringToUnicodeString(PUNICODE_STRING uni,PSTRING ansi,BOOLEAN doalloc);
460 DWORD WINAPI RtlMultiByteToUnicodeN(LPWSTR unistr,DWORD unilen,LPDWORD reslen,LPSTR oemstr,DWORD oemlen);
461 DWORD WINAPI RtlOemToUnicodeN(LPWSTR unistr,DWORD unilen,LPDWORD reslen,LPSTR oemstr,DWORD oemlen);
462 VOID WINAPI RtlInitAnsiString(PANSI_STRING target,LPCSTR source);
463 VOID WINAPI RtlInitString(PSTRING target,LPCSTR source);
464 VOID WINAPI RtlInitUnicodeString(PUNICODE_STRING target,LPCWSTR source);
465 VOID WINAPI RtlFreeUnicodeString(PUNICODE_STRING str);
466 VOID WINAPI RtlFreeAnsiString(PANSI_STRING AnsiString);
467 DWORD WINAPI RtlUnicodeToOemN(LPSTR oemstr,DWORD oemlen,LPDWORD reslen,LPWSTR unistr,DWORD unilen);
468 DWORD WINAPI RtlUnicodeStringToOemString(PANSI_STRING oem,PUNICODE_STRING uni,BOOLEAN alloc);
469 DWORD WINAPI RtlUnicodeStringToAnsiString(PANSI_STRING oem,PUNICODE_STRING uni,BOOLEAN alloc);
470 DWORD WINAPI RtlEqualUnicodeString(PUNICODE_STRING s1,PUNICODE_STRING s2,DWORD x);
471 DWORD WINAPI RtlUpcaseUnicodeString(PUNICODE_STRING dest,PUNICODE_STRING src,BOOLEAN doalloc);
472 UINT WINAPI RtlxOemStringToUnicodeSize(PSTRING str);
473 UINT WINAPI RtlxAnsiStringToUnicodeSize(PANSI_STRING str);
474 DWORD WINAPI RtlIsTextUnicode(LPVOID buf, DWORD len, DWORD *pf);
475 NTSTATUS WINAPI RtlCompareUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive);
476
477 /*
478  *      resource functions
479  */
480
481 typedef struct _RTL_RWLOCK {
482         CRITICAL_SECTION        rtlCS;
483         HANDLE          hSharedReleaseSemaphore;
484         UINT                    uSharedWaiters;
485         HANDLE          hExclusiveReleaseSemaphore;
486         UINT                    uExclusiveWaiters;
487         INT                     iNumberActive;
488         HANDLE          hOwningThreadId;
489         DWORD                   dwTimeoutBoost;
490         PVOID                   pDebugInfo;
491 } RTL_RWLOCK, *LPRTL_RWLOCK;
492
493 VOID   WINAPI RtlInitializeResource(
494         LPRTL_RWLOCK);
495         
496 VOID   WINAPI RtlDeleteResource(
497         LPRTL_RWLOCK);
498         
499 BYTE   WINAPI RtlAcquireResourceExclusive(
500         LPRTL_RWLOCK, BYTE fWait);
501         
502 BYTE   WINAPI RtlAcquireResourceShared(
503         LPRTL_RWLOCK, BYTE fWait);
504         
505 VOID   WINAPI RtlReleaseResource(
506         LPRTL_RWLOCK);
507         
508 VOID   WINAPI RtlDumpResource(
509         LPRTL_RWLOCK);
510
511 /*
512         time functions
513  */
514
515 typedef struct _TIME_FIELDS 
516 {   CSHORT Year;
517     CSHORT Month;
518     CSHORT Day;
519     CSHORT Hour;
520     CSHORT Minute;
521     CSHORT Second;
522     CSHORT Milliseconds;
523     CSHORT Weekday;
524 } TIME_FIELDS;
525
526 typedef TIME_FIELDS *PTIME_FIELDS;
527
528 VOID WINAPI RtlSystemTimeToLocalTime(
529         IN  PLARGE_INTEGER SystemTime,
530         OUT PLARGE_INTEGER LocalTime);
531
532 VOID WINAPI RtlTimeToTimeFields(
533         PLARGE_INTEGER liTime,
534         PTIME_FIELDS TimeFields);
535
536 BOOLEAN WINAPI RtlTimeFieldsToTime(
537         PTIME_FIELDS tfTimeFields,
538         PLARGE_INTEGER Time);
539         
540 VOID WINAPI RtlTimeToElapsedTimeFields(
541         PLARGE_INTEGER liTime,
542         PTIME_FIELDS TimeFields);
543         
544 BOOLEAN WINAPI RtlTimeToSecondsSince1980(
545         LPFILETIME ft,
546         LPDWORD timeret);
547
548 BOOLEAN WINAPI RtlTimeToSecondsSince1970(
549         LPFILETIME ft,
550         LPDWORD timeret);
551
552 /*
553         heap functions
554 */
555
556 /* Data structure for heap definition. This includes various
557    sizing parameters and callback routines, which, if left NULL,
558    result in default behavior */
559
560 typedef struct
561 {       ULONG   Length;         /* = sizeof(RTL_HEAP_DEFINITION) */
562         ULONG   Unknown[11];
563 } RTL_HEAP_DEFINITION, *PRTL_HEAP_DEFINITION;
564
565 HANDLE WINAPI RtlCreateHeap(
566         ULONG Flags,
567         PVOID BaseAddress,
568         ULONG SizeToReserve,
569         ULONG SizeToCommit,
570         PVOID Unknown,
571         PRTL_HEAP_DEFINITION Definition);
572
573 PVOID WINAPI RtlAllocateHeap(
574         HANDLE Heap,
575         ULONG Flags,
576         ULONG Size);
577
578
579 BOOLEAN WINAPI RtlFreeHeap(
580         HANDLE Heap,
581         ULONG Flags,
582         PVOID Address);
583
584 /*
585  *      misc
586  */
587 void WINAPIV DbgPrint(LPCSTR fmt, ...);
588 DWORD WINAPI NtRaiseException(PEXCEPTION_RECORD,PCONTEXT,BOOL);
589 void WINAPI RtlRaiseException(PEXCEPTION_RECORD);
590 void WINAPI RtlRaiseStatus(NTSTATUS);
591 void WINAPI RtlUnwind(PEXCEPTION_FRAME,LPVOID,PEXCEPTION_RECORD,DWORD);
592 VOID WINAPI RtlAcquirePebLock(void);
593 VOID WINAPI RtlReleasePebLock(void);
594 DWORD WINAPI RtlAdjustPrivilege(DWORD x1,DWORD x2,DWORD x3,DWORD x4);
595 DWORD WINAPI RtlIntegerToChar(DWORD x1,DWORD x2,DWORD x3,DWORD x4);
596 DWORD WINAPI RtlSetEnvironmentVariable(DWORD x1,PUNICODE_STRING key,PUNICODE_STRING val);
597 DWORD WINAPI RtlNewSecurityObject(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6);
598 DWORD WINAPI RtlDeleteSecurityObject(DWORD x1);
599 LPVOID WINAPI RtlNormalizeProcessParams(LPVOID x);
600 DWORD WINAPI RtlNtStatusToDosError(DWORD error);
601 BOOLEAN WINAPI RtlGetNtProductType(LPDWORD type);
602 INT WINAPI RtlExtendedLargeIntegerDivide(LARGE_INTEGER dividend, DWORD divisor, LPDWORD rest);
603 long long WINAPI RtlExtendedIntegerMultiply(LARGE_INTEGER factor1,INT factor2);
604 DWORD WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING String);
605 DWORD WINAPI RtlOpenCurrentUser(DWORD x1, DWORD *x2);
606 BOOLEAN WINAPI RtlDosPathNameToNtPathName_U( LPWSTR from,PUNICODE_STRING us,DWORD x2,DWORD x3);
607 DWORD WINAPI RtlCreateEnvironment(DWORD x1,DWORD x2);
608 DWORD WINAPI RtlDestroyEnvironment(DWORD x);
609 DWORD WINAPI RtlQueryEnvironmentVariable_U(DWORD x1,PUNICODE_STRING key,PUNICODE_STRING val) ;
610
611 BOOL WINAPI IsValidSid(PSID);
612 BOOL WINAPI EqualSid(PSID,PSID);
613 BOOL WINAPI EqualPrefixSid(PSID,PSID);
614 DWORD  WINAPI GetSidLengthRequired(BYTE);
615 BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY,BYTE,DWORD,
616                                        DWORD,DWORD,DWORD,DWORD,DWORD,DWORD,
617                                        DWORD,PSID*);
618 VOID*  WINAPI FreeSid(PSID);
619 BOOL WINAPI InitializeSecurityDescriptor(SECURITY_DESCRIPTOR*,DWORD);
620 BOOL WINAPI InitializeSid(PSID,PSID_IDENTIFIER_AUTHORITY,BYTE);
621 DWORD* WINAPI GetSidSubAuthority(PSID,DWORD);
622 BYTE * WINAPI GetSidSubAuthorityCount(PSID);
623 DWORD  WINAPI GetLengthSid(PSID);
624 BOOL WINAPI CopySid(DWORD,PSID,PSID);
625 BOOL WINAPI LookupAccountSidA(LPCSTR,PSID,LPCSTR,LPDWORD,LPCSTR,LPDWORD,
626                                   PSID_NAME_USE);
627 BOOL WINAPI LookupAccountSidW(LPCWSTR,PSID,LPCWSTR,LPDWORD,LPCWSTR,LPDWORD,
628                                   PSID_NAME_USE);
629 PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID);
630
631 #ifdef __cplusplus
632 }
633 #endif
634
635 #endif