ntdll: Use syscall thunks for process functions.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-07-16 10:36:17 +02:00
parent 00e7d50f8b
commit 635e914bde
4 changed files with 19 additions and 183 deletions

View File

@ -186,7 +186,7 @@
@ stdcall -syscall NtCreateThreadEx(ptr long ptr long ptr ptr long long long long ptr) @ stdcall -syscall NtCreateThreadEx(ptr long ptr long ptr ptr long long long long ptr)
@ stdcall -syscall NtCreateTimer(ptr long ptr long) @ stdcall -syscall NtCreateTimer(ptr long ptr long)
@ stub NtCreateToken @ stub NtCreateToken
@ stdcall NtCreateUserProcess(ptr ptr long long ptr ptr long long ptr ptr ptr) @ stdcall -syscall NtCreateUserProcess(ptr ptr long long ptr ptr long long ptr ptr ptr)
# @ stub NtCreateWaitablePort # @ stub NtCreateWaitablePort
@ stdcall -arch=win32,arm64 NtCurrentTeb() @ stdcall -arch=win32,arm64 NtCurrentTeb()
# @ stub NtDebugActiveProcess # @ stub NtDebugActiveProcess
@ -211,9 +211,9 @@
# @ stub NtFilterToken # @ stub NtFilterToken
@ stdcall NtFindAtom(ptr long ptr) @ stdcall NtFindAtom(ptr long ptr)
@ stdcall NtFlushBuffersFile(long ptr) @ stdcall NtFlushBuffersFile(long ptr)
@ stdcall NtFlushInstructionCache(long ptr long) @ stdcall -syscall NtFlushInstructionCache(long ptr long)
@ stdcall NtFlushKey(long) @ stdcall NtFlushKey(long)
@ stdcall NtFlushProcessWriteBuffers() @ stdcall -syscall NtFlushProcessWriteBuffers()
@ stdcall NtFlushVirtualMemory(long ptr ptr long) @ stdcall NtFlushVirtualMemory(long ptr ptr long)
@ stub NtFlushWriteBuffer @ stub NtFlushWriteBuffer
# @ stub NtFreeUserPhysicalPages # @ stub NtFreeUserPhysicalPages
@ -263,7 +263,7 @@
@ stdcall -syscall NtOpenKeyedEvent(ptr long ptr) @ stdcall -syscall NtOpenKeyedEvent(ptr long ptr)
@ stdcall -syscall NtOpenMutant(ptr long ptr) @ stdcall -syscall NtOpenMutant(ptr long ptr)
@ stub NtOpenObjectAuditAlarm @ stub NtOpenObjectAuditAlarm
@ stdcall NtOpenProcess(ptr long ptr ptr) @ stdcall -syscall NtOpenProcess(ptr long ptr ptr)
@ stdcall NtOpenProcessToken(long long ptr) @ stdcall NtOpenProcessToken(long long ptr)
@ stdcall NtOpenProcessTokenEx(long long long ptr) @ stdcall NtOpenProcessTokenEx(long long long ptr)
@ stdcall NtOpenSection(ptr long ptr) @ stdcall NtOpenSection(ptr long ptr)
@ -295,7 +295,7 @@
@ stdcall NtQueryInformationFile(long ptr ptr long long) @ stdcall NtQueryInformationFile(long ptr ptr long long)
@ stdcall -syscall NtQueryInformationJobObject(long long ptr long ptr) @ stdcall -syscall NtQueryInformationJobObject(long long ptr long ptr)
@ stub NtQueryInformationPort @ stub NtQueryInformationPort
@ stdcall NtQueryInformationProcess(long long ptr long ptr) @ stdcall -syscall NtQueryInformationProcess(long long ptr long ptr)
@ stdcall -syscall NtQueryInformationThread(long long ptr long ptr) @ stdcall -syscall NtQueryInformationThread(long long ptr long ptr)
@ stdcall NtQueryInformationToken(long long ptr long ptr) @ stdcall NtQueryInformationToken(long long ptr long ptr)
@ stdcall NtQueryInstallUILanguage(ptr) @ stdcall NtQueryInstallUILanguage(ptr)
@ -353,7 +353,7 @@
@ stdcall -syscall NtResetEvent(long ptr) @ stdcall -syscall NtResetEvent(long ptr)
@ stdcall NtResetWriteWatch(long ptr long) @ stdcall NtResetWriteWatch(long ptr long)
@ stdcall NtRestoreKey(long long long) @ stdcall NtRestoreKey(long long long)
@ stdcall NtResumeProcess(long) @ stdcall -syscall NtResumeProcess(long)
@ stdcall -syscall NtResumeThread(long ptr) @ stdcall -syscall NtResumeThread(long ptr)
@ stdcall NtSaveKey(long long) @ stdcall NtSaveKey(long long)
# @ stub NtSaveKeyEx # @ stub NtSaveKeyEx
@ -377,7 +377,7 @@
@ stdcall -syscall NtSetInformationJobObject(long long ptr long) @ stdcall -syscall NtSetInformationJobObject(long long ptr long)
@ stdcall NtSetInformationKey(long long ptr long) @ stdcall NtSetInformationKey(long long ptr long)
@ stdcall NtSetInformationObject(long long ptr long) @ stdcall NtSetInformationObject(long long ptr long)
@ stdcall NtSetInformationProcess(long long ptr long) @ stdcall -syscall NtSetInformationProcess(long long ptr long)
@ stdcall -syscall NtSetInformationThread(long long ptr long) @ stdcall -syscall NtSetInformationThread(long long ptr long)
@ stdcall NtSetInformationToken(long long ptr long) @ stdcall NtSetInformationToken(long long ptr long)
@ stdcall NtSetIntervalProfile(long long) @ stdcall NtSetIntervalProfile(long long)
@ -404,11 +404,11 @@
@ stdcall -syscall NtSignalAndWaitForSingleObject(long long long ptr) @ stdcall -syscall NtSignalAndWaitForSingleObject(long long long ptr)
@ stub NtStartProfile @ stub NtStartProfile
@ stub NtStopProfile @ stub NtStopProfile
@ stdcall NtSuspendProcess(long) @ stdcall -syscall NtSuspendProcess(long)
@ stdcall -syscall NtSuspendThread(long ptr) @ stdcall -syscall NtSuspendThread(long ptr)
@ stdcall NtSystemDebugControl(long ptr long ptr long ptr) @ stdcall NtSystemDebugControl(long ptr long ptr long ptr)
@ stdcall -syscall NtTerminateJobObject(long long) @ stdcall -syscall NtTerminateJobObject(long long)
@ stdcall NtTerminateProcess(long long) @ stdcall -syscall NtTerminateProcess(long long)
@ stdcall -syscall NtTerminateThread(long long) @ stdcall -syscall NtTerminateThread(long long)
@ stub NtTestAlert @ stub NtTestAlert
# @ stub NtTraceEvent # @ stub NtTraceEvent
@ -1174,6 +1174,7 @@
@ stdcall -private -syscall ZwCreateThreadEx(ptr long ptr long ptr ptr long long long long ptr) NtCreateThreadEx @ stdcall -private -syscall ZwCreateThreadEx(ptr long ptr long ptr ptr long long long long ptr) NtCreateThreadEx
@ stdcall -private -syscall ZwCreateTimer(ptr long ptr long) NtCreateTimer @ stdcall -private -syscall ZwCreateTimer(ptr long ptr long) NtCreateTimer
@ stub ZwCreateToken @ stub ZwCreateToken
@ stdcall -private -syscall ZwCreateUserProcess(ptr ptr long long ptr ptr long long ptr ptr ptr) NtCreateUserProcess
# @ stub ZwCreateWaitablePort # @ stub ZwCreateWaitablePort
# @ stub ZwDebugActiveProcess # @ stub ZwDebugActiveProcess
# @ stub ZwDebugContinue # @ stub ZwDebugContinue
@ -1197,8 +1198,9 @@
# @ stub ZwFilterToken # @ stub ZwFilterToken
@ stdcall -private ZwFindAtom(ptr long ptr) NtFindAtom @ stdcall -private ZwFindAtom(ptr long ptr) NtFindAtom
@ stdcall -private ZwFlushBuffersFile(long ptr) NtFlushBuffersFile @ stdcall -private ZwFlushBuffersFile(long ptr) NtFlushBuffersFile
@ stdcall -private ZwFlushInstructionCache(long ptr long) NtFlushInstructionCache @ stdcall -private -syscall ZwFlushInstructionCache(long ptr long) NtFlushInstructionCache
@ stdcall -private ZwFlushKey(long) NtFlushKey @ stdcall -private ZwFlushKey(long) NtFlushKey
@ stdcall -private -syscall ZwFlushProcessWriteBuffers() NtFlushProcessWriteBuffers
@ stdcall -private ZwFlushVirtualMemory(long ptr ptr long) NtFlushVirtualMemory @ stdcall -private ZwFlushVirtualMemory(long ptr ptr long) NtFlushVirtualMemory
@ stub ZwFlushWriteBuffer @ stub ZwFlushWriteBuffer
# @ stub ZwFreeUserPhysicalPages # @ stub ZwFreeUserPhysicalPages
@ -1248,7 +1250,7 @@
@ stdcall -private -syscall ZwOpenKeyedEvent(ptr long ptr) NtOpenKeyedEvent @ stdcall -private -syscall ZwOpenKeyedEvent(ptr long ptr) NtOpenKeyedEvent
@ stdcall -private -syscall ZwOpenMutant(ptr long ptr) NtOpenMutant @ stdcall -private -syscall ZwOpenMutant(ptr long ptr) NtOpenMutant
@ stub ZwOpenObjectAuditAlarm @ stub ZwOpenObjectAuditAlarm
@ stdcall -private ZwOpenProcess(ptr long ptr ptr) NtOpenProcess @ stdcall -private -syscall ZwOpenProcess(ptr long ptr ptr) NtOpenProcess
@ stdcall -private ZwOpenProcessToken(long long ptr) NtOpenProcessToken @ stdcall -private ZwOpenProcessToken(long long ptr) NtOpenProcessToken
@ stdcall -private ZwOpenProcessTokenEx(long long long ptr) NtOpenProcessTokenEx @ stdcall -private ZwOpenProcessTokenEx(long long long ptr) NtOpenProcessTokenEx
@ stdcall -private ZwOpenSection(ptr long ptr) NtOpenSection @ stdcall -private ZwOpenSection(ptr long ptr) NtOpenSection
@ -1280,7 +1282,7 @@
@ stdcall -private ZwQueryInformationFile(long ptr ptr long long) NtQueryInformationFile @ stdcall -private ZwQueryInformationFile(long ptr ptr long long) NtQueryInformationFile
@ stdcall -private -syscall ZwQueryInformationJobObject(long long ptr long ptr) NtQueryInformationJobObject @ stdcall -private -syscall ZwQueryInformationJobObject(long long ptr long ptr) NtQueryInformationJobObject
@ stub ZwQueryInformationPort @ stub ZwQueryInformationPort
@ stdcall -private ZwQueryInformationProcess(long long ptr long ptr) NtQueryInformationProcess @ stdcall -private -syscall ZwQueryInformationProcess(long long ptr long ptr) NtQueryInformationProcess
@ stdcall -private -syscall ZwQueryInformationThread(long long ptr long ptr) NtQueryInformationThread @ stdcall -private -syscall ZwQueryInformationThread(long long ptr long ptr) NtQueryInformationThread
@ stdcall -private ZwQueryInformationToken(long long ptr long ptr) NtQueryInformationToken @ stdcall -private ZwQueryInformationToken(long long ptr long ptr) NtQueryInformationToken
@ stdcall -private ZwQueryInstallUILanguage(ptr) NtQueryInstallUILanguage @ stdcall -private ZwQueryInstallUILanguage(ptr) NtQueryInstallUILanguage
@ -1338,7 +1340,7 @@
@ stdcall -private -syscall ZwResetEvent(long ptr) NtResetEvent @ stdcall -private -syscall ZwResetEvent(long ptr) NtResetEvent
@ stdcall -private ZwResetWriteWatch(long ptr long) NtResetWriteWatch @ stdcall -private ZwResetWriteWatch(long ptr long) NtResetWriteWatch
@ stdcall -private ZwRestoreKey(long long long) NtRestoreKey @ stdcall -private ZwRestoreKey(long long long) NtRestoreKey
@ stdcall -private ZwResumeProcess(long) NtResumeProcess @ stdcall -private -syscall ZwResumeProcess(long) NtResumeProcess
@ stdcall -private -syscall ZwResumeThread(long ptr) NtResumeThread @ stdcall -private -syscall ZwResumeThread(long ptr) NtResumeThread
@ stdcall -private ZwSaveKey(long long) NtSaveKey @ stdcall -private ZwSaveKey(long long) NtSaveKey
# @ stub ZwSaveKeyEx # @ stub ZwSaveKeyEx
@ -1362,7 +1364,7 @@
@ stdcall -private -syscall ZwSetInformationJobObject(long long ptr long) NtSetInformationJobObject @ stdcall -private -syscall ZwSetInformationJobObject(long long ptr long) NtSetInformationJobObject
@ stdcall -private ZwSetInformationKey(long long ptr long) NtSetInformationKey @ stdcall -private ZwSetInformationKey(long long ptr long) NtSetInformationKey
@ stdcall -private ZwSetInformationObject(long long ptr long) NtSetInformationObject @ stdcall -private ZwSetInformationObject(long long ptr long) NtSetInformationObject
@ stdcall -private ZwSetInformationProcess(long long ptr long) NtSetInformationProcess @ stdcall -private -syscall ZwSetInformationProcess(long long ptr long) NtSetInformationProcess
@ stdcall -private -syscall ZwSetInformationThread(long long ptr long) NtSetInformationThread @ stdcall -private -syscall ZwSetInformationThread(long long ptr long) NtSetInformationThread
@ stdcall -private ZwSetInformationToken(long long ptr long) NtSetInformationToken @ stdcall -private ZwSetInformationToken(long long ptr long) NtSetInformationToken
@ stdcall -private ZwSetIntervalProfile(long long) NtSetIntervalProfile @ stdcall -private ZwSetIntervalProfile(long long) NtSetIntervalProfile
@ -1389,11 +1391,11 @@
@ stdcall -private -syscall ZwSignalAndWaitForSingleObject(long long long ptr) NtSignalAndWaitForSingleObject @ stdcall -private -syscall ZwSignalAndWaitForSingleObject(long long long ptr) NtSignalAndWaitForSingleObject
@ stub ZwStartProfile @ stub ZwStartProfile
@ stub ZwStopProfile @ stub ZwStopProfile
@ stdcall -private ZwSuspendProcess(long) NtSuspendProcess @ stdcall -private -syscall ZwSuspendProcess(long) NtSuspendProcess
@ stdcall -private -syscall ZwSuspendThread(long ptr) NtSuspendThread @ stdcall -private -syscall ZwSuspendThread(long ptr) NtSuspendThread
@ stdcall -private ZwSystemDebugControl(long ptr long ptr long ptr) NtSystemDebugControl @ stdcall -private ZwSystemDebugControl(long ptr long ptr long ptr) NtSystemDebugControl
@ stdcall -private -syscall ZwTerminateJobObject(long long) NtTerminateJobObject @ stdcall -private -syscall ZwTerminateJobObject(long long) NtTerminateJobObject
@ stdcall -private ZwTerminateProcess(long long) NtTerminateProcess @ stdcall -private -syscall ZwTerminateProcess(long long) NtTerminateProcess
@ stdcall -private -syscall ZwTerminateThread(long long) NtTerminateThread @ stdcall -private -syscall ZwTerminateThread(long long) NtTerminateThread
@ stub ZwTestAlert @ stub ZwTestAlert
# @ stub ZwTraceEvent # @ stub ZwTraceEvent

View File

@ -46,16 +46,6 @@ static const BOOL is_win64 = (sizeof(void *) > sizeof(int));
* Process object * Process object
*/ */
/******************************************************************************
* NtTerminateProcess [NTDLL.@]
*
* Native applications must kill themselves when done
*/
NTSTATUS WINAPI NtTerminateProcess( HANDLE handle, LONG exit_code )
{
return unix_funcs->NtTerminateProcess( handle, exit_code );
}
/****************************************************************************** /******************************************************************************
* RtlGetCurrentPeb [NTDLL.@] * RtlGetCurrentPeb [NTDLL.@]
* *
@ -82,118 +72,6 @@ HANDLE CDECL __wine_make_process_system(void)
return ret; return ret;
} }
/******************************************************************************
* NtQueryInformationProcess [NTDLL.@]
* ZwQueryInformationProcess [NTDLL.@]
*
*/
NTSTATUS WINAPI NtQueryInformationProcess( HANDLE handle, PROCESSINFOCLASS class, void *info,
ULONG size, ULONG *ret_len )
{
return unix_funcs->NtQueryInformationProcess( handle, class, info, size, ret_len );
}
/******************************************************************************
* NtSetInformationProcess [NTDLL.@]
* ZwSetInformationProcess [NTDLL.@]
*/
NTSTATUS WINAPI NtSetInformationProcess( HANDLE handle, PROCESSINFOCLASS class, void *info, ULONG size )
{
return unix_funcs->NtSetInformationProcess( handle, class, info, size );
}
/******************************************************************************
* NtFlushInstructionCache [NTDLL.@]
* ZwFlushInstructionCache [NTDLL.@]
*/
NTSTATUS WINAPI NtFlushInstructionCache( HANDLE handle, const void *addr, SIZE_T size )
{
#if defined(__x86_64__) || defined(__i386__)
/* no-op */
#elif defined(HAVE___CLEAR_CACHE)
if (handle == GetCurrentProcess())
{
__clear_cache( (char *)addr, (char *)addr + size );
}
else
{
static int once;
if (!once++) FIXME( "%p %p %ld other process not supported\n", handle, addr, size );
}
#else
static int once;
if (!once++) FIXME( "%p %p %ld\n", handle, addr, size );
#endif
return STATUS_SUCCESS;
}
/**********************************************************************
* NtFlushProcessWriteBuffers [NTDLL.@]
*/
void WINAPI NtFlushProcessWriteBuffers(void)
{
static int once = 0;
if (!once++) FIXME( "stub\n" );
}
/******************************************************************
* NtOpenProcess [NTDLL.@]
* ZwOpenProcess [NTDLL.@]
*/
NTSTATUS WINAPI NtOpenProcess(PHANDLE handle, ACCESS_MASK access,
const OBJECT_ATTRIBUTES* attr, const CLIENT_ID* cid)
{
NTSTATUS status;
SERVER_START_REQ( open_process )
{
req->pid = HandleToULong(cid->UniqueProcess);
req->access = access;
req->attributes = attr ? attr->Attributes : 0;
status = wine_server_call( req );
if (!status) *handle = wine_server_ptr_handle( reply->handle );
}
SERVER_END_REQ;
return status;
}
/******************************************************************************
* NtResumeProcess
* ZwResumeProcess
*/
NTSTATUS WINAPI NtResumeProcess( HANDLE handle )
{
NTSTATUS ret;
SERVER_START_REQ( resume_process )
{
req->handle = wine_server_obj_handle( handle );
ret = wine_server_call( req );
}
SERVER_END_REQ;
return ret;
}
/******************************************************************************
* NtSuspendProcess
* ZwSuspendProcess
*/
NTSTATUS WINAPI NtSuspendProcess( HANDLE handle )
{
NTSTATUS ret;
SERVER_START_REQ( suspend_process )
{
req->handle = wine_server_obj_handle( handle );
ret = wine_server_call( req );
}
SERVER_END_REQ;
return ret;
}
/*********************************************************************** /***********************************************************************
* restart_process * restart_process
*/ */
@ -242,24 +120,6 @@ NTSTATUS restart_process( RTL_USER_PROCESS_PARAMETERS *params, NTSTATUS status )
} }
/**********************************************************************
* NtCreateUserProcess (NTDLL.@)
*/
NTSTATUS WINAPI NtCreateUserProcess( HANDLE *process_handle_ptr, HANDLE *thread_handle_ptr,
ACCESS_MASK process_access, ACCESS_MASK thread_access,
OBJECT_ATTRIBUTES *process_attr, OBJECT_ATTRIBUTES *thread_attr,
ULONG process_flags, ULONG thread_flags,
RTL_USER_PROCESS_PARAMETERS *params, PS_CREATE_INFO *info,
PS_ATTRIBUTE_LIST *attr )
{
return unix_funcs->NtCreateUserProcess( process_handle_ptr, thread_handle_ptr,
process_access, thread_access,
process_attr, thread_attr,
process_flags, thread_flags,
params, info, attr );
}
/********************************************************************** /**********************************************************************
* RtlCreateUserProcess (NTDLL.@) * RtlCreateUserProcess (NTDLL.@)
*/ */

View File

@ -1364,14 +1364,11 @@ static struct unix_funcs unix_funcs =
NtCreateMailslotFile, NtCreateMailslotFile,
NtCreateNamedPipeFile, NtCreateNamedPipeFile,
NtCreateSection, NtCreateSection,
NtCreateUserProcess,
NtCurrentTeb, NtCurrentTeb,
NtDeleteFile, NtDeleteFile,
NtDeviceIoControlFile, NtDeviceIoControlFile,
NtDuplicateObject, NtDuplicateObject,
NtFlushBuffersFile, NtFlushBuffersFile,
NtFlushInstructionCache,
NtFlushProcessWriteBuffers,
NtFlushVirtualMemory, NtFlushVirtualMemory,
NtFreeVirtualMemory, NtFreeVirtualMemory,
NtFsControlFile, NtFsControlFile,
@ -1380,7 +1377,6 @@ static struct unix_funcs unix_funcs =
NtLockVirtualMemory, NtLockVirtualMemory,
NtMapViewOfSection, NtMapViewOfSection,
NtNotifyChangeDirectoryFile, NtNotifyChangeDirectoryFile,
NtOpenProcess,
NtOpenSection, NtOpenSection,
NtPowerInformation, NtPowerInformation,
NtProtectVirtualMemory, NtProtectVirtualMemory,
@ -1388,7 +1384,6 @@ static struct unix_funcs unix_funcs =
NtQueryDirectoryFile, NtQueryDirectoryFile,
NtQueryFullAttributesFile, NtQueryFullAttributesFile,
NtQueryInformationFile, NtQueryInformationFile,
NtQueryInformationProcess,
NtQueryObject, NtQueryObject,
NtQueryPerformanceCounter, NtQueryPerformanceCounter,
NtQuerySection, NtQuerySection,
@ -1401,14 +1396,10 @@ static struct unix_funcs unix_funcs =
NtReadFileScatter, NtReadFileScatter,
NtReadVirtualMemory, NtReadVirtualMemory,
NtResetWriteWatch, NtResetWriteWatch,
NtResumeProcess,
NtSetInformationFile, NtSetInformationFile,
NtSetInformationObject, NtSetInformationObject,
NtSetInformationProcess,
NtSetSystemTime, NtSetSystemTime,
NtSetVolumeInformationFile, NtSetVolumeInformationFile,
NtSuspendProcess,
NtTerminateProcess,
NtUnlockVirtualMemory, NtUnlockVirtualMemory,
NtUnmapViewOfSection, NtUnmapViewOfSection,
NtWriteFile, NtWriteFile,

View File

@ -28,7 +28,7 @@ struct msghdr;
struct _DISPATCHER_CONTEXT; struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */ /* increment this when you change the function table */
#define NTDLL_UNIXLIB_VERSION 83 #define NTDLL_UNIXLIB_VERSION 84
struct unix_funcs struct unix_funcs
{ {
@ -49,12 +49,6 @@ struct unix_funcs
NTSTATUS (WINAPI *NtCreateSection)( HANDLE *handle, ACCESS_MASK access, NTSTATUS (WINAPI *NtCreateSection)( HANDLE *handle, ACCESS_MASK access,
const OBJECT_ATTRIBUTES *attr, const LARGE_INTEGER *size, const OBJECT_ATTRIBUTES *attr, const LARGE_INTEGER *size,
ULONG protect, ULONG sec_flags, HANDLE file ); ULONG protect, ULONG sec_flags, HANDLE file );
NTSTATUS (WINAPI *NtCreateUserProcess)( HANDLE *process_handle_ptr, HANDLE *thread_handle_ptr,
ACCESS_MASK process_access, ACCESS_MASK thread_access,
OBJECT_ATTRIBUTES *process_attr, OBJECT_ATTRIBUTES *thread_attr,
ULONG process_flags, ULONG thread_flags,
RTL_USER_PROCESS_PARAMETERS *params, PS_CREATE_INFO *info,
PS_ATTRIBUTE_LIST *attr );
TEB * (WINAPI *NtCurrentTeb)(void); TEB * (WINAPI *NtCurrentTeb)(void);
NTSTATUS (WINAPI *NtDeleteFile)( OBJECT_ATTRIBUTES *attr ); NTSTATUS (WINAPI *NtDeleteFile)( OBJECT_ATTRIBUTES *attr );
NTSTATUS (WINAPI *NtDeviceIoControlFile)( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, NTSTATUS (WINAPI *NtDeviceIoControlFile)( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc,
@ -65,8 +59,6 @@ struct unix_funcs
HANDLE dest_process, HANDLE *dest, HANDLE dest_process, HANDLE *dest,
ACCESS_MASK access, ULONG attributes, ULONG options ); ACCESS_MASK access, ULONG attributes, ULONG options );
NTSTATUS (WINAPI *NtFlushBuffersFile)( HANDLE handle, IO_STATUS_BLOCK *io ); NTSTATUS (WINAPI *NtFlushBuffersFile)( HANDLE handle, IO_STATUS_BLOCK *io );
NTSTATUS (WINAPI *NtFlushInstructionCache)( HANDLE handle, const void *addr, SIZE_T size );
void (WINAPI *NtFlushProcessWriteBuffers)(void);
NTSTATUS (WINAPI *NtFlushVirtualMemory)( HANDLE process, LPCVOID *addr_ptr, NTSTATUS (WINAPI *NtFlushVirtualMemory)( HANDLE process, LPCVOID *addr_ptr,
SIZE_T *size_ptr, ULONG unknown ); SIZE_T *size_ptr, ULONG unknown );
NTSTATUS (WINAPI *NtFreeVirtualMemory)( HANDLE process, PVOID *addr_ptr, NTSTATUS (WINAPI *NtFreeVirtualMemory)( HANDLE process, PVOID *addr_ptr,
@ -87,8 +79,6 @@ struct unix_funcs
void *apc_context, IO_STATUS_BLOCK *iosb, void *apc_context, IO_STATUS_BLOCK *iosb,
void *buffer, ULONG buffer_size, void *buffer, ULONG buffer_size,
ULONG filter, BOOLEAN subtree ); ULONG filter, BOOLEAN subtree );
NTSTATUS (WINAPI *NtOpenProcess)( HANDLE *handle, ACCESS_MASK access,
const OBJECT_ATTRIBUTES *attr, const CLIENT_ID *id );
NTSTATUS (WINAPI *NtOpenSection)( HANDLE *handle, ACCESS_MASK access, NTSTATUS (WINAPI *NtOpenSection)( HANDLE *handle, ACCESS_MASK access,
const OBJECT_ATTRIBUTES *attr ); const OBJECT_ATTRIBUTES *attr );
NTSTATUS (WINAPI *NtPowerInformation)( POWER_INFORMATION_LEVEL level, void *input, ULONG in_size, NTSTATUS (WINAPI *NtPowerInformation)( POWER_INFORMATION_LEVEL level, void *input, ULONG in_size,
@ -106,8 +96,6 @@ struct unix_funcs
FILE_NETWORK_OPEN_INFORMATION *info ); FILE_NETWORK_OPEN_INFORMATION *info );
NTSTATUS (WINAPI *NtQueryInformationFile)( HANDLE hFile, IO_STATUS_BLOCK *io, NTSTATUS (WINAPI *NtQueryInformationFile)( HANDLE hFile, IO_STATUS_BLOCK *io,
void *ptr, LONG len, FILE_INFORMATION_CLASS class ); void *ptr, LONG len, FILE_INFORMATION_CLASS class );
NTSTATUS (WINAPI *NtQueryInformationProcess)( HANDLE handle, PROCESSINFOCLASS class, void *info,
ULONG size, ULONG *ret_len );
NTSTATUS (WINAPI *NtQueryObject)( HANDLE handle, OBJECT_INFORMATION_CLASS info_class, NTSTATUS (WINAPI *NtQueryObject)( HANDLE handle, OBJECT_INFORMATION_CLASS info_class,
void *ptr, ULONG len, ULONG *used_len ); void *ptr, ULONG len, ULONG *used_len );
NTSTATUS (WINAPI *NtQueryPerformanceCounter)( LARGE_INTEGER *counter, LARGE_INTEGER *frequency ); NTSTATUS (WINAPI *NtQueryPerformanceCounter)( LARGE_INTEGER *counter, LARGE_INTEGER *frequency );
@ -135,18 +123,13 @@ struct unix_funcs
NTSTATUS (WINAPI *NtReadVirtualMemory)( HANDLE process, const void *addr, void *buffer, NTSTATUS (WINAPI *NtReadVirtualMemory)( HANDLE process, const void *addr, void *buffer,
SIZE_T size, SIZE_T *bytes_read ); SIZE_T size, SIZE_T *bytes_read );
NTSTATUS (WINAPI *NtResetWriteWatch)( HANDLE process, PVOID base, SIZE_T size ); NTSTATUS (WINAPI *NtResetWriteWatch)( HANDLE process, PVOID base, SIZE_T size );
NTSTATUS (WINAPI *NtResumeProcess)( HANDLE handle );
NTSTATUS (WINAPI *NtSetInformationFile)( HANDLE handle, IO_STATUS_BLOCK *io, NTSTATUS (WINAPI *NtSetInformationFile)( HANDLE handle, IO_STATUS_BLOCK *io,
void *ptr, ULONG len, FILE_INFORMATION_CLASS class ); void *ptr, ULONG len, FILE_INFORMATION_CLASS class );
NTSTATUS (WINAPI *NtSetInformationObject)( HANDLE handle, OBJECT_INFORMATION_CLASS info_class, NTSTATUS (WINAPI *NtSetInformationObject)( HANDLE handle, OBJECT_INFORMATION_CLASS info_class,
void *ptr, ULONG len ); void *ptr, ULONG len );
NTSTATUS (WINAPI *NtSetInformationProcess)( HANDLE handle, PROCESSINFOCLASS class,
void *info, ULONG size );
NTSTATUS (WINAPI *NtSetSystemTime)( const LARGE_INTEGER *new, LARGE_INTEGER *old ); NTSTATUS (WINAPI *NtSetSystemTime)( const LARGE_INTEGER *new, LARGE_INTEGER *old );
NTSTATUS (WINAPI *NtSetVolumeInformationFile)( HANDLE handle, IO_STATUS_BLOCK *io, void *info, NTSTATUS (WINAPI *NtSetVolumeInformationFile)( HANDLE handle, IO_STATUS_BLOCK *io, void *info,
ULONG length, FS_INFORMATION_CLASS class ); ULONG length, FS_INFORMATION_CLASS class );
NTSTATUS (WINAPI *NtSuspendProcess)( HANDLE handle );
NTSTATUS (WINAPI *NtTerminateProcess)( HANDLE handle, LONG exit_code );
NTSTATUS (WINAPI *NtUnlockVirtualMemory)( HANDLE process, PVOID *addr, NTSTATUS (WINAPI *NtUnlockVirtualMemory)( HANDLE process, PVOID *addr,
SIZE_T *size, ULONG unknown ); SIZE_T *size, ULONG unknown );
NTSTATUS (WINAPI *NtUnmapViewOfSection)( HANDLE process, PVOID addr ); NTSTATUS (WINAPI *NtUnmapViewOfSection)( HANDLE process, PVOID addr );