* [Wintun] Does wintun.dll support IOCP API?
@ 2021-04-05 5:07 zhengfish
2021-04-08 14:24 ` Simon Rozman
0 siblings, 1 reply; 2+ messages in thread
From: zhengfish @ 2021-04-05 5:07 UTC (permalink / raw)
To: wireguard
Hi,
Does wintun.dll support IOCP API?
If yes, how to do it?
I tried to use Wintun.dll with IOCP. And while associating the Wintun
Session handle to IOCP handle, it outputted an error with code 6.
Context0.Iocp = CreateIoCompletionPort((HANDLE)Session0, hIocp,
(ULONG_PTR)lpPerSessionContext, 0); // To Associate IOCP handle
if (Context0.Iocp == NULL)
wprintf(_T("error, CreateIoCompletionPort associate failed...,
GetLastError: %d\n"), GetLastError());
else
wprintf(_T("success, CreateIoCompletionPort associate success....\n"));
ASSERT(Context0.Iocp==hIocp);
I checked this system error code, that means a invalid handle:
https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-
ERROR_INVALID_HANDLE 6 (0x6) The handle is invalid.
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [Wintun] Does wintun.dll support IOCP API?
2021-04-05 5:07 [Wintun] Does wintun.dll support IOCP API? zhengfish
@ 2021-04-08 14:24 ` Simon Rozman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Rozman @ 2021-04-08 14:24 UTC (permalink / raw)
To: zhengfish, wireguard
> Does wintun.dll support IOCP API?
> If yes, how to do it?
No. Wintun does not communicate with user space using I/O at all.
Please, use wintun.dll API described here https://git.zx2c4.com/wintun/about/
Regards,
Simon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-08 14:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-05 5:07 [Wintun] Does wintun.dll support IOCP API? zhengfish
2021-04-08 14:24 ` Simon Rozman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).