From 7da043f869b71c27bc4d4c5da0939aba349f4bb7 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Thu, 16 Jun 2005 10:46:11 +0000 Subject: [PATCH] Add/fix more NT native API declarations. --- dlls/ntdll/nt.c | 28 +++++++++++++++------------- dlls/ntdll/om.c | 12 +++++------- include/winternl.h | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 67 insertions(+), 21 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 9e6b791da28..b4107afb076 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -524,9 +524,12 @@ NTSTATUS WINAPI NtReplyWaitReceivePort( * NtSetIntervalProfile [NTDLL.@] * ZwSetIntervalProfile [NTDLL.@] */ -NTSTATUS WINAPI NtSetIntervalProfile(DWORD x1,DWORD x2) { - FIXME("(0x%08lx,0x%08lx),stub!\n",x1,x2); - return 0; +NTSTATUS WINAPI NtSetIntervalProfile( + ULONG Interval, + KPROFILE_SOURCE Source) +{ + FIXME("%lu,%d\n", Interval, Source); + return STATUS_SUCCESS; } /****************************************************************************** @@ -906,14 +909,13 @@ NTSTATUS WINAPI NtQuerySystemInformation( * ZwCreatePagingFile [NTDLL.@] */ NTSTATUS WINAPI NtCreatePagingFile( - IN PUNICODE_STRING PageFileName, - IN ULONG MiniumSize, - IN ULONG MaxiumSize, - OUT PULONG ActualSize) + PUNICODE_STRING PageFileName, + PLARGE_INTEGER MiniumSize, + PLARGE_INTEGER MaxiumSize, + PLARGE_INTEGER ActualSize) { - FIXME("(%p(%s),0x%08lx,0x%08lx,%p),stub!\n", - PageFileName->Buffer, debugstr_w(PageFileName->Buffer),MiniumSize,MaxiumSize,ActualSize); - return 0; + FIXME("%p %p %p %p\n", PageFileName, MiniumSize, MaxiumSize, ActualSize); + return STATUS_SUCCESS; } /****************************************************************************** @@ -1013,10 +1015,10 @@ NTSTATUS WINAPI NtPowerInformation( * NtShutdownSystem [NTDLL.@] * */ -NTSTATUS WINAPI NtShutdownSystem(DWORD x1) +NTSTATUS WINAPI NtShutdownSystem(SHUTDOWN_ACTION Action) { - FIXME("(0x%08lx),stub\n",x1); - return 0; + FIXME("%d\n",Action); + return STATUS_SUCCESS; } /****************************************************************************** diff --git a/dlls/ntdll/om.c b/dlls/ntdll/om.c index a69c7ab9511..a108a3513b0 100644 --- a/dlls/ntdll/om.c +++ b/dlls/ntdll/om.c @@ -475,14 +475,12 @@ NTSTATUS WINAPI NtQuerySymbolicLinkObject( /****************************************************************************** * NtAllocateUuids [NTDLL.@] - * - * NOTES - * I have seen lpdwCount pointing to a pointer once... */ -NTSTATUS WINAPI NtAllocateUuids(LPDWORD lpdwCount, LPDWORD *p2, LPDWORD *p3) +NTSTATUS WINAPI NtAllocateUuids( + PULARGE_INTEGER Time, + PULONG Range, + PULONG Sequence) { - FIXME("(%p[%ld],%p,%p), stub.\n", lpdwCount, - lpdwCount ? *lpdwCount : 0, - p2, p3); + FIXME("(%p,%p,%p), stub.\n", Time, Range, Sequence); return 0; } diff --git a/include/winternl.h b/include/winternl.h index fb7a3847f75..42920c9747d 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -578,7 +578,7 @@ typedef enum _PROCESSINFOCLASS { ProcessForegroundInformation = 25, ProcessWow64Information = 26, MaxProcessInfoClass -} PROCESSINFOCLASS; +} PROCESSINFOCLASS, PROCESS_INFORMATION_CLASS; typedef enum _SECTION_INHERIT { ViewShare = 1, @@ -1523,6 +1523,40 @@ typedef struct _LPC_MESSAGE { UCHAR Data[ANYSIZE_ARRAY]; } LPC_MESSAGE, *PLPC_MESSAGE; +typedef enum _SHUTDOWN_ACTION { + ShutdownNoReboot, + ShutdownReboot, + ShutdownPowerOff +} SHUTDOWN_ACTION, *PSHUTDOWN_ACTION; + +typedef enum _KPROFILE_SOURCE { + ProfileTime, + ProfileAlignmentFixup, + ProfileTotalIssues, + ProfilePipelineDry, + ProfileLoadInstructions, + ProfilePipelineFrozen, + ProfileBranchInstructions, + ProfileTotalNonissues, + ProfileDcacheMisses, + ProfileIcacheMisses, + ProfileCacheMisses, + ProfileBranchMispredictions, + ProfileStoreInstructions, + ProfileFpInstructions, + ProfileIntegerInstructions, + Profile2Issue, + Profile3Issue, + Profile4Issue, + ProfileSpecialInstructions, + ProfileTotalCycles, + ProfileIcacheIssues, + ProfileDcacheAccesses, + ProfileMemoryBarrierCycles, + ProfileLoadLinkedIssues, + ProfileMaximum +} KPROFILE_SOURCE, *PKPROFILE_SOURCE; + /*********************************************************************** * Function declarations */ @@ -1556,6 +1590,7 @@ NTSTATUS WINAPI NtAdjustGroupsToken(HANDLE,BOOLEAN,PTOKEN_GROUPS,ULONG,PTOKEN_G NTSTATUS WINAPI NtAdjustPrivilegesToken(HANDLE,BOOLEAN,PTOKEN_PRIVILEGES,DWORD,PTOKEN_PRIVILEGES,PDWORD); NTSTATUS WINAPI NtAlertThread(HANDLE ThreadHandle); NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID lpLuid); +NTSTATUS WINAPI NtAllocateUuids(PULARGE_INTEGER,PULONG,PULONG); NTSTATUS WINAPI NtAllocateVirtualMemory(HANDLE,PVOID*,ULONG,ULONG*,ULONG,ULONG); NTSTATUS WINAPI NtCancelIoFile(HANDLE,PIO_STATUS_BLOCK); NTSTATUS WINAPI NtCancelTimer(HANDLE, BOOLEAN*); @@ -1570,9 +1605,11 @@ NTSTATUS WINAPI NtCreateKey(PHKEY,ACCESS_MASK,const OBJECT_ATTRIBUTES*,ULONG,co NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,PLARGE_INTEGER); NTSTATUS WINAPI NtCreateMutant(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,BOOLEAN); NTSTATUS WINAPI NtCreateNamedPipeFile(PHANDLE,ULONG,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,ULONG,PLARGE_INTEGER); +NTSTATUS WINAPI NtCreatePagingFile(PUNICODE_STRING,PLARGE_INTEGER,PLARGE_INTEGER,PLARGE_INTEGER); NTSTATUS WINAPI NtCreatePort(PHANDLE,POBJECT_ATTRIBUTES,ULONG,ULONG,PULONG); NTSTATUS WINAPI NtCreateSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const LARGE_INTEGER*,ULONG,ULONG,HANDLE); NTSTATUS WINAPI NtCreateSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,LONG,LONG); +NTSTATUS WINAPI NtCreateSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PUNICODE_STRING); NTSTATUS WINAPI NtCreateTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*, TIMER_TYPE); NTSTATUS WINAPI NtDelayExecution(BOOLEAN,const LARGE_INTEGER*); NTSTATUS WINAPI NtDeleteAtom(RTL_ATOM); @@ -1580,6 +1617,7 @@ NTSTATUS WINAPI NtDeleteFile(POBJECT_ATTRIBUTES); NTSTATUS WINAPI NtDeleteKey(HKEY); NTSTATUS WINAPI NtDeleteValueKey(HKEY,const UNICODE_STRING *); NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,ULONG,PVOID,ULONG,PVOID,ULONG); +NTSTATUS WINAPI NtDisplayString(PUNICODE_STRING); NTSTATUS WINAPI NtDuplicateObject(HANDLE,HANDLE,HANDLE,PHANDLE,ACCESS_MASK,ULONG,ULONG); NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE); NTSTATUS WINAPI NtEnumerateKey(HKEY,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *); @@ -1611,6 +1649,7 @@ NTSTATUS WINAPI NtOpenMutant(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*); NTSTATUS WINAPI NtOpenProcessToken(HANDLE,DWORD,HANDLE *); NTSTATUS WINAPI NtOpenSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*); NTSTATUS WINAPI NtOpenSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*); +NTSTATUS WINAPI NtOpenSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES); NTSTATUS WINAPI NtOpenThread(HANDLE*,ACCESS_MASK,const OBJECT_ATTRIBUTES*,const CLIENT_ID*); NTSTATUS WINAPI NtOpenThreadToken(HANDLE,DWORD,BOOLEAN,HANDLE *); NTSTATUS WINAPI NtOpenTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*); @@ -1640,15 +1679,18 @@ NTSTATUS WINAPI NtQueryPerformanceCounter(PLARGE_INTEGER, PLARGE_INTEGER); NTSTATUS WINAPI NtQuerySecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,ULONG,PULONG); NTSTATUS WINAPI NtQuerySection(HANDLE,SECTION_INFORMATION_CLASS,PVOID,ULONG,PULONG); NTSTATUS WINAPI NtQuerySemaphore(HANDLE,SEMAPHORE_INFORMATION_CLASS,PVOID,ULONG,PULONG); +NTSTATUS WINAPI NtQuerySymbolicLinkObject(HANDLE,PUNICODE_STRING,PULONG); NTSTATUS WINAPI NtQuerySystemInformation(SYSTEM_INFORMATION_CLASS,PVOID,ULONG,PULONG); NTSTATUS WINAPI NtQuerySystemTime(PLARGE_INTEGER); NTSTATUS WINAPI NtQueryTimer(HANDLE,TIMER_INFORMATION_CLASS,PVOID,ULONG,PULONG); +NTSTATUS WINAPI NtQueryTimerResolution(PULONG,PULONG,PULONG); NTSTATUS WINAPI NtQueryValueKey(HKEY,const UNICODE_STRING *,KEY_VALUE_INFORMATION_CLASS,void *,DWORD,DWORD *); NTSTATUS WINAPI NtQueryVirtualMemory(HANDLE,LPCVOID,MEMORY_INFORMATION_CLASS,PVOID,ULONG,ULONG*); NTSTATUS WINAPI NtQueryVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS); void WINAPI NtRaiseException(PEXCEPTION_RECORD,PCONTEXT,BOOL); NTSTATUS WINAPI NtReadFile(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,PIO_STATUS_BLOCK,PVOID,ULONG,PLARGE_INTEGER,PULONG); NTSTATUS WINAPI NtReadVirtualMemory(HANDLE,const void*,void*,SIZE_T,SIZE_T*); +NTSTATUS WINAPI NtRegisterThreadTerminatePort(HANDLE); NTSTATUS WINAPI NtReleaseMutant(HANDLE,PLONG); NTSTATUS WINAPI NtReleaseSemaphore(HANDLE,ULONG,PULONG); NTSTATUS WINAPI NtRemoveIoCompletion(HANDLE,PULONG,PULONG,PIO_STATUS_BLOCK,PLARGE_INTEGER); @@ -1668,15 +1710,19 @@ NTSTATUS WINAPI NtSetEvent(HANDLE,PULONG); NTSTATUS WINAPI NtSetInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FILE_INFORMATION_CLASS); NTSTATUS WINAPI NtSetInformationKey(HKEY,const int,PVOID,ULONG); NTSTATUS WINAPI NtSetInformationObject(HANDLE, OBJECT_INFORMATION_CLASS, PVOID, ULONG); +NTSTATUS WINAPI NtSetInformationProcess(HANDLE,PROCESS_INFORMATION_CLASS,PVOID,ULONG); NTSTATUS WINAPI NtSetInformationThread(HANDLE,THREADINFOCLASS,LPCVOID,ULONG); NTSTATUS WINAPI NtSetInformationToken(HANDLE,TOKEN_INFORMATION_CLASS,PVOID,ULONG); +NTSTATUS WINAPI NtSetIntervalProfile(ULONG,KPROFILE_SOURCE); NTSTATUS WINAPI NtSetIoCompletion(HANDLE,ULONG,ULONG,NTSTATUS,ULONG); NTSTATUS WINAPI NtSetSecurityObject(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR); NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER*,LARGE_INTEGER*); NTSTATUS WINAPI NtSetTimer(HANDLE, const LARGE_INTEGER*, PTIMER_APC_ROUTINE, PVOID, BOOLEAN, ULONG, BOOLEAN*); +NTSTATUS WINAPI NtSetTimerResolution(ULONG,BOOLEAN,PULONG); NTSTATUS WINAPI NtSetValueKey(HKEY,const UNICODE_STRING *,ULONG,ULONG,const void *,ULONG); NTSTATUS WINAPI NtSetVolumeInformationFile(HANDLE,PIO_STATUS_BLOCK,PVOID,ULONG,FS_INFORMATION_CLASS); NTSTATUS WINAPI NtSignalAndWaitForSingleObject(HANDLE,HANDLE,BOOLEAN,const LARGE_INTEGER*); +NTSTATUS WINAPI NtShutdownSystem(SHUTDOWN_ACTION); NTSTATUS WINAPI NtSuspendThread(HANDLE,PULONG); NTSTATUS WINAPI NtTerminateProcess(HANDLE,LONG); NTSTATUS WINAPI NtTerminateThread(HANDLE,LONG); -- 2.11.4.GIT