ntdll: Stub and document IoCompletion APIs.
This commit is contained in:
parent
72bc7429e4
commit
ad5f94d0f7
|
@ -207,7 +207,7 @@
|
|||
@ stdcall NtOpenEvent(long long long)
|
||||
@ stub NtOpenEventPair
|
||||
@ stdcall NtOpenFile(ptr long ptr ptr long long)
|
||||
@ stub NtOpenIoCompletion
|
||||
@ stdcall NtOpenIoCompletion(ptr long ptr)
|
||||
# @ stub NtOpenJobObject
|
||||
@ stdcall NtOpenKey(ptr long ptr)
|
||||
# @ stub NtOpenKeyedEvent
|
||||
|
@ -250,7 +250,7 @@
|
|||
@ stdcall NtQueryInformationToken(long long ptr long ptr)
|
||||
@ stdcall NtQueryInstallUILanguage(ptr)
|
||||
@ stub NtQueryIntervalProfile
|
||||
@ stub NtQueryIoCompletion
|
||||
@ stdcall NtQueryIoCompletion(long long ptr long ptr)
|
||||
@ stdcall NtQueryKey (long long ptr long ptr)
|
||||
@ stdcall NtQueryMultipleValueKey(long ptr long ptr long ptr)
|
||||
@ stdcall NtQueryMutant(long long ptr long ptr)
|
||||
|
@ -968,7 +968,7 @@
|
|||
@ stdcall ZwCreateEvent(long long long long long) NtCreateEvent
|
||||
@ stub ZwCreateEventPair
|
||||
@ stdcall ZwCreateFile(ptr long ptr ptr long long long ptr long long ptr) NtCreateFile
|
||||
@ stub ZwCreateIoCompletion
|
||||
@ stdcall ZwCreateIoCompletion(ptr long ptr long) NtCreateIoCompletion
|
||||
# @ stub ZwCreateJobObject
|
||||
# @ stub ZwCreateJobSet
|
||||
@ stdcall ZwCreateKey(ptr long ptr long ptr long long) NtCreateKey
|
||||
|
@ -1050,7 +1050,7 @@
|
|||
@ stdcall ZwOpenEvent(long long long) NtOpenEvent
|
||||
@ stub ZwOpenEventPair
|
||||
@ stdcall ZwOpenFile(ptr long ptr ptr long long) NtOpenFile
|
||||
@ stub ZwOpenIoCompletion
|
||||
@ stdcall ZwOpenIoCompletion(ptr long ptr) NtOpenIoCompletion
|
||||
# @ stub ZwOpenJobObject
|
||||
@ stdcall ZwOpenKey(ptr long ptr) NtOpenKey
|
||||
# @ stub ZwOpenKeyedEvent
|
||||
|
@ -1093,7 +1093,7 @@
|
|||
@ stdcall ZwQueryInformationToken(long long ptr long ptr) NtQueryInformationToken
|
||||
@ stdcall ZwQueryInstallUILanguage(ptr) NtQueryInstallUILanguage
|
||||
@ stub ZwQueryIntervalProfile
|
||||
@ stub ZwQueryIoCompletion
|
||||
@ stdcall ZwQueryIoCompletion(long long ptr long ptr) NtQueryIoCompletion
|
||||
@ stdcall ZwQueryKey(long long ptr long ptr) NtQueryKey
|
||||
# @ stub ZwQueryMultipleValueKey
|
||||
@ stdcall ZwQueryMutant(long long ptr long ptr) NtQueryMutant
|
||||
|
@ -1128,7 +1128,7 @@
|
|||
@ stdcall ZwReleaseMutant(long ptr) NtReleaseMutant
|
||||
@ stub ZwReleaseProcessMutant
|
||||
@ stdcall ZwReleaseSemaphore(long long ptr) NtReleaseSemaphore
|
||||
@ stub ZwRemoveIoCompletion
|
||||
@ stdcall ZwRemoveIoCompletion(ptr ptr ptr ptr ptr) NtRemoveIoCompletion
|
||||
# @ stub ZwRemoveProcessDebug
|
||||
# @ stub ZwRenameKey
|
||||
@ stdcall ZwReplaceKey(ptr long ptr) NtReplaceKey
|
||||
|
@ -1171,7 +1171,7 @@
|
|||
@ stdcall ZwSetInformationThread(long long ptr long) NtSetInformationThread
|
||||
@ stdcall ZwSetInformationToken(long long ptr long) NtSetInformationToken
|
||||
@ stdcall ZwSetIntervalProfile(long long) NtSetIntervalProfile
|
||||
@ stub ZwSetIoCompletion
|
||||
@ stdcall ZwSetIoCompletion(ptr long ptr long long) NtSetIoCompletion
|
||||
@ stub ZwSetLdtEntries
|
||||
@ stub ZwSetLowEventPair
|
||||
@ stub ZwSetLowWaitHighEventPair
|
||||
|
|
|
@ -1010,7 +1010,17 @@ NTSTATUS WINAPI NtDelayExecution( BOOLEAN alertable, const LARGE_INTEGER *timeou
|
|||
}
|
||||
|
||||
/******************************************************************
|
||||
* NtCreateIoCompletion (NTDLL.@)
|
||||
* NtCreateIoCompletion (NTDLL.@)
|
||||
* ZwCreateIoCompletion (NTDLL.@)
|
||||
*
|
||||
* Creates I/O completion object.
|
||||
*
|
||||
* PARAMS
|
||||
* CompletionPort [O] created completion object handle will be placed there
|
||||
* DesiredAccess [I] desired access to a handle (combination of IO_COMPLETION_*)
|
||||
* ObjectAttributes [I] completion object attributes
|
||||
* NumberOfConcurrentThreads [I] desired number of concurrent active worker threads
|
||||
*
|
||||
*/
|
||||
NTSTATUS WINAPI NtCreateIoCompletion( PHANDLE CompletionPort, ACCESS_MASK DesiredAccess,
|
||||
POBJECT_ATTRIBUTES ObjectAttributes, ULONG NumberOfConcurrentThreads )
|
||||
|
@ -1020,20 +1030,88 @@ NTSTATUS WINAPI NtCreateIoCompletion( PHANDLE CompletionPort, ACCESS_MASK Desire
|
|||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* NtSetIoCompletion (NTDLL.@)
|
||||
* ZwSetIoCompletion (NTDLL.@)
|
||||
*
|
||||
* Inserts completion message into queue
|
||||
*
|
||||
* PARAMS
|
||||
* CompletionPort [I] HANDLE to completion object
|
||||
* CompletionKey [I] completion key
|
||||
* CompletionValue [I] completion value (usually pointer to OVERLAPPED)
|
||||
* Status [I] operation status
|
||||
* NumberOfBytesTransferred [I] number of bytes transferred
|
||||
*/
|
||||
NTSTATUS WINAPI NtSetIoCompletion( HANDLE CompletionPort, ULONG_PTR CompletionKey,
|
||||
PIO_STATUS_BLOCK iosb, ULONG NumberOfBytesTransferred,
|
||||
ULONG_PTR CompletionValue, NTSTATUS Status,
|
||||
ULONG NumberOfBytesToTransfer )
|
||||
{
|
||||
FIXME("(%p, %lx, %p, %d, %d)\n", CompletionPort, CompletionKey,
|
||||
iosb, NumberOfBytesTransferred, NumberOfBytesToTransfer);
|
||||
FIXME("(%p, %lx, %lx, %x, %d)\n", CompletionPort, CompletionKey,
|
||||
CompletionValue, Status, NumberOfBytesToTransfer);
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* NtRemoveIoCompletion (NTDLL.@)
|
||||
* ZwRemoveIoCompletion (NTDLL.@)
|
||||
*
|
||||
* (Wait for and) retrieve first completion message from completion object's queue
|
||||
*
|
||||
* PARAMS
|
||||
* CompletionPort [I] HANDLE to I/O completion object
|
||||
* CompletionKey [O] completion key
|
||||
* CompletionValue [O] Completion value given in NtSetIoCompletion or in async operation
|
||||
* iosb [O] IO_STATUS_BLOCK of completed asynchronous operation
|
||||
* WaitTime [I] optional wait time in NTDLL format
|
||||
*
|
||||
*/
|
||||
NTSTATUS WINAPI NtRemoveIoCompletion( HANDLE CompletionPort, PULONG_PTR CompletionKey,
|
||||
PIO_STATUS_BLOCK iosb, PULONG OperationStatus,
|
||||
PULONG_PTR CompletionValue, PIO_STATUS_BLOCK iosb,
|
||||
PLARGE_INTEGER WaitTime )
|
||||
{
|
||||
FIXME("(%p, %p, %p, %p, %p)\n", CompletionPort, CompletionKey,
|
||||
iosb, OperationStatus, WaitTime);
|
||||
CompletionValue, iosb, WaitTime);
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* NtOpenIoCompletion (NTDLL.@)
|
||||
* ZwOpenIoCompletion (NTDLL.@)
|
||||
*
|
||||
* Opens I/O completion object
|
||||
*
|
||||
* PARAMS
|
||||
* CompletionPort [O] completion object handle will be placed there
|
||||
* DesiredAccess [I] desired access to a handle (combination of IO_COMPLETION_*)
|
||||
* ObjectAttributes [I] completion object name
|
||||
*
|
||||
*/
|
||||
NTSTATUS WINAPI NtOpenIoCompletion( PHANDLE CompletionPort, ACCESS_MASK DesiredAccess,
|
||||
POBJECT_ATTRIBUTES ObjectAttributes )
|
||||
{
|
||||
FIXME("(%p, 0x%x, %p)\n", CompletionPort, DesiredAccess, ObjectAttributes);
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* NtQueryIoCompletion (NTDLL.@)
|
||||
* ZwQueryIoCompletion (NTDLL.@)
|
||||
*
|
||||
* Requests information about given I/O completion object
|
||||
*
|
||||
* PARAMS
|
||||
* CompletionPort [I] HANDLE to completion port to request
|
||||
* InformationClass [I] information class
|
||||
* CompletionInformation [O] user-provided buffer for data
|
||||
* BufferLength [I] buffer length
|
||||
* RequiredLength [O] required buffer length
|
||||
*
|
||||
*/
|
||||
NTSTATUS WINAPI NtQueryIoCompletion( HANDLE CompletionPort, IO_COMPLETION_INFORMATION_CLASS InformationClass,
|
||||
PVOID CompletionInformation, ULONG BufferLength, PULONG RequiredLength )
|
||||
{
|
||||
FIXME("(%p, %d, %p, 0x%x, %p)\n", CompletionPort, InformationClass, CompletionInformation,
|
||||
BufferLength, RequiredLength);
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
|
|
@ -1685,6 +1685,15 @@ typedef enum _IO_COMPLETION_INFORMATION_CLASS {
|
|||
IoCompletionBasicInformation
|
||||
} IO_COMPLETION_INFORMATION_CLASS, *PIO_COMPLETION_INFORMATION_CLASS;
|
||||
|
||||
typedef struct _FILE_COMPLETION_INFORMATION {
|
||||
HANDLE CompletionPort;
|
||||
ULONG_PTR CompletionKey;
|
||||
} FILE_COMPLETION_INFORMATION, *PFILE_COMPLETION_INFORMATION;
|
||||
|
||||
#define IO_COMPLETION_QUERY_STATE 0x0001
|
||||
#define IO_COMPLETION_MODIFY_STATE 0x0002
|
||||
#define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
|
||||
|
||||
typedef enum _HARDERROR_RESPONSE_OPTION {
|
||||
OptionAbortRetryIgnore,
|
||||
OptionOk,
|
||||
|
@ -1883,7 +1892,7 @@ 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_PTR,PIO_STATUS_BLOCK,PULONG,PLARGE_INTEGER);
|
||||
NTSTATUS WINAPI NtRemoveIoCompletion(HANDLE,PULONG_PTR,PULONG_PTR,PIO_STATUS_BLOCK,PLARGE_INTEGER);
|
||||
NTSTATUS WINAPI NtReplaceKey(POBJECT_ATTRIBUTES,HANDLE,POBJECT_ATTRIBUTES);
|
||||
NTSTATUS WINAPI NtReplyPort(HANDLE,PLPC_MESSAGE);
|
||||
NTSTATUS WINAPI NtReplyWaitReceivePort(HANDLE,PULONG,PLPC_MESSAGE,PLPC_MESSAGE);
|
||||
|
@ -1912,7 +1921,7 @@ NTSTATUS WINAPI NtSetInformationProcess(HANDLE,PROCESS_INFORMATION_CLASS,PVOID,
|
|||
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_PTR,PIO_STATUS_BLOCK,ULONG,ULONG);
|
||||
NTSTATUS WINAPI NtSetIoCompletion(HANDLE,ULONG_PTR,ULONG_PTR,NTSTATUS,ULONG);
|
||||
NTSTATUS WINAPI NtSetLdtEntries(ULONG,LDT_ENTRY,ULONG,LDT_ENTRY);
|
||||
NTSTATUS WINAPI NtSetLowEventPair(HANDLE);
|
||||
NTSTATUS WINAPI NtSetLowWaitHighEventPair(HANDLE);
|
||||
|
@ -2369,12 +2378,6 @@ NTSTATUS WINAPI LdrQueryProcessModuleInformation(SYSTEM_MODULE_INFORMATION*, ULO
|
|||
NTSTATUS WINAPI LdrUnloadDll(HMODULE);
|
||||
NTSTATUS WINAPI LdrUnlockLoaderLock(ULONG,ULONG);
|
||||
|
||||
typedef struct _FILE_COMPLETION_INFORMATION {
|
||||
HANDLE CompletionPort;
|
||||
ULONG_PTR CompletionKey;
|
||||
} FILE_COMPLETION_INFORMATION;
|
||||
typedef FILE_COMPLETION_INFORMATION *PFILE_COMPLETION_INFORMATION;
|
||||
|
||||
/* list manipulation macros */
|
||||
#define InitializeListHead(le) (void)((le)->Flink = (le)->Blink = (le))
|
||||
#define InsertHeadList(le,e) do { PLIST_ENTRY f = (le)->Flink; (e)->Flink = f; (e)->Blink = (le); f->Blink = (e); (le)->Flink = (e); } while (0)
|
||||
|
|
Loading…
Reference in New Issue