ntdll: Use syscall thunks for file functions.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-07-16 10:40:24 +02:00
parent 635e914bde
commit 3b4c2ffb7b
5 changed files with 37 additions and 450 deletions

View File

@ -83,24 +83,6 @@ void init_directories(void)
}
/******************************************************************************
* NtQueryDirectoryFile [NTDLL.@]
* ZwQueryDirectoryFile [NTDLL.@]
*/
NTSTATUS WINAPI DECLSPEC_HOTPATCH NtQueryDirectoryFile( HANDLE handle, HANDLE event,
PIO_APC_ROUTINE apc_routine, PVOID apc_context,
PIO_STATUS_BLOCK io,
PVOID buffer, ULONG length,
FILE_INFORMATION_CLASS info_class,
BOOLEAN single_entry,
PUNICODE_STRING mask,
BOOLEAN restart_scan )
{
return unix_funcs->NtQueryDirectoryFile( handle, event, apc_routine, apc_context, io, buffer, length,
info_class, single_entry, mask, restart_scan );
}
/******************************************************************************
* wine_nt_to_unix_file_name (NTDLL.@) Not a Windows API
*

View File

@ -38,275 +38,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
/******************************************************************************
* NtReadFile [NTDLL.@]
* ZwReadFile [NTDLL.@]
*
* Read from an open file handle.
*
* PARAMS
* FileHandle [I] Handle returned from ZwOpenFile() or ZwCreateFile()
* Event [I] Event to signal upon completion (or NULL)
* ApcRoutine [I] Callback to call upon completion (or NULL)
* ApcContext [I] Context for ApcRoutine (or NULL)
* IoStatusBlock [O] Receives information about the operation on return
* Buffer [O] Destination for the data read
* Length [I] Size of Buffer
* ByteOffset [O] Destination for the new file pointer position (or NULL)
* Key [O] Function unknown (may be NULL)
*
* RETURNS
* Success: 0. IoStatusBlock is updated, and the Information member contains
* The number of bytes read.
* Failure: An NTSTATUS error code describing the error.
*/
NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
PIO_APC_ROUTINE apc, void* apc_user,
PIO_STATUS_BLOCK io_status, void* buffer, ULONG length,
PLARGE_INTEGER offset, PULONG key)
{
return unix_funcs->NtReadFile( hFile, hEvent, apc, apc_user, io_status, buffer, length, offset, key );
}
/******************************************************************************
* NtReadFileScatter [NTDLL.@]
* ZwReadFileScatter [NTDLL.@]
*/
NTSTATUS WINAPI NtReadFileScatter( HANDLE file, HANDLE event, PIO_APC_ROUTINE apc, void *apc_user,
PIO_STATUS_BLOCK io_status, FILE_SEGMENT_ELEMENT *segments,
ULONG length, PLARGE_INTEGER offset, PULONG key )
{
return unix_funcs->NtReadFileScatter( file, event, apc, apc_user, io_status,
segments, length, offset, key );
}
/******************************************************************************
* NtWriteFile [NTDLL.@]
* ZwWriteFile [NTDLL.@]
*
* Write to an open file handle.
*
* PARAMS
* FileHandle [I] Handle returned from ZwOpenFile() or ZwCreateFile()
* Event [I] Event to signal upon completion (or NULL)
* ApcRoutine [I] Callback to call upon completion (or NULL)
* ApcContext [I] Context for ApcRoutine (or NULL)
* IoStatusBlock [O] Receives information about the operation on return
* Buffer [I] Source for the data to write
* Length [I] Size of Buffer
* ByteOffset [O] Destination for the new file pointer position (or NULL)
* Key [O] Function unknown (may be NULL)
*
* RETURNS
* Success: 0. IoStatusBlock is updated, and the Information member contains
* The number of bytes written.
* Failure: An NTSTATUS error code describing the error.
*/
NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent,
PIO_APC_ROUTINE apc, void* apc_user,
PIO_STATUS_BLOCK io_status,
const void* buffer, ULONG length,
PLARGE_INTEGER offset, PULONG key)
{
return unix_funcs->NtWriteFile( hFile, hEvent, apc, apc_user, io_status, buffer, length, offset, key );
}
/******************************************************************************
* NtWriteFileGather [NTDLL.@]
* ZwWriteFileGather [NTDLL.@]
*/
NTSTATUS WINAPI NtWriteFileGather( HANDLE file, HANDLE event, PIO_APC_ROUTINE apc, void *apc_user,
PIO_STATUS_BLOCK io_status, FILE_SEGMENT_ELEMENT *segments,
ULONG length, PLARGE_INTEGER offset, PULONG key )
{
return unix_funcs->NtWriteFileGather( file, event, apc, apc_user, io_status,
segments, length, offset, key );
}
/**************************************************************************
* NtDeviceIoControlFile [NTDLL.@]
* ZwDeviceIoControlFile [NTDLL.@]
*
* Perform an I/O control operation on an open file handle.
*
* PARAMS
* handle [I] Handle returned from ZwOpenFile() or ZwCreateFile()
* event [I] Event to signal upon completion (or NULL)
* apc [I] Callback to call upon completion (or NULL)
* apc_context [I] Context for ApcRoutine (or NULL)
* io [O] Receives information about the operation on return
* code [I] Control code for the operation to perform
* in_buffer [I] Source for any input data required (or NULL)
* in_size [I] Size of InputBuffer
* out_buffer [O] Source for any output data returned (or NULL)
* out_size [I] Size of OutputBuffer
*
* RETURNS
* Success: 0. IoStatusBlock is updated.
* Failure: An NTSTATUS error code describing the error.
*/
NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE handle, HANDLE event,
PIO_APC_ROUTINE apc, PVOID apc_context,
PIO_STATUS_BLOCK io, ULONG code,
PVOID in_buffer, ULONG in_size,
PVOID out_buffer, ULONG out_size)
{
return unix_funcs->NtDeviceIoControlFile( handle, event, apc, apc_context, io, code,
in_buffer, in_size, out_buffer, out_size );
}
/**************************************************************************
* NtFsControlFile [NTDLL.@]
* ZwFsControlFile [NTDLL.@]
*
* Perform a file system control operation on an open file handle.
*
* PARAMS
* handle [I] Handle returned from ZwOpenFile() or ZwCreateFile()
* event [I] Event to signal upon completion (or NULL)
* apc [I] Callback to call upon completion (or NULL)
* apc_context [I] Context for ApcRoutine (or NULL)
* io [O] Receives information about the operation on return
* code [I] Control code for the operation to perform
* in_buffer [I] Source for any input data required (or NULL)
* in_size [I] Size of InputBuffer
* out_buffer [O] Source for any output data returned (or NULL)
* out_size [I] Size of OutputBuffer
*
* RETURNS
* Success: 0. IoStatusBlock is updated.
* Failure: An NTSTATUS error code describing the error.
*/
NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc,
PVOID apc_context, PIO_STATUS_BLOCK io, ULONG code,
PVOID in_buffer, ULONG in_size, PVOID out_buffer, ULONG out_size)
{
return unix_funcs->NtFsControlFile( handle, event, apc, apc_context, io, code,
in_buffer, in_size, out_buffer, out_size );
}
/******************************************************************************
* NtNotifyChangeDirectoryFile [NTDLL.@]
*/
NTSTATUS WINAPI NtNotifyChangeDirectoryFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc,
void *apc_context, PIO_STATUS_BLOCK iosb, void *buffer,
ULONG buffer_size, ULONG filter, BOOLEAN subtree )
{
return unix_funcs->NtNotifyChangeDirectoryFile( handle, event, apc, apc_context, iosb,
buffer, buffer_size, filter, subtree );
}
/******************************************************************************
* NtSetVolumeInformationFile [NTDLL.@]
* ZwSetVolumeInformationFile [NTDLL.@]
*/
NTSTATUS WINAPI NtSetVolumeInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, void *info,
ULONG length, FS_INFORMATION_CLASS class )
{
return unix_funcs->NtSetVolumeInformationFile( handle, io, info, length, class );
}
/******************************************************************************
* NtQueryInformationFile [NTDLL.@]
* ZwQueryInformationFile [NTDLL.@]
*
* Get information about an open file handle.
*
* PARAMS
* hFile [I] Handle returned from ZwOpenFile() or ZwCreateFile()
* io [O] Receives information about the operation on return
* ptr [O] Destination for file information
* len [I] Size of FileInformation
* class [I] Type of file information to get
*
* RETURNS
* Success: 0. IoStatusBlock and FileInformation are updated.
* Failure: An NTSTATUS error code describing the error.
*/
NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
PVOID ptr, LONG len, FILE_INFORMATION_CLASS class )
{
return unix_funcs->NtQueryInformationFile( hFile, io, ptr, len, class );
}
/******************************************************************************
* NtSetInformationFile [NTDLL.@]
* ZwSetInformationFile [NTDLL.@]
*
* Set information about an open file handle.
*
* PARAMS
* handle [I] Handle returned from ZwOpenFile() or ZwCreateFile()
* io [O] Receives information about the operation on return
* ptr [I] Source for file information
* len [I] Size of FileInformation
* class [I] Type of file information to set
*
* RETURNS
* Success: 0. io is updated.
* Failure: An NTSTATUS error code describing the error.
*/
NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
PVOID ptr, ULONG len, FILE_INFORMATION_CLASS class)
{
return unix_funcs->NtSetInformationFile( handle, io, ptr, len, class );
}
/******************************************************************************
* NtQueryFullAttributesFile (NTDLL.@)
*/
NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
FILE_NETWORK_OPEN_INFORMATION *info )
{
return unix_funcs->NtQueryFullAttributesFile( attr, info );
}
/******************************************************************************
* NtQueryAttributesFile (NTDLL.@)
* ZwQueryAttributesFile (NTDLL.@)
*/
NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC_INFORMATION *info )
{
return unix_funcs->NtQueryAttributesFile( attr, info );
}
/******************************************************************************
* NtQueryVolumeInformationFile [NTDLL.@]
* ZwQueryVolumeInformationFile [NTDLL.@]
*
* Get volume information for an open file handle.
*
* PARAMS
* handle [I] Handle returned from ZwOpenFile() or ZwCreateFile()
* io [O] Receives information about the operation on return
* buffer [O] Destination for volume information
* length [I] Size of FsInformation
* info_class [I] Type of volume information to set
*
* RETURNS
* Success: 0. io and buffer are updated.
* Failure: An NTSTATUS error code describing the error.
*/
NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io,
PVOID buffer, ULONG length,
FS_INFORMATION_CLASS info_class )
{
return unix_funcs->NtQueryVolumeInformationFile( handle, io, buffer, length, info_class );
}
/******************************************************************
* NtQueryEaFile (NTDLL.@)
*
@ -360,24 +91,6 @@ NTSTATUS WINAPI NtSetEaFile( HANDLE hFile, PIO_STATUS_BLOCK iosb, PVOID buffer,
}
/******************************************************************
* NtFlushBuffersFile (NTDLL.@)
*
* Flush any buffered data on an open file handle.
*
* PARAMS
* FileHandle [I] Handle returned from ZwOpenFile() or ZwCreateFile()
* IoStatusBlock [O] Receives information about the operation on return
*
* RETURNS
* Success: 0. IoStatusBlock is updated.
* Failure: An NTSTATUS error code describing the error.
*/
NTSTATUS WINAPI NtFlushBuffersFile( HANDLE hFile, IO_STATUS_BLOCK *io )
{
return unix_funcs->NtFlushBuffersFile( hFile, io );
}
/******************************************************************
* NtLockFile (NTDLL.@)
*
@ -481,30 +194,6 @@ NTSTATUS WINAPI NtUnlockFile( HANDLE hFile, PIO_STATUS_BLOCK io_status,
return status;
}
/******************************************************************
* NtCreateNamedPipeFile (NTDLL.@)
*/
NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
POBJECT_ATTRIBUTES attr, PIO_STATUS_BLOCK iosb,
ULONG sharing, ULONG dispo, ULONG options,
ULONG pipe_type, ULONG read_mode,
ULONG completion_mode, ULONG max_inst,
ULONG inbound_quota, ULONG outbound_quota,
PLARGE_INTEGER timeout)
{
return unix_funcs->NtCreateNamedPipeFile( handle, access, attr, iosb, sharing, dispo, options,
pipe_type, read_mode, completion_mode, max_inst,
inbound_quota, outbound_quota, timeout );
}
/******************************************************************
* NtDeleteFile (NTDLL.@)
*/
NTSTATUS WINAPI NtDeleteFile( OBJECT_ATTRIBUTES *attr )
{
return unix_funcs->NtDeleteFile( attr );
}
/******************************************************************
* NtCancelIoFileEx (NTDLL.@)
*
@ -546,14 +235,3 @@ NTSTATUS WINAPI NtCancelIoFile( HANDLE hFile, PIO_STATUS_BLOCK io_status )
return io_status->u.Status;
}
/******************************************************************************
* NtCreateMailslotFile [NTDLL.@]
* ZwCreateMailslotFile [NTDLL.@]
*/
NTSTATUS WINAPI NtCreateMailslotFile( HANDLE *handle, ULONG access, OBJECT_ATTRIBUTES *attr,
IO_STATUS_BLOCK *io, ULONG options, ULONG quota, ULONG msg_size,
LARGE_INTEGER *timeout )
{
return unix_funcs->NtCreateMailslotFile( handle, access, attr, io, options, quota, msg_size, timeout );
}

View File

@ -170,9 +170,9 @@
@ stdcall NtCreateKeyTransacted(ptr long ptr long ptr long long ptr)
@ stdcall -syscall NtCreateKeyedEvent(ptr long ptr long)
@ stdcall NtCreateLowBoxToken(ptr long long ptr ptr long ptr long ptr)
@ stdcall NtCreateMailslotFile(ptr long ptr ptr long long long ptr)
@ stdcall -syscall NtCreateMailslotFile(ptr long ptr ptr long long long ptr)
@ stdcall -syscall NtCreateMutant(ptr long ptr long)
@ stdcall NtCreateNamedPipeFile(ptr long ptr ptr long long long long long long long long long ptr)
@ stdcall -syscall NtCreateNamedPipeFile(ptr long ptr ptr long long long long long long long long long ptr)
@ stdcall NtCreatePagingFile(ptr ptr ptr ptr)
@ stdcall NtCreatePort(ptr ptr long long ptr)
@ stdcall NtCreatePowerRequest(ptr ptr)
@ -194,11 +194,11 @@
@ stdcall -syscall NtDelayExecution(long ptr)
@ stdcall NtDeleteAtom(long)
# @ stub NtDeleteBootEntry
@ stdcall NtDeleteFile(ptr)
@ stdcall -syscall NtDeleteFile(ptr)
@ stdcall NtDeleteKey(long)
# @ stub NtDeleteObjectAuditAlarm
@ stdcall NtDeleteValueKey(long ptr)
@ stdcall NtDeviceIoControlFile(long long ptr ptr ptr long ptr long ptr long)
@ stdcall -syscall NtDeviceIoControlFile(long long ptr ptr ptr long ptr long ptr long)
@ stdcall NtDisplayString(ptr)
@ stdcall NtDuplicateObject(long long long ptr long long long)
@ stdcall NtDuplicateToken(long long ptr long long ptr)
@ -210,7 +210,7 @@
@ stub NtExtendSection
# @ stub NtFilterToken
@ stdcall NtFindAtom(ptr long ptr)
@ stdcall NtFlushBuffersFile(long ptr)
@ stdcall -syscall NtFlushBuffersFile(long ptr)
@ stdcall -syscall NtFlushInstructionCache(long ptr long)
@ stdcall NtFlushKey(long)
@ stdcall -syscall NtFlushProcessWriteBuffers()
@ -218,7 +218,7 @@
@ stub NtFlushWriteBuffer
# @ stub NtFreeUserPhysicalPages
@ stdcall NtFreeVirtualMemory(long ptr ptr long)
@ stdcall NtFsControlFile(long long ptr ptr ptr long ptr long ptr long)
@ stdcall -syscall NtFsControlFile(long long ptr ptr ptr long ptr long ptr long)
@ stdcall -norelay NtGetContextThread(long ptr)
@ stdcall -syscall NtGetCurrentProcessorNumber()
# @ stub NtGetDevicePowerState
@ -247,7 +247,7 @@
# @ stub NtMapUserPhysicalPagesScatter
@ stdcall NtMapViewOfSection(long long ptr long long ptr ptr long long long)
# @ stub NtModifyBootEntry
@ stdcall NtNotifyChangeDirectoryFile(long long ptr ptr ptr ptr long long long)
@ stdcall -syscall NtNotifyChangeDirectoryFile(long long ptr ptr ptr ptr long long long)
@ stdcall NtNotifyChangeKey(long long ptr ptr ptr long long ptr long long)
@ stdcall NtNotifyChangeMultipleKeys(long long ptr long ptr ptr ptr long long ptr long long)
@ stdcall NtOpenDirectoryObject(ptr long ptr)
@ -280,19 +280,19 @@
@ stub NtPrivilegedServiceAuditAlarm
@ stdcall NtProtectVirtualMemory(long ptr ptr long ptr)
@ stdcall -syscall NtPulseEvent(long ptr)
@ stdcall NtQueryAttributesFile(ptr ptr)
@ stdcall -syscall NtQueryAttributesFile(ptr ptr)
# @ stub NtQueryBootEntryOrder
# @ stub NtQueryBootOptions
# @ stub NtQueryDebugFilterState
@ stdcall NtQueryDefaultLocale(long ptr)
@ stdcall NtQueryDefaultUILanguage(ptr)
@ stdcall NtQueryDirectoryFile(long long ptr ptr ptr ptr long long long ptr long)
@ stdcall -syscall NtQueryDirectoryFile(long long ptr ptr ptr ptr long long long ptr long)
@ stdcall NtQueryDirectoryObject(long ptr long long long ptr ptr)
@ stdcall NtQueryEaFile(long ptr ptr long long ptr long ptr long)
@ stdcall -syscall NtQueryEvent(long long ptr long ptr)
@ stdcall NtQueryFullAttributesFile(ptr ptr)
@ stdcall -syscall NtQueryFullAttributesFile(ptr ptr)
@ stdcall NtQueryInformationAtom(long long ptr long ptr)
@ stdcall NtQueryInformationFile(long ptr ptr long long)
@ stdcall -syscall NtQueryInformationFile(long ptr ptr long long)
@ stdcall -syscall NtQueryInformationJobObject(long long ptr long ptr)
@ stub NtQueryInformationPort
@ stdcall -syscall NtQueryInformationProcess(long long ptr long ptr)
@ -323,12 +323,12 @@
@ stdcall NtQueryTimerResolution(ptr ptr ptr)
@ stdcall NtQueryValueKey(long ptr long ptr long ptr)
@ stdcall NtQueryVirtualMemory(long ptr long ptr long ptr)
@ stdcall NtQueryVolumeInformationFile(long ptr ptr long long)
@ stdcall -syscall NtQueryVolumeInformationFile(long ptr ptr long long)
@ stdcall -syscall NtQueueApcThread(long ptr long long long)
@ stdcall -syscall NtRaiseException(ptr ptr long)
@ stdcall NtRaiseHardError(long long ptr ptr long ptr)
@ stdcall NtReadFile(long long ptr ptr ptr ptr long ptr ptr)
@ stdcall NtReadFileScatter(long long ptr ptr ptr ptr long ptr ptr)
@ stdcall -syscall NtReadFile(long long ptr ptr ptr ptr long ptr ptr)
@ stdcall -syscall NtReadFileScatter(long long ptr ptr ptr ptr long ptr ptr)
@ stub NtReadRequestData
@ stdcall NtReadVirtualMemory(long ptr ptr long ptr)
@ stub NtRegisterNewDevice
@ -373,7 +373,7 @@
@ stub NtSetHighWaitLowEventPair
@ stub NtSetHighWaitLowThread
# @ stub NtSetInformationDebugObject
@ stdcall NtSetInformationFile(long ptr ptr long long)
@ stdcall -syscall NtSetInformationFile(long ptr ptr long long)
@ stdcall -syscall NtSetInformationJobObject(long long ptr long)
@ stdcall NtSetInformationKey(long long ptr long)
@ stdcall NtSetInformationObject(long long ptr long)
@ -399,7 +399,7 @@
@ stdcall NtSetTimerResolution(long long ptr)
# @ stub NtSetUuidSeed
@ stdcall NtSetValueKey(long ptr long long ptr long)
@ stdcall NtSetVolumeInformationFile(long ptr ptr long long)
@ stdcall -syscall NtSetVolumeInformationFile(long ptr ptr long long)
@ stdcall NtShutdownSystem(long)
@ stdcall -syscall NtSignalAndWaitForSingleObject(long long long ptr)
@ stub NtStartProfile
@ -428,8 +428,8 @@
@ stdcall -syscall NtWaitForSingleObject(long long ptr)
@ stub NtWaitHighEventPair
@ stub NtWaitLowEventPair
@ stdcall NtWriteFile(long long ptr ptr ptr ptr long ptr ptr)
@ stdcall NtWriteFileGather(long long ptr ptr ptr ptr long ptr ptr)
@ stdcall -syscall NtWriteFile(long long ptr ptr ptr ptr long ptr ptr)
@ stdcall -syscall NtWriteFileGather(long long ptr ptr ptr ptr long ptr ptr)
@ stub NtWriteRequestData
@ stdcall NtWriteVirtualMemory(long ptr ptr long ptr)
@ stdcall -syscall NtYieldExecution()
@ -1158,9 +1158,9 @@
@ stdcall -private ZwCreateKey(ptr long ptr long ptr long ptr) NtCreateKey
@ stdcall -private ZwCreateKeyTransacted(ptr long ptr long ptr long long ptr) NtCreateKeyTransacted
@ stdcall -private -syscall ZwCreateKeyedEvent(ptr long ptr long) NtCreateKeyedEvent
@ stdcall -private ZwCreateMailslotFile(ptr long ptr ptr long long long ptr) NtCreateMailslotFile
@ stdcall -private -syscall ZwCreateMailslotFile(ptr long ptr ptr long long long ptr) NtCreateMailslotFile
@ stdcall -private -syscall ZwCreateMutant(ptr long ptr long) NtCreateMutant
@ stdcall -private ZwCreateNamedPipeFile(ptr long ptr ptr long long long long long long long long long ptr) NtCreateNamedPipeFile
@ stdcall -private -syscall ZwCreateNamedPipeFile(ptr long ptr ptr long long long long long long long long long ptr) NtCreateNamedPipeFile
@ stdcall -private ZwCreatePagingFile(ptr ptr ptr ptr) NtCreatePagingFile
@ stdcall -private ZwCreatePort(ptr ptr long long ptr) NtCreatePort
@ stdcall -private ZwCreatePowerRequest(ptr ptr) NtCreatePowerRequest
@ -1181,11 +1181,11 @@
@ stdcall -private -syscall ZwDelayExecution(long ptr) NtDelayExecution
@ stdcall -private ZwDeleteAtom(long) NtDeleteAtom
# @ stub ZwDeleteBootEntry
@ stdcall -private ZwDeleteFile(ptr) NtDeleteFile
@ stdcall -private -syscall ZwDeleteFile(ptr) NtDeleteFile
@ stdcall -private ZwDeleteKey(long) NtDeleteKey
# @ stub ZwDeleteObjectAuditAlarm
@ stdcall -private ZwDeleteValueKey(long ptr) NtDeleteValueKey
@ stdcall -private ZwDeviceIoControlFile(long long ptr ptr ptr long ptr long ptr long) NtDeviceIoControlFile
@ stdcall -private -syscall ZwDeviceIoControlFile(long long ptr ptr ptr long ptr long ptr long) NtDeviceIoControlFile
@ stdcall -private ZwDisplayString(ptr) NtDisplayString
@ stdcall -private ZwDuplicateObject(long long long ptr long long long) NtDuplicateObject
@ stdcall -private ZwDuplicateToken(long long ptr long long ptr) NtDuplicateToken
@ -1197,7 +1197,7 @@
@ stub ZwExtendSection
# @ stub ZwFilterToken
@ stdcall -private ZwFindAtom(ptr long ptr) NtFindAtom
@ stdcall -private ZwFlushBuffersFile(long ptr) NtFlushBuffersFile
@ stdcall -private -syscall ZwFlushBuffersFile(long ptr) NtFlushBuffersFile
@ stdcall -private -syscall ZwFlushInstructionCache(long ptr long) NtFlushInstructionCache
@ stdcall -private ZwFlushKey(long) NtFlushKey
@ stdcall -private -syscall ZwFlushProcessWriteBuffers() NtFlushProcessWriteBuffers
@ -1205,7 +1205,7 @@
@ stub ZwFlushWriteBuffer
# @ stub ZwFreeUserPhysicalPages
@ stdcall -private ZwFreeVirtualMemory(long ptr ptr long) NtFreeVirtualMemory
@ stdcall -private ZwFsControlFile(long long ptr ptr ptr long ptr long ptr long) NtFsControlFile
@ stdcall -private -syscall ZwFsControlFile(long long ptr ptr ptr long ptr long ptr long) NtFsControlFile
@ stdcall -private -norelay ZwGetContextThread(long ptr) NtGetContextThread
@ stdcall -private -syscall ZwGetCurrentProcessorNumber() NtGetCurrentProcessorNumber
# @ stub ZwGetDevicePowerState
@ -1234,7 +1234,7 @@
# @ stub ZwMapUserPhysicalPagesScatter
@ stdcall -private ZwMapViewOfSection(long long ptr long long ptr ptr long long long) NtMapViewOfSection
# @ stub ZwModifyBootEntry
@ stdcall -private ZwNotifyChangeDirectoryFile(long long ptr ptr ptr ptr long long long) NtNotifyChangeDirectoryFile
@ stdcall -private -syscall ZwNotifyChangeDirectoryFile(long long ptr ptr ptr ptr long long long) NtNotifyChangeDirectoryFile
@ stdcall -private ZwNotifyChangeKey(long long ptr ptr ptr long long ptr long long) NtNotifyChangeKey
@ stdcall -private ZwNotifyChangeMultipleKeys(long long ptr long ptr ptr ptr long long ptr long long) NtNotifyChangeMultipleKeys
@ stdcall -private ZwOpenDirectoryObject(ptr long ptr) NtOpenDirectoryObject
@ -1267,19 +1267,19 @@
@ stub ZwPrivilegedServiceAuditAlarm
@ stdcall -private ZwProtectVirtualMemory(long ptr ptr long ptr) NtProtectVirtualMemory
@ stdcall -private -syscall ZwPulseEvent(long ptr) NtPulseEvent
@ stdcall -private ZwQueryAttributesFile(ptr ptr) NtQueryAttributesFile
@ stdcall -private -syscall ZwQueryAttributesFile(ptr ptr) NtQueryAttributesFile
# @ stub ZwQueryBootEntryOrder
# @ stub ZwQueryBootOptions
# @ stub ZwQueryDebugFilterState
@ stdcall -private ZwQueryDefaultLocale(long ptr) NtQueryDefaultLocale
@ stdcall -private ZwQueryDefaultUILanguage(ptr) NtQueryDefaultUILanguage
@ stdcall -private ZwQueryDirectoryFile(long long ptr ptr ptr ptr long long long ptr long) NtQueryDirectoryFile
@ stdcall -private -syscall ZwQueryDirectoryFile(long long ptr ptr ptr ptr long long long ptr long) NtQueryDirectoryFile
@ stdcall -private ZwQueryDirectoryObject(long ptr long long long ptr ptr) NtQueryDirectoryObject
@ stdcall -private ZwQueryEaFile(long ptr ptr long long ptr long ptr long) NtQueryEaFile
@ stdcall -private -syscall ZwQueryEvent(long long ptr long ptr) NtQueryEvent
@ stdcall -private ZwQueryFullAttributesFile(ptr ptr) NtQueryFullAttributesFile
@ stdcall -private -syscall ZwQueryFullAttributesFile(ptr ptr) NtQueryFullAttributesFile
@ stdcall -private ZwQueryInformationAtom(long long ptr long ptr) NtQueryInformationAtom
@ stdcall -private ZwQueryInformationFile(long ptr ptr long long) NtQueryInformationFile
@ stdcall -private -syscall ZwQueryInformationFile(long ptr ptr long long) NtQueryInformationFile
@ stdcall -private -syscall ZwQueryInformationJobObject(long long ptr long ptr) NtQueryInformationJobObject
@ stub ZwQueryInformationPort
@ stdcall -private -syscall ZwQueryInformationProcess(long long ptr long ptr) NtQueryInformationProcess
@ -1310,12 +1310,12 @@
@ stdcall -private ZwQueryTimerResolution(ptr ptr ptr) NtQueryTimerResolution
@ stdcall -private ZwQueryValueKey(long ptr long ptr long ptr) NtQueryValueKey
@ stdcall -private ZwQueryVirtualMemory(long ptr long ptr long ptr) NtQueryVirtualMemory
@ stdcall -private ZwQueryVolumeInformationFile(long ptr ptr long long) NtQueryVolumeInformationFile
@ stdcall -private -syscall ZwQueryVolumeInformationFile(long ptr ptr long long) NtQueryVolumeInformationFile
@ stdcall -private -syscall ZwQueueApcThread(long ptr long long long) NtQueueApcThread
@ stdcall -private -syscall ZwRaiseException(ptr ptr long) NtRaiseException
@ stdcall -private ZwRaiseHardError(long long ptr ptr long ptr) NtRaiseHardError
@ stdcall -private ZwReadFile(long long ptr ptr ptr ptr long ptr ptr) NtReadFile
@ stdcall -private ZwReadFileScatter(long long ptr ptr ptr ptr long ptr ptr) NtReadFileScatter
@ stdcall -private -syscall ZwReadFile(long long ptr ptr ptr ptr long ptr ptr) NtReadFile
@ stdcall -private -syscall ZwReadFileScatter(long long ptr ptr ptr ptr long ptr ptr) NtReadFileScatter
@ stub ZwReadRequestData
@ stdcall -private ZwReadVirtualMemory(long ptr ptr long ptr) NtReadVirtualMemory
@ stub ZwRegisterNewDevice
@ -1360,7 +1360,7 @@
@ stub ZwSetHighWaitLowEventPair
@ stub ZwSetHighWaitLowThread
# @ stub ZwSetInformationDebugObject
@ stdcall -private ZwSetInformationFile(long ptr ptr long long) NtSetInformationFile
@ stdcall -private -syscall ZwSetInformationFile(long ptr ptr long long) NtSetInformationFile
@ stdcall -private -syscall ZwSetInformationJobObject(long long ptr long) NtSetInformationJobObject
@ stdcall -private ZwSetInformationKey(long long ptr long) NtSetInformationKey
@ stdcall -private ZwSetInformationObject(long long ptr long) NtSetInformationObject
@ -1386,7 +1386,7 @@
@ stdcall -private ZwSetTimerResolution(long long ptr) NtSetTimerResolution
# @ stub ZwSetUuidSeed
@ stdcall -private ZwSetValueKey(long ptr long long ptr long) NtSetValueKey
@ stdcall -private ZwSetVolumeInformationFile(long ptr ptr long long) NtSetVolumeInformationFile
@ stdcall -private -syscall ZwSetVolumeInformationFile(long ptr ptr long long) NtSetVolumeInformationFile
@ stdcall -private ZwShutdownSystem(long) NtShutdownSystem
@ stdcall -private -syscall ZwSignalAndWaitForSingleObject(long long long ptr) NtSignalAndWaitForSingleObject
@ stub ZwStartProfile
@ -1415,8 +1415,8 @@
@ stdcall -private -syscall ZwWaitForSingleObject(long long ptr) NtWaitForSingleObject
@ stub ZwWaitHighEventPair
@ stub ZwWaitLowEventPair
@ stdcall -private ZwWriteFile(long long ptr ptr ptr ptr long ptr ptr) NtWriteFile
@ stdcall -private ZwWriteFileGather(long long ptr ptr ptr ptr long ptr ptr) NtWriteFileGather
@ stdcall -private -syscall ZwWriteFile(long long ptr ptr ptr ptr long ptr ptr) NtWriteFile
@ stdcall -private -syscall ZwWriteFileGather(long long ptr ptr ptr ptr long ptr ptr) NtWriteFileGather
@ stub ZwWriteRequestData
@ stdcall -private ZwWriteVirtualMemory(long ptr ptr long ptr) NtWriteVirtualMemory
@ stdcall -private -syscall ZwYieldExecution() NtYieldExecution

View File

@ -1361,29 +1361,18 @@ static struct unix_funcs unix_funcs =
NtAllocateVirtualMemory,
NtAreMappedFilesTheSame,
NtClose,
NtCreateMailslotFile,
NtCreateNamedPipeFile,
NtCreateSection,
NtCurrentTeb,
NtDeleteFile,
NtDeviceIoControlFile,
NtDuplicateObject,
NtFlushBuffersFile,
NtFlushVirtualMemory,
NtFreeVirtualMemory,
NtFsControlFile,
NtGetContextThread,
NtGetWriteWatch,
NtLockVirtualMemory,
NtMapViewOfSection,
NtNotifyChangeDirectoryFile,
NtOpenSection,
NtPowerInformation,
NtProtectVirtualMemory,
NtQueryAttributesFile,
NtQueryDirectoryFile,
NtQueryFullAttributesFile,
NtQueryInformationFile,
NtQueryObject,
NtQueryPerformanceCounter,
NtQuerySection,
@ -1391,19 +1380,12 @@ static struct unix_funcs unix_funcs =
NtQuerySystemInformationEx,
NtQuerySystemTime,
NtQueryVirtualMemory,
NtQueryVolumeInformationFile,
NtReadFile,
NtReadFileScatter,
NtReadVirtualMemory,
NtResetWriteWatch,
NtSetInformationFile,
NtSetInformationObject,
NtSetSystemTime,
NtSetVolumeInformationFile,
NtUnlockVirtualMemory,
NtUnmapViewOfSection,
NtWriteFile,
NtWriteFileGather,
NtWriteVirtualMemory,
DbgUiIssueRemoteBreakin,
RtlGetSystemTimePrecise,

View File

@ -28,7 +28,7 @@ struct msghdr;
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
#define NTDLL_UNIXLIB_VERSION 84
#define NTDLL_UNIXLIB_VERSION 85
struct unix_funcs
{
@ -37,36 +37,17 @@ struct unix_funcs
SIZE_T *size_ptr, ULONG type, ULONG protect );
NTSTATUS (WINAPI *NtAreMappedFilesTheSame)(PVOID addr1, PVOID addr2);
NTSTATUS (WINAPI *NtClose)( HANDLE handle );
NTSTATUS (WINAPI *NtCreateMailslotFile)( HANDLE *handle, ULONG access, OBJECT_ATTRIBUTES *attr,
IO_STATUS_BLOCK *io, ULONG options, ULONG quota,
ULONG msg_size, LARGE_INTEGER *timeout );
NTSTATUS (WINAPI *NtCreateNamedPipeFile)( HANDLE *handle, ULONG access, OBJECT_ATTRIBUTES *attr,
IO_STATUS_BLOCK *io, ULONG sharing, ULONG dispo,
ULONG options, ULONG pipe_type, ULONG read_mode,
ULONG completion_mode, ULONG max_inst,
ULONG inbound_quota, ULONG outbound_quota,
LARGE_INTEGER *timeout );
NTSTATUS (WINAPI *NtCreateSection)( HANDLE *handle, ACCESS_MASK access,
const OBJECT_ATTRIBUTES *attr, const LARGE_INTEGER *size,
ULONG protect, ULONG sec_flags, HANDLE file );
TEB * (WINAPI *NtCurrentTeb)(void);
NTSTATUS (WINAPI *NtDeleteFile)( OBJECT_ATTRIBUTES *attr );
NTSTATUS (WINAPI *NtDeviceIoControlFile)( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc,
void *apc_context, IO_STATUS_BLOCK *io, ULONG code,
void *in_buffer, ULONG in_size,
void *out_buffer, ULONG out_size );
NTSTATUS (WINAPI *NtDuplicateObject)( HANDLE source_process, HANDLE source,
HANDLE dest_process, HANDLE *dest,
ACCESS_MASK access, ULONG attributes, ULONG options );
NTSTATUS (WINAPI *NtFlushBuffersFile)( HANDLE handle, IO_STATUS_BLOCK *io );
NTSTATUS (WINAPI *NtFlushVirtualMemory)( HANDLE process, LPCVOID *addr_ptr,
SIZE_T *size_ptr, ULONG unknown );
NTSTATUS (WINAPI *NtFreeVirtualMemory)( HANDLE process, PVOID *addr_ptr,
SIZE_T *size_ptr, ULONG type );
NTSTATUS (WINAPI *NtFsControlFile)( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc,
void *apc_context, IO_STATUS_BLOCK *io, ULONG code,
void *in_buffer, ULONG in_size,
void *out_buffer, ULONG out_size );
NTSTATUS (WINAPI *NtGetContextThread)( HANDLE handle, CONTEXT *context );
NTSTATUS (WINAPI *NtGetWriteWatch)( HANDLE process, ULONG flags, PVOID base, SIZE_T size,
PVOID *addresses, ULONG_PTR *count, ULONG *granularity );
@ -75,27 +56,12 @@ struct unix_funcs
ULONG_PTR zero_bits, SIZE_T commit_size,
const LARGE_INTEGER *offset_ptr, SIZE_T *size_ptr,
SECTION_INHERIT inherit, ULONG alloc_type, ULONG protect );
NTSTATUS (WINAPI *NtNotifyChangeDirectoryFile)( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc,
void *apc_context, IO_STATUS_BLOCK *iosb,
void *buffer, ULONG buffer_size,
ULONG filter, BOOLEAN subtree );
NTSTATUS (WINAPI *NtOpenSection)( HANDLE *handle, ACCESS_MASK access,
const OBJECT_ATTRIBUTES *attr );
NTSTATUS (WINAPI *NtPowerInformation)( POWER_INFORMATION_LEVEL level, void *input, ULONG in_size,
void *output, ULONG out_size );
NTSTATUS (WINAPI *NtProtectVirtualMemory)( HANDLE process, PVOID *addr_ptr, SIZE_T *size_ptr,
ULONG new_prot, ULONG *old_prot );
NTSTATUS (WINAPI *NtQueryAttributesFile)( const OBJECT_ATTRIBUTES *attr,
FILE_BASIC_INFORMATION *info );
NTSTATUS (WINAPI *NtQueryDirectoryFile)( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc_routine,
void *apc_context, IO_STATUS_BLOCK *io, void *buffer,
ULONG length, FILE_INFORMATION_CLASS info_class,
BOOLEAN single_entry, UNICODE_STRING *mask,
BOOLEAN restart_scan );
NTSTATUS (WINAPI *NtQueryFullAttributesFile)( const OBJECT_ATTRIBUTES *attr,
FILE_NETWORK_OPEN_INFORMATION *info );
NTSTATUS (WINAPI *NtQueryInformationFile)( HANDLE hFile, IO_STATUS_BLOCK *io,
void *ptr, LONG len, FILE_INFORMATION_CLASS class );
NTSTATUS (WINAPI *NtQueryObject)( HANDLE handle, OBJECT_INFORMATION_CLASS info_class,
void *ptr, ULONG len, ULONG *used_len );
NTSTATUS (WINAPI *NtQueryPerformanceCounter)( LARGE_INTEGER *counter, LARGE_INTEGER *frequency );
@ -110,36 +76,15 @@ struct unix_funcs
NTSTATUS (WINAPI *NtQueryVirtualMemory)( HANDLE process, LPCVOID addr,
MEMORY_INFORMATION_CLASS info_class,
PVOID buffer, SIZE_T len, SIZE_T *res_len );
NTSTATUS (WINAPI *NtQueryVolumeInformationFile)( HANDLE handle, IO_STATUS_BLOCK *io,
void *buffer, ULONG length,
FS_INFORMATION_CLASS info_class );
NTSTATUS (WINAPI *NtReadFile)( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc_user,
IO_STATUS_BLOCK *io, void *buffer, ULONG length,
LARGE_INTEGER *offset, ULONG *key );
NTSTATUS (WINAPI *NtReadFileScatter)( HANDLE file, HANDLE event, PIO_APC_ROUTINE apc,
void *apc_user, IO_STATUS_BLOCK *io,
FILE_SEGMENT_ELEMENT *segments, ULONG length,
LARGE_INTEGER *offset, ULONG *key );
NTSTATUS (WINAPI *NtReadVirtualMemory)( HANDLE process, const void *addr, void *buffer,
SIZE_T size, SIZE_T *bytes_read );
NTSTATUS (WINAPI *NtResetWriteWatch)( HANDLE process, PVOID base, SIZE_T size );
NTSTATUS (WINAPI *NtSetInformationFile)( HANDLE handle, IO_STATUS_BLOCK *io,
void *ptr, ULONG len, FILE_INFORMATION_CLASS class );
NTSTATUS (WINAPI *NtSetInformationObject)( HANDLE handle, OBJECT_INFORMATION_CLASS info_class,
void *ptr, ULONG len );
NTSTATUS (WINAPI *NtSetSystemTime)( const LARGE_INTEGER *new, LARGE_INTEGER *old );
NTSTATUS (WINAPI *NtSetVolumeInformationFile)( HANDLE handle, IO_STATUS_BLOCK *io, void *info,
ULONG length, FS_INFORMATION_CLASS class );
NTSTATUS (WINAPI *NtUnlockVirtualMemory)( HANDLE process, PVOID *addr,
SIZE_T *size, ULONG unknown );
NTSTATUS (WINAPI *NtUnmapViewOfSection)( HANDLE process, PVOID addr );
NTSTATUS (WINAPI *NtWriteFile)( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc_user,
IO_STATUS_BLOCK *io, const void *buffer, ULONG length,
LARGE_INTEGER *offset, ULONG *key );
NTSTATUS (WINAPI *NtWriteFileGather)( HANDLE file, HANDLE event, PIO_APC_ROUTINE apc,
void *apc_user, IO_STATUS_BLOCK *io,
FILE_SEGMENT_ELEMENT *segments, ULONG length,
LARGE_INTEGER *offset, ULONG *key );
NTSTATUS (WINAPI *NtWriteVirtualMemory)( HANDLE process, void *addr, const void *buffer,
SIZE_T size, SIZE_T *bytes_written );