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