Development discussion of WireGuard
 help / color / mirror / Atom feed
* [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

Development discussion of WireGuard

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ http://inbox.vuxu.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git