Home > Blockchain >  How can I use Microsofts WiFi Connector UWP example with WinForms?
How can I use Microsofts WiFi Connector UWP example with WinForms?

Time:08-02

Edit: I have re-written the question now that the comments made clear to me what my actual question was. Somebody posted an answer, and below this answer, there was a comment that contained a link. The link pointed to a project where it was shown how to use UWP with WinForms.


There is a Microsoft project enter image description here

It demonstrates how to access WiFi using code.

It even supports WPS button push:

enter image description here

How can I use this sample with WinForms?

CodePudding user response:

WinForms is an old thing and should be able to work on old OSes like win7 or even Vista. Windows.Devices.WiFi was introduced in Win8 (or even Win10). This is the reason it was not added directly into WinForms. But Windows.Devices.WiFi is just a wrapper over a native Win32 api like WFDOpenHandle and so on (https://docs.microsoft.com/en-us/windows/win32/nativewifi/using-the-wi-fi-direct-api?redirectedfrom=MSDN) and you can difinitely use this API in your WinForms APP with P/Invoke.

  • Related