I want to create a tunnel between my computer (which is connected to the router via ethernet and runs on windows) and another computer in the same subnet.
I chose WINTUN.dll for this purpose because it is much faster and more efficient than OpenVPN.
I can't find a way to start a season on the ethernet adapter on my laptop!
I tried using the adapter name found on MS INFO:
WINTUN_ADAPTER_HANDLE Adapter = WintunOpenAdapter(L"Realtek USB GbE Family Controller");'
Result: "error creating adapter, code: 1168"
I searched the library documentation and could not find anything on the subject. Will Wintun work under any circumstances with non-Wintun adapters?
Any help will be appreciated! thank you!

You cant open your Realtek USB (...) Ethernet Adapter. Wintun is used to create a Layer 3 Network Adapter. You need to initialize wintun and afterwards create an Adapter. If there isnt one in your adapter settings, you cant open one. Id encourage you to implement the example.c from wintun.net. This way you will get the hang of it. If you want to use wintun for your scenario you will need to implement it by yourself. OpenVPN might be slow because it uses a TAP Adapter (wild guess) but you can change it to a tun adapter (e.g wintun). Hope that helps :)