From: zhengfish <zhengfish@gmail.com>
To: wireguard@lists.zx2c4.com
Subject: [Wintun] Does wintun.dll support IOCP API?
Date: Mon, 5 Apr 2021 13:07:11 +0800 [thread overview]
Message-ID: <CAJ4StijaLgSfQ+3q5k_bSmRDYo-Voayj529DqyOV0X4OR3qzaw@mail.gmail.com> (raw)
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.
next reply other threads:[~2021-04-06 21:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-05 5:07 zhengfish [this message]
2021-04-08 14:24 ` Simon Rozman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJ4StijaLgSfQ+3q5k_bSmRDYo-Voayj529DqyOV0X4OR3qzaw@mail.gmail.com \
--to=zhengfish@gmail.com \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).