source: trunk/src/NTDLL/ntdll.h@ 2131

Last change on this file since 2131 was 2128, checked in by sandervl, 26 years ago

Token api update

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