the easy way is to run some bash/command line script from C/C++ that return some knownv alue for WiFi status.
For windows there is netsh and for linux iwconifg/ifconfig, plus some scripts lines and you will get what you want.
1
solved Using C++ code to Check in OS if WiFi is available or not(if its available whether its turn ON/OFF) [closed]