2020-05-14 15:17:06 +02:00
|
|
|
/*
|
|
|
|
* Ntdll Unix interface
|
|
|
|
*
|
|
|
|
* Copyright (C) 2020 Alexandre Julliard
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __NTDLL_UNIXLIB_H
|
|
|
|
#define __NTDLL_UNIXLIB_H
|
|
|
|
|
2020-05-29 14:17:55 +02:00
|
|
|
#include "wine/server.h"
|
2020-05-17 11:07:02 +02:00
|
|
|
#include "wine/debug.h"
|
|
|
|
|
2020-06-02 17:08:59 +02:00
|
|
|
struct msghdr;
|
2020-06-25 10:32:47 +02:00
|
|
|
struct _DISPATCHER_CONTEXT;
|
2020-06-01 12:52:05 +02:00
|
|
|
|
2020-05-14 15:17:06 +02:00
|
|
|
/* increment this when you change the function table */
|
2020-06-29 12:10:00 +02:00
|
|
|
#define NTDLL_UNIXLIB_VERSION 67
|
2020-05-14 15:17:06 +02:00
|
|
|
|
|
|
|
struct unix_funcs
|
|
|
|
{
|
2020-05-30 14:21:09 +02:00
|
|
|
/* Nt* functions */
|
2020-06-09 12:34:37 +02:00
|
|
|
NTSTATUS (WINAPI *NtAlertResumeThread)( HANDLE handle, ULONG *count );
|
|
|
|
NTSTATUS (WINAPI *NtAlertThread)( HANDLE handle );
|
2020-06-02 17:08:59 +02:00
|
|
|
NTSTATUS (WINAPI *NtAllocateVirtualMemory)( HANDLE process, PVOID *ret, ULONG_PTR zero_bits,
|
|
|
|
SIZE_T *size_ptr, ULONG type, ULONG protect );
|
|
|
|
NTSTATUS (WINAPI *NtAreMappedFilesTheSame)(PVOID addr1, PVOID addr2);
|
2020-06-13 13:21:26 +02:00
|
|
|
NTSTATUS (WINAPI *NtAssignProcessToJobObject)( HANDLE job, HANDLE process );
|
2020-06-04 21:21:33 +02:00
|
|
|
NTSTATUS (WINAPI *NtCancelTimer)( HANDLE handle, BOOLEAN *state );
|
2020-06-04 20:34:58 +02:00
|
|
|
NTSTATUS (WINAPI *NtClearEvent)( HANDLE handle );
|
2020-05-30 14:21:09 +02:00
|
|
|
NTSTATUS (WINAPI *NtClose)( HANDLE handle );
|
2020-06-06 15:16:38 +02:00
|
|
|
NTSTATUS (WINAPI *NtContinue)( CONTEXT *context, BOOLEAN alertable );
|
2020-06-04 20:34:58 +02:00
|
|
|
NTSTATUS (WINAPI *NtCreateEvent)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
const OBJECT_ATTRIBUTES *attr, EVENT_TYPE type, BOOLEAN state );
|
2020-06-12 17:09:10 +02:00
|
|
|
NTSTATUS (WINAPI *NtCreateFile)( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr,
|
|
|
|
IO_STATUS_BLOCK *io, LARGE_INTEGER *alloc_size,
|
|
|
|
ULONG attributes, ULONG sharing, ULONG disposition,
|
|
|
|
ULONG options, void *ea_buffer, ULONG ea_length );
|
2020-06-13 11:56:30 +02:00
|
|
|
NTSTATUS (WINAPI *NtCreateIoCompletion)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
OBJECT_ATTRIBUTES *attr, ULONG threads );
|
2020-06-13 13:21:26 +02:00
|
|
|
NTSTATUS (WINAPI *NtCreateJobObject)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
const OBJECT_ATTRIBUTES *attr );
|
2020-06-04 21:27:22 +02:00
|
|
|
NTSTATUS (WINAPI *NtCreateKeyedEvent)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
const OBJECT_ATTRIBUTES *attr, ULONG flags );
|
2020-06-12 17:09:10 +02:00
|
|
|
NTSTATUS (WINAPI *NtCreateMailslotFile)( HANDLE *handle, ULONG access, OBJECT_ATTRIBUTES *attr,
|
|
|
|
IO_STATUS_BLOCK *io, ULONG options, ULONG quota,
|
|
|
|
ULONG msg_size, LARGE_INTEGER *timeout );
|
2020-06-04 21:10:17 +02:00
|
|
|
NTSTATUS (WINAPI *NtCreateMutant)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
const OBJECT_ATTRIBUTES *attr, BOOLEAN owned );
|
2020-06-12 17:09:10 +02:00
|
|
|
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 );
|
2020-06-04 21:34:28 +02:00
|
|
|
NTSTATUS (WINAPI *NtCreateSection)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
const OBJECT_ATTRIBUTES *attr, const LARGE_INTEGER *size,
|
|
|
|
ULONG protect, ULONG sec_flags, HANDLE file );
|
2020-06-04 20:19:37 +02:00
|
|
|
NTSTATUS (WINAPI *NtCreateSemaphore)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
const OBJECT_ATTRIBUTES *attr, LONG initial, LONG max );
|
2020-06-05 16:37:49 +02:00
|
|
|
NTSTATUS (WINAPI *NtCreateThreadEx)( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr,
|
|
|
|
HANDLE process, PRTL_THREAD_START_ROUTINE start, void *param,
|
|
|
|
ULONG flags, SIZE_T zero_bits, SIZE_T stack_commit,
|
|
|
|
SIZE_T stack_reserve, PS_ATTRIBUTE_LIST *attr_list );
|
2020-06-04 21:21:33 +02:00
|
|
|
NTSTATUS (WINAPI *NtCreateTimer)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
const OBJECT_ATTRIBUTES *attr, TIMER_TYPE type );
|
2020-06-16 11:34:48 +02:00
|
|
|
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 );
|
2020-06-01 12:52:05 +02:00
|
|
|
TEB * (WINAPI *NtCurrentTeb)(void);
|
2020-06-04 20:06:53 +02:00
|
|
|
NTSTATUS (WINAPI *NtDelayExecution)( BOOLEAN alertable, const LARGE_INTEGER *timeout );
|
2020-06-12 17:09:10 +02:00
|
|
|
NTSTATUS (WINAPI *NtDeleteFile)( OBJECT_ATTRIBUTES *attr );
|
2020-06-16 12:02:35 +02:00
|
|
|
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 );
|
2020-05-30 14:21:09 +02:00
|
|
|
NTSTATUS (WINAPI *NtDuplicateObject)( HANDLE source_process, HANDLE source,
|
|
|
|
HANDLE dest_process, HANDLE *dest,
|
|
|
|
ACCESS_MASK access, ULONG attributes, ULONG options );
|
2020-06-16 12:02:35 +02:00
|
|
|
NTSTATUS (WINAPI *NtFlushBuffersFile)( HANDLE handle, IO_STATUS_BLOCK *io );
|
2020-06-18 09:05:30 +02:00
|
|
|
NTSTATUS (WINAPI *NtFlushInstructionCache)( HANDLE handle, const void *addr, SIZE_T size );
|
|
|
|
void (WINAPI *NtFlushProcessWriteBuffers)(void);
|
2020-06-02 17:08:59 +02:00
|
|
|
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 );
|
2020-06-16 12:02:35 +02:00
|
|
|
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 );
|
2020-06-02 14:05:42 +02:00
|
|
|
NTSTATUS (WINAPI *NtGetContextThread)( HANDLE handle, CONTEXT *context );
|
2020-06-18 12:37:50 +02:00
|
|
|
ULONG (WINAPI *NtGetCurrentProcessorNumber)(void);
|
2020-06-02 17:08:59 +02:00
|
|
|
NTSTATUS (WINAPI *NtGetWriteWatch)( HANDLE process, ULONG flags, PVOID base, SIZE_T size,
|
|
|
|
PVOID *addresses, ULONG_PTR *count, ULONG *granularity );
|
2020-06-13 13:21:26 +02:00
|
|
|
NTSTATUS (WINAPI *NtIsProcessInJob)( HANDLE process, HANDLE job );
|
2020-06-02 17:08:59 +02:00
|
|
|
NTSTATUS (WINAPI *NtLockVirtualMemory)( HANDLE process, PVOID *addr, SIZE_T *size, ULONG unknown );
|
|
|
|
NTSTATUS (WINAPI *NtMapViewOfSection)( HANDLE handle, HANDLE process, PVOID *addr_ptr,
|
|
|
|
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 );
|
2020-06-18 15:08:02 +02:00
|
|
|
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 );
|
2020-06-04 20:34:58 +02:00
|
|
|
NTSTATUS (WINAPI *NtOpenEvent)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
const OBJECT_ATTRIBUTES *attr );
|
2020-06-12 17:09:10 +02:00
|
|
|
NTSTATUS (WINAPI *NtOpenFile)( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr,
|
|
|
|
IO_STATUS_BLOCK *io, ULONG sharing, ULONG options );
|
2020-06-13 11:56:30 +02:00
|
|
|
NTSTATUS (WINAPI *NtOpenIoCompletion)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
const OBJECT_ATTRIBUTES *attr );
|
2020-06-13 13:21:26 +02:00
|
|
|
NTSTATUS (WINAPI *NtOpenJobObject)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
const OBJECT_ATTRIBUTES *attr );
|
2020-06-04 21:27:22 +02:00
|
|
|
NTSTATUS (WINAPI *NtOpenKeyedEvent)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
const OBJECT_ATTRIBUTES *attr );
|
2020-06-04 21:10:17 +02:00
|
|
|
NTSTATUS (WINAPI *NtOpenMutant)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
const OBJECT_ATTRIBUTES *attr );
|
2020-06-18 09:05:30 +02:00
|
|
|
NTSTATUS (WINAPI *NtOpenProcess)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
const OBJECT_ATTRIBUTES *attr, const CLIENT_ID *id );
|
2020-06-04 21:34:28 +02:00
|
|
|
NTSTATUS (WINAPI *NtOpenSection)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
const OBJECT_ATTRIBUTES *attr );
|
2020-06-04 20:19:37 +02:00
|
|
|
NTSTATUS (WINAPI *NtOpenSemaphore)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
const OBJECT_ATTRIBUTES *attr );
|
2020-06-09 12:34:37 +02:00
|
|
|
NTSTATUS (WINAPI *NtOpenThread)( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr, const CLIENT_ID *id );
|
2020-06-04 21:21:33 +02:00
|
|
|
NTSTATUS (WINAPI *NtOpenTimer)( HANDLE *handle, ACCESS_MASK access,
|
|
|
|
const OBJECT_ATTRIBUTES *attr );
|
2020-06-23 14:29:31 +02:00
|
|
|
NTSTATUS (WINAPI *NtPowerInformation)( POWER_INFORMATION_LEVEL level, void *input, ULONG in_size,
|
|
|
|
void *output, ULONG out_size );
|
2020-06-02 17:08:59 +02:00
|
|
|
NTSTATUS (WINAPI *NtProtectVirtualMemory)( HANDLE process, PVOID *addr_ptr, SIZE_T *size_ptr,
|
|
|
|
ULONG new_prot, ULONG *old_prot );
|
2020-06-04 20:34:58 +02:00
|
|
|
NTSTATUS (WINAPI *NtPulseEvent)( HANDLE handle, LONG *prev_state );
|
2020-06-12 17:09:10 +02:00
|
|
|
NTSTATUS (WINAPI *NtQueryAttributesFile)( const OBJECT_ATTRIBUTES *attr,
|
|
|
|
FILE_BASIC_INFORMATION *info );
|
2020-06-12 14:20:16 +02:00
|
|
|
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 );
|
2020-06-04 20:34:58 +02:00
|
|
|
NTSTATUS (WINAPI *NtQueryEvent)( HANDLE handle, EVENT_INFORMATION_CLASS class,
|
|
|
|
void *info, ULONG len, ULONG *ret_len );
|
2020-06-12 17:09:10 +02:00
|
|
|
NTSTATUS (WINAPI *NtQueryFullAttributesFile)( const OBJECT_ATTRIBUTES *attr,
|
|
|
|
FILE_NETWORK_OPEN_INFORMATION *info );
|
2020-06-13 15:32:41 +02:00
|
|
|
NTSTATUS (WINAPI *NtQueryInformationFile)( HANDLE hFile, IO_STATUS_BLOCK *io,
|
|
|
|
void *ptr, LONG len, FILE_INFORMATION_CLASS class );
|
2020-06-13 13:21:26 +02:00
|
|
|
NTSTATUS (WINAPI *NtQueryInformationJobObject)( HANDLE handle, JOBOBJECTINFOCLASS class,
|
|
|
|
void *info, ULONG len, ULONG *ret_len );
|
2020-06-16 11:35:55 +02:00
|
|
|
NTSTATUS (WINAPI *NtQueryInformationProcess)( HANDLE handle, PROCESSINFOCLASS class, void *info,
|
|
|
|
ULONG size, ULONG *ret_len );
|
2020-06-18 12:37:50 +02:00
|
|
|
NTSTATUS (WINAPI *NtQueryInformationThread)( HANDLE handle, THREADINFOCLASS class,
|
|
|
|
void *data, ULONG length, ULONG *ret_len );
|
2020-06-13 11:56:30 +02:00
|
|
|
NTSTATUS (WINAPI *NtQueryIoCompletion)( HANDLE handle, IO_COMPLETION_INFORMATION_CLASS class,
|
|
|
|
void *buffer, ULONG len, ULONG *ret_len );
|
2020-06-04 21:10:17 +02:00
|
|
|
NTSTATUS (WINAPI *NtQueryMutant)( HANDLE handle, MUTANT_INFORMATION_CLASS class,
|
|
|
|
void *info, ULONG len, ULONG *ret_len );
|
2020-06-11 10:07:09 +02:00
|
|
|
NTSTATUS (WINAPI *NtQueryPerformanceCounter)( LARGE_INTEGER *counter, LARGE_INTEGER *frequency );
|
2020-06-02 17:08:59 +02:00
|
|
|
NTSTATUS (WINAPI *NtQuerySection)( HANDLE handle, SECTION_INFORMATION_CLASS class,
|
|
|
|
void *ptr, SIZE_T size, SIZE_T *ret_size );
|
2020-06-04 20:19:37 +02:00
|
|
|
NTSTATUS (WINAPI *NtQuerySemaphore)( HANDLE handle, SEMAPHORE_INFORMATION_CLASS class,
|
|
|
|
void *info, ULONG len, ULONG *ret_len );
|
2020-06-23 14:29:31 +02:00
|
|
|
NTSTATUS (WINAPI *NtQuerySystemInformation)( SYSTEM_INFORMATION_CLASS class,
|
|
|
|
void *info, ULONG size, ULONG *ret_size );
|
|
|
|
NTSTATUS (WINAPI *NtQuerySystemInformationEx)( SYSTEM_INFORMATION_CLASS class,
|
|
|
|
void *query, ULONG query_len,
|
|
|
|
void *info, ULONG size, ULONG *ret_size );
|
2020-06-11 10:07:09 +02:00
|
|
|
NTSTATUS (WINAPI *NtQuerySystemTime)( LARGE_INTEGER *time );
|
2020-06-04 21:21:33 +02:00
|
|
|
NTSTATUS (WINAPI *NtQueryTimer)( HANDLE handle, TIMER_INFORMATION_CLASS class,
|
|
|
|
void *info, ULONG len, ULONG *ret_len );
|
2020-06-02 17:08:59 +02:00
|
|
|
NTSTATUS (WINAPI *NtQueryVirtualMemory)( HANDLE process, LPCVOID addr,
|
|
|
|
MEMORY_INFORMATION_CLASS info_class,
|
|
|
|
PVOID buffer, SIZE_T len, SIZE_T *res_len );
|
2020-06-18 14:45:32 +02:00
|
|
|
NTSTATUS (WINAPI *NtQueryVolumeInformationFile)( HANDLE handle, IO_STATUS_BLOCK *io,
|
|
|
|
void *buffer, ULONG length,
|
|
|
|
FS_INFORMATION_CLASS info_class );
|
2020-06-09 12:34:37 +02:00
|
|
|
NTSTATUS (WINAPI *NtQueueApcThread)( HANDLE handle, PNTAPCFUNC func, ULONG_PTR arg1,
|
|
|
|
ULONG_PTR arg2, ULONG_PTR arg3 );
|
2020-06-06 13:56:19 +02:00
|
|
|
NTSTATUS (WINAPI *NtRaiseException)( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance );
|
2020-06-16 12:02:00 +02:00
|
|
|
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 );
|
2020-06-02 17:08:59 +02:00
|
|
|
NTSTATUS (WINAPI *NtReadVirtualMemory)( HANDLE process, const void *addr, void *buffer,
|
|
|
|
SIZE_T size, SIZE_T *bytes_read );
|
2020-06-04 21:27:22 +02:00
|
|
|
NTSTATUS (WINAPI *NtReleaseKeyedEvent)( HANDLE handle, const void *key,
|
|
|
|
BOOLEAN alertable, const LARGE_INTEGER *timeout );
|
2020-06-04 21:10:17 +02:00
|
|
|
NTSTATUS (WINAPI *NtReleaseMutant)( HANDLE handle, LONG *prev_count );
|
2020-06-04 20:19:37 +02:00
|
|
|
NTSTATUS (WINAPI *NtReleaseSemaphore)( HANDLE handle, ULONG count, ULONG *previous );
|
2020-06-13 11:56:30 +02:00
|
|
|
NTSTATUS (WINAPI *NtRemoveIoCompletion)( HANDLE handle, ULONG_PTR *key, ULONG_PTR *value,
|
|
|
|
IO_STATUS_BLOCK *io, LARGE_INTEGER *timeout );
|
|
|
|
NTSTATUS (WINAPI *NtRemoveIoCompletionEx)( HANDLE handle, FILE_IO_COMPLETION_INFORMATION *info,
|
|
|
|
ULONG count, ULONG *written,
|
|
|
|
LARGE_INTEGER *timeout, BOOLEAN alertable );
|
2020-06-04 20:34:58 +02:00
|
|
|
NTSTATUS (WINAPI *NtResetEvent)( HANDLE handle, LONG *prev_state );
|
2020-06-02 17:08:59 +02:00
|
|
|
NTSTATUS (WINAPI *NtResetWriteWatch)( HANDLE process, PVOID base, SIZE_T size );
|
2020-06-18 09:05:30 +02:00
|
|
|
NTSTATUS (WINAPI *NtResumeProcess)( HANDLE handle );
|
2020-06-09 12:34:37 +02:00
|
|
|
NTSTATUS (WINAPI *NtResumeThread)( HANDLE handle, ULONG *count );
|
2020-06-02 13:11:54 +02:00
|
|
|
NTSTATUS (WINAPI *NtSetContextThread)( HANDLE handle, const CONTEXT *context );
|
2020-06-04 20:34:58 +02:00
|
|
|
NTSTATUS (WINAPI *NtSetEvent)( HANDLE handle, LONG *prev_state );
|
2020-06-13 15:32:41 +02:00
|
|
|
NTSTATUS (WINAPI *NtSetInformationFile)( HANDLE handle, IO_STATUS_BLOCK *io,
|
|
|
|
void *ptr, ULONG len, FILE_INFORMATION_CLASS class );
|
2020-06-13 13:21:26 +02:00
|
|
|
NTSTATUS (WINAPI *NtSetInformationJobObject)( HANDLE handle, JOBOBJECTINFOCLASS class,
|
|
|
|
void *info, ULONG len );
|
2020-06-16 11:35:55 +02:00
|
|
|
NTSTATUS (WINAPI *NtSetInformationProcess)( HANDLE handle, PROCESSINFOCLASS class,
|
|
|
|
void *info, ULONG size );
|
2020-06-18 12:37:50 +02:00
|
|
|
NTSTATUS (WINAPI *NtSetInformationThread)( HANDLE handle, THREADINFOCLASS class,
|
|
|
|
const void *data, ULONG length );
|
2020-06-13 11:56:30 +02:00
|
|
|
NTSTATUS (WINAPI *NtSetIoCompletion)( HANDLE handle, ULONG_PTR key, ULONG_PTR value,
|
|
|
|
NTSTATUS status, SIZE_T count );
|
2020-06-01 12:52:05 +02:00
|
|
|
NTSTATUS (WINAPI *NtSetLdtEntries)( ULONG sel1, LDT_ENTRY entry1, ULONG sel2, LDT_ENTRY entry2 );
|
2020-06-11 10:07:09 +02:00
|
|
|
NTSTATUS (WINAPI *NtSetSystemTime)( const LARGE_INTEGER *new, LARGE_INTEGER *old );
|
2020-06-04 21:21:33 +02:00
|
|
|
NTSTATUS (WINAPI *NtSetTimer)( HANDLE handle, const LARGE_INTEGER *when,
|
|
|
|
PTIMER_APC_ROUTINE callback, void *arg,
|
|
|
|
BOOLEAN resume, ULONG period, BOOLEAN *state );
|
2020-06-18 14:45:32 +02:00
|
|
|
NTSTATUS (WINAPI *NtSetVolumeInformationFile)( HANDLE handle, IO_STATUS_BLOCK *io, void *info,
|
|
|
|
ULONG length, FS_INFORMATION_CLASS class );
|
2020-06-04 20:06:53 +02:00
|
|
|
NTSTATUS (WINAPI *NtSignalAndWaitForSingleObject)( HANDLE signal, HANDLE wait,
|
|
|
|
BOOLEAN alertable, const LARGE_INTEGER *timeout );
|
2020-06-18 09:05:30 +02:00
|
|
|
NTSTATUS (WINAPI *NtSuspendProcess)( HANDLE handle );
|
2020-06-09 12:34:37 +02:00
|
|
|
NTSTATUS (WINAPI *NtSuspendThread)( HANDLE handle, ULONG *count );
|
2020-06-13 13:21:26 +02:00
|
|
|
NTSTATUS (WINAPI *NtTerminateJobObject)( HANDLE handle, NTSTATUS status );
|
2020-06-16 11:35:55 +02:00
|
|
|
NTSTATUS (WINAPI *NtTerminateProcess)( HANDLE handle, LONG exit_code );
|
2020-06-09 12:34:37 +02:00
|
|
|
NTSTATUS (WINAPI *NtTerminateThread)( HANDLE handle, LONG exit_code );
|
2020-06-02 17:08:59 +02:00
|
|
|
NTSTATUS (WINAPI *NtUnlockVirtualMemory)( HANDLE process, PVOID *addr,
|
|
|
|
SIZE_T *size, ULONG unknown );
|
|
|
|
NTSTATUS (WINAPI *NtUnmapViewOfSection)( HANDLE process, PVOID addr );
|
2020-06-04 21:27:22 +02:00
|
|
|
NTSTATUS (WINAPI *NtWaitForKeyedEvent)( HANDLE handle, const void *key, BOOLEAN alertable,
|
|
|
|
const LARGE_INTEGER *timeout );
|
2020-06-04 20:06:53 +02:00
|
|
|
NTSTATUS (WINAPI *NtWaitForMultipleObjects)( DWORD count, const HANDLE *handles,
|
|
|
|
BOOLEAN wait_any, BOOLEAN alertable,
|
|
|
|
const LARGE_INTEGER *timeout );
|
|
|
|
NTSTATUS (WINAPI *NtWaitForSingleObject)( HANDLE handle, BOOLEAN alertable,
|
|
|
|
const LARGE_INTEGER *timeout );
|
2020-06-16 12:02:00 +02:00
|
|
|
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 );
|
2020-06-02 17:08:59 +02:00
|
|
|
NTSTATUS (WINAPI *NtWriteVirtualMemory)( HANDLE process, void *addr, const void *buffer,
|
|
|
|
SIZE_T size, SIZE_T *bytes_written );
|
2020-06-04 20:06:53 +02:00
|
|
|
NTSTATUS (WINAPI *NtYieldExecution)(void);
|
2020-05-30 14:21:09 +02:00
|
|
|
|
2020-06-05 16:54:17 +02:00
|
|
|
/* other Win32 API functions */
|
|
|
|
NTSTATUS (WINAPI *DbgUiIssueRemoteBreakin)( HANDLE process );
|
2020-06-25 18:07:38 +02:00
|
|
|
LONGLONG (WINAPI *RtlGetSystemTimePrecise)(void);
|
2020-06-09 12:39:49 +02:00
|
|
|
NTSTATUS (WINAPI *RtlWaitOnAddress)( const void *addr, const void *cmp, SIZE_T size,
|
|
|
|
const LARGE_INTEGER *timeout );
|
|
|
|
void (WINAPI *RtlWakeAddressAll)( const void *addr );
|
|
|
|
void (WINAPI *RtlWakeAddressSingle)( const void *addr );
|
2020-06-05 16:54:17 +02:00
|
|
|
|
2020-06-09 12:35:01 +02:00
|
|
|
/* fast locks */
|
2020-06-09 13:05:58 +02:00
|
|
|
NTSTATUS (CDECL *fast_RtlpWaitForCriticalSection)( RTL_CRITICAL_SECTION *crit, int timeout );
|
|
|
|
NTSTATUS (CDECL *fast_RtlpUnWaitCriticalSection)( RTL_CRITICAL_SECTION *crit );
|
|
|
|
NTSTATUS (CDECL *fast_RtlDeleteCriticalSection)( RTL_CRITICAL_SECTION *crit );
|
2020-06-09 12:35:01 +02:00
|
|
|
NTSTATUS (CDECL *fast_RtlTryAcquireSRWLockExclusive)( RTL_SRWLOCK *lock );
|
|
|
|
NTSTATUS (CDECL *fast_RtlAcquireSRWLockExclusive)( RTL_SRWLOCK *lock );
|
|
|
|
NTSTATUS (CDECL *fast_RtlTryAcquireSRWLockShared)( RTL_SRWLOCK *lock );
|
|
|
|
NTSTATUS (CDECL *fast_RtlAcquireSRWLockShared)( RTL_SRWLOCK *lock );
|
|
|
|
NTSTATUS (CDECL *fast_RtlReleaseSRWLockExclusive)( RTL_SRWLOCK *lock );
|
|
|
|
NTSTATUS (CDECL *fast_RtlReleaseSRWLockShared)( RTL_SRWLOCK *lock );
|
2020-06-09 12:38:37 +02:00
|
|
|
NTSTATUS (CDECL *fast_RtlSleepConditionVariableSRW)( RTL_CONDITION_VARIABLE *variable,
|
|
|
|
RTL_SRWLOCK *lock,
|
|
|
|
const LARGE_INTEGER *timeout, ULONG flags );
|
|
|
|
NTSTATUS (CDECL *fast_RtlSleepConditionVariableCS)( RTL_CONDITION_VARIABLE *variable,
|
|
|
|
RTL_CRITICAL_SECTION *cs,
|
|
|
|
const LARGE_INTEGER *timeout );
|
|
|
|
NTSTATUS (CDECL *fast_RtlWakeConditionVariable)( RTL_CONDITION_VARIABLE *variable, int count );
|
2020-06-09 12:35:01 +02:00
|
|
|
|
2020-06-26 09:12:11 +02:00
|
|
|
/* math functions */
|
|
|
|
double (CDECL *atan)( double d );
|
|
|
|
double (CDECL *ceil)( double d );
|
|
|
|
double (CDECL *cos)( double d );
|
|
|
|
double (CDECL *fabs)( double d );
|
|
|
|
double (CDECL *floor)( double d );
|
|
|
|
double (CDECL *log)( double d );
|
|
|
|
double (CDECL *pow)( double x, double y );
|
|
|
|
double (CDECL *sin)( double d );
|
|
|
|
double (CDECL *sqrt)( double d );
|
|
|
|
double (CDECL *tan)( double d );
|
|
|
|
|
2020-05-17 11:09:30 +02:00
|
|
|
/* environment functions */
|
2020-06-11 10:50:11 +02:00
|
|
|
NTSTATUS (CDECL *get_initial_environment)( WCHAR **wargv[], WCHAR *env, SIZE_T *size );
|
2020-06-24 09:21:48 +02:00
|
|
|
NTSTATUS (CDECL *get_dynamic_environment)( WCHAR *env, SIZE_T *size );
|
2020-06-29 10:39:27 +02:00
|
|
|
void (CDECL *get_initial_console)( HANDLE *handle, HANDLE *std_in,
|
|
|
|
HANDLE *std_out, HANDLE *std_err );
|
2020-06-17 16:19:38 +02:00
|
|
|
void (CDECL *get_initial_directory)( UNICODE_STRING *dir );
|
2020-05-20 14:04:32 +02:00
|
|
|
void (CDECL *get_unix_codepage)( CPTABLEINFO *table );
|
2020-06-11 11:38:16 +02:00
|
|
|
void (CDECL *get_locales)( WCHAR *sys, WCHAR *user );
|
2020-05-17 11:09:30 +02:00
|
|
|
const char * (CDECL *get_version)(void);
|
|
|
|
const char * (CDECL *get_build_id)(void);
|
|
|
|
void (CDECL *get_host_version)( const char **sysname, const char **release );
|
|
|
|
|
2020-05-17 11:04:47 +02:00
|
|
|
/* virtual memory functions */
|
2020-06-02 17:08:59 +02:00
|
|
|
NTSTATUS (CDECL *virtual_map_section)( HANDLE handle, PVOID *addr_ptr, unsigned short zero_bits_64, SIZE_T commit_size,
|
|
|
|
const LARGE_INTEGER *offset_ptr, SIZE_T *size_ptr, ULONG alloc_type,
|
|
|
|
ULONG protect, pe_image_info_t *image_info );
|
|
|
|
NTSTATUS (CDECL *virtual_alloc_thread_stack)( INITIAL_TEB *stack, SIZE_T reserve_size, SIZE_T commit_size, SIZE_T *pthread_size );
|
|
|
|
ssize_t (CDECL *virtual_locked_recvmsg)( int fd, struct msghdr *hdr, int flags );
|
|
|
|
void (CDECL *virtual_release_address_space)(void);
|
|
|
|
void (CDECL *virtual_set_large_address_space)(void);
|
2020-05-17 11:07:02 +02:00
|
|
|
|
2020-06-01 12:52:05 +02:00
|
|
|
/* thread/process functions */
|
2020-06-29 12:10:00 +02:00
|
|
|
TEB * (CDECL *init_threading)( SIZE_T *size );
|
2020-06-01 12:52:05 +02:00
|
|
|
void (CDECL *exit_thread)( int status );
|
|
|
|
void (CDECL *exit_process)( int status );
|
2020-06-18 09:05:30 +02:00
|
|
|
NTSTATUS (CDECL *exec_process)( UNICODE_STRING *path, UNICODE_STRING *cmdline, NTSTATUS status );
|
2020-06-01 12:52:05 +02:00
|
|
|
|
2020-05-29 14:17:55 +02:00
|
|
|
/* server functions */
|
2020-05-29 15:53:42 +02:00
|
|
|
unsigned int (CDECL *server_call)( void *req_ptr );
|
2020-05-29 14:17:55 +02:00
|
|
|
void (CDECL *server_send_fd)( int fd );
|
2020-05-29 15:35:16 +02:00
|
|
|
NTSTATUS (CDECL *server_fd_to_handle)( int fd, unsigned int access, unsigned int attributes,
|
|
|
|
HANDLE *handle );
|
|
|
|
NTSTATUS (CDECL *server_handle_to_fd)( HANDLE handle, unsigned int access, int *unix_fd,
|
|
|
|
unsigned int *options );
|
|
|
|
void (CDECL *server_release_fd)( HANDLE handle, int unix_fd );
|
2020-06-09 12:32:41 +02:00
|
|
|
void (CDECL *server_init_process_done)( void *relay );
|
2020-05-29 14:17:55 +02:00
|
|
|
|
2020-06-12 14:20:16 +02:00
|
|
|
/* file functions */
|
|
|
|
NTSTATUS (CDECL *nt_to_unix_file_name)( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret,
|
|
|
|
UINT disposition, BOOLEAN check_case );
|
2020-06-16 14:17:04 +02:00
|
|
|
NTSTATUS (CDECL *unix_to_nt_file_name)( const ANSI_STRING *name, UNICODE_STRING *nt );
|
2020-06-12 14:20:16 +02:00
|
|
|
void (CDECL *set_show_dot_files)( BOOL enable );
|
|
|
|
|
2020-06-23 19:39:12 +02:00
|
|
|
/* loader functions */
|
|
|
|
NTSTATUS (CDECL *load_so_dll)( UNICODE_STRING *nt_name, void **module );
|
2020-06-23 12:32:43 +02:00
|
|
|
NTSTATUS (CDECL *load_builtin_dll)( const WCHAR *name, void **module,
|
|
|
|
pe_image_info_t *image_info );
|
2020-06-23 19:39:12 +02:00
|
|
|
NTSTATUS (CDECL *unload_builtin_dll)( void *module );
|
|
|
|
void (CDECL *init_builtin_dll)( void *module );
|
2020-06-25 10:32:47 +02:00
|
|
|
NTSTATUS (CDECL *unwind_builtin_dll)( ULONG type, struct _DISPATCHER_CONTEXT *dispatch,
|
|
|
|
CONTEXT *context );
|
2020-06-23 19:39:12 +02:00
|
|
|
|
2020-05-17 11:07:02 +02:00
|
|
|
/* debugging functions */
|
|
|
|
unsigned char (CDECL *dbg_get_channel_flags)( struct __wine_debug_channel *channel );
|
|
|
|
const char * (CDECL *dbg_strdup)( const char *str );
|
|
|
|
int (CDECL *dbg_output)( const char *str );
|
|
|
|
int (CDECL *dbg_header)( enum __wine_debug_class cls, struct __wine_debug_channel *channel,
|
|
|
|
const char *function );
|
2020-05-14 15:17:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __NTDLL_UNIXLIB_H */
|