<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Alexandre Julliard wrote:
<blockquote cite="mid:87tzmey8y9.fsf@wine.dyndns.org" type="cite">
<pre wrap="">Robert Shearman <a class="moz-txt-link-rfc2396E" href="mailto:rob@codeweavers.com"><rob@codeweavers.com></a> writes:
</pre>
<blockquote type="cite">
<pre wrap="">Andrey Turkin wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Robert Shearman wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Andrey Turkin wrote:
</pre>
<blockquote type="cite">
<pre wrap=""> /******************************************************************************
* BindIoCompletionCallback (KERNEL32.@)
*/
+extern NTSTATUS WINAPI
RtlSetIoCompletionCallback(HANDLE,LPOVERLAPPED_COMPLETION_ROUTINE,ULONG);
</pre>
</blockquote>
<pre wrap="">This should go in winternl.h.
</pre>
</blockquote>
<pre wrap="">winternl.h may not depend on winbase.h for some reason, so this would
mean either changing prototype to "(HANDLE,LPVOID,ULONG)", which seems
wrong, or redefining LPOVERLAPPED_COMPLETION_ROUTINE and
OVERLAPPED/LPOVERLAPPED, which seems to be too much duplication.
</pre>
</blockquote>
<pre wrap="">I think you should guard the function with an #ifdef __WINE_WINBASE_H
statement, but I would wait for some other developers to chime in to get
a consensus before accepting this though.
</pre>
</blockquote>
<pre wrap=""><!---->
It doesn't seem right for an ntdll function to use an OVERLAPPED
pointer. Shouldn't it take an IO_STATUS_BLOCK instead?
</pre>
</blockquote>
<br>
It is not used in the function itself, it is only passed to
user-provided callback. So, I see several possibilities:<br>
1) change RtlSetIoCompletionCallback to use another callback prototype,
with LPVOID or ULONG_PTR or something instead of LPOVERLAPPED<br>
2) leave callback prototype as in BindIoCompletionCallback, and protect
RtlSetIoCompletionCallback with #ifdefs as Robert suggested<br>
3) do not implement RtlSetIoCompletionCallback at all and move all code
in kernel32<br>
<br>
</body>
</html>