Hello,
Welcome to Microsoft Q&A!
According to the Doc: WlanConnect function
The WlanConnect function attempts to connect to a specific network. The WlanConnect function returns immediately. To be notified when a connection is established or when no further connections will be attempted, a client must register for notifications by calling WlanRegisterNotification.
When you are clicking on "Cancel" button, it means no further connections will be attempted. If you want to be notified, you could call WlanRegisterNotification
.
Thank you.
Jeanine
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.