문제

We are trying to switch between WiFi and GPRS depending upon the availability of the network. We are also using OpenNETCF for the network activity.

Is there any callback methods available in the OpenNETCF or .NET Framework to get a notification whenever connection is available or gone?

Or can anyone direct me to a sample code for the same.

Note: We need a solution compatible with running on both Windows Mobile 5.0 and Windows CE.

도움이 되었습니까?

해결책

What you're looking for is called the Connection Manager. It has existed since the first version of WinCE to support cell phones. It's available on the OEM type Windows CE as well, but I'm not sure if that only has the native code functions.

You can set up a callback function to be notified of changes in the connection status or have your window sent a message. Full documentation is available here:

MSDN documentation for Connection Manager

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top