ntdll: Implement NtRemoveIoCompletionEx().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
248d0ee315
commit
ef2471ec0f
|
@ -308,6 +308,7 @@
|
||||||
@ stub NtReleaseProcessMutant
|
@ stub NtReleaseProcessMutant
|
||||||
@ stdcall NtReleaseSemaphore(long long ptr)
|
@ stdcall NtReleaseSemaphore(long long ptr)
|
||||||
@ stdcall NtRemoveIoCompletion(ptr ptr ptr ptr ptr)
|
@ stdcall NtRemoveIoCompletion(ptr ptr ptr ptr ptr)
|
||||||
|
@ stdcall NtRemoveIoCompletionEx(ptr ptr long ptr ptr long)
|
||||||
# @ stub NtRemoveProcessDebug
|
# @ stub NtRemoveProcessDebug
|
||||||
@ stdcall NtRenameKey(long ptr)
|
@ stdcall NtRenameKey(long ptr)
|
||||||
@ stdcall NtReplaceKey(ptr long ptr)
|
@ stdcall NtReplaceKey(ptr long ptr)
|
||||||
|
@ -1243,6 +1244,7 @@
|
||||||
@ stub ZwReleaseProcessMutant
|
@ stub ZwReleaseProcessMutant
|
||||||
@ stdcall -private ZwReleaseSemaphore(long long ptr) NtReleaseSemaphore
|
@ stdcall -private ZwReleaseSemaphore(long long ptr) NtReleaseSemaphore
|
||||||
@ stdcall -private ZwRemoveIoCompletion(ptr ptr ptr ptr ptr) NtRemoveIoCompletion
|
@ stdcall -private ZwRemoveIoCompletion(ptr ptr ptr ptr ptr) NtRemoveIoCompletion
|
||||||
|
@ stdcall -private ZwRemoveIoCompletionEx(ptr ptr long ptr ptr long) NtRemoveIoCompletionEx
|
||||||
# @ stub ZwRemoveProcessDebug
|
# @ stub ZwRemoveProcessDebug
|
||||||
@ stdcall -private ZwRenameKey(long ptr) NtRenameKey
|
@ stdcall -private ZwRenameKey(long ptr) NtRenameKey
|
||||||
@ stdcall -private ZwReplaceKey(ptr long ptr) NtReplaceKey
|
@ stdcall -private ZwReplaceKey(ptr long ptr) NtReplaceKey
|
||||||
|
|
|
@ -1333,6 +1333,54 @@ NTSTATUS WINAPI NtRemoveIoCompletion( HANDLE CompletionPort, PULONG_PTR Completi
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************
|
||||||
|
* NtRemoveIoCompletionEx (NTDLL.@)
|
||||||
|
* ZwRemoveIoCompletionEx (NTDLL.@)
|
||||||
|
*/
|
||||||
|
NTSTATUS WINAPI NtRemoveIoCompletionEx( HANDLE port, FILE_IO_COMPLETION_INFORMATION *info, ULONG count,
|
||||||
|
ULONG *written, LARGE_INTEGER *timeout, BOOLEAN alertable )
|
||||||
|
{
|
||||||
|
NTSTATUS ret;
|
||||||
|
ULONG i = 0;
|
||||||
|
|
||||||
|
TRACE("%p %p %u %p %p %u\n", port, info, count, written, timeout, alertable);
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
SERVER_START_REQ( remove_completion )
|
||||||
|
{
|
||||||
|
req->handle = wine_server_obj_handle( port );
|
||||||
|
if (!(ret = wine_server_call( req )))
|
||||||
|
{
|
||||||
|
info[i].CompletionKey = reply->ckey;
|
||||||
|
info[i].CompletionValue = reply->cvalue;
|
||||||
|
info[i].IoStatusBlock.Information = reply->information;
|
||||||
|
info[i].IoStatusBlock.u.Status = reply->status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SERVER_END_REQ;
|
||||||
|
|
||||||
|
if (ret != STATUS_SUCCESS) break;
|
||||||
|
|
||||||
|
if (i++ >= count) break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i && ret == STATUS_PENDING)
|
||||||
|
{
|
||||||
|
ret = STATUS_SUCCESS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = NtWaitForSingleObject( port, alertable, timeout );
|
||||||
|
if (ret != WAIT_OBJECT_0) break;
|
||||||
|
}
|
||||||
|
|
||||||
|
*written = i ? i : 1;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* NtOpenIoCompletion (NTDLL.@)
|
* NtOpenIoCompletion (NTDLL.@)
|
||||||
* ZwOpenIoCompletion (NTDLL.@)
|
* ZwOpenIoCompletion (NTDLL.@)
|
||||||
|
|
Loading…
Reference in New Issue