This is C++ code (almost always a DLL) for reference/example.
This C++ code interops with the Wait-Chain Traversal API and returns an LPCWSTR back to the caller, containing all of the Wait-Chains found for the given process (specified by PID).
This C++ code interops with the Windows API (Specifically, WlanGetNetworkBssList) to return an LPCWSTR containing all of the SSIDs (and their corresponding BSSIDS) available on the wireless network interface.