EnterpriseMobileToday WindowsMobileToday

Home | News | Reviews | Features | Tips | Mobile Product Watch | Forums
 WindowsMobileToday: Message Boards: Developers: Network Detection (Archived)

Network Detection
(Archived Message)

Read Replies | Start New Thread | Developers Board Index

Developers Board (Del Msg)
Title: Network Detection
Posted By: Steve
E-mail: ratansp@hotmail.com
Date: 11/19/2001 at 20:29:30

Recent Posts
Secure Digital Card Modem
eBooks not being found on
Bluetooth phones
Ipaq screen iput problem
Wireless To Wireless
Outlook calendar plugin?
Options for new iPaq buye
Pocket Inbox
Help with Buying a PDA
Ipaq 1945 or 2215 with Na
More ...  
 
Message:

Hi,

I have wince running on my IPAQ and am writing an application that needs to detect whether wireless connection (802.11b) is present or not. Basically, if it is then I want to launch IE. I am doing that using the code as below:

==Start code.
bool AppTester::LaunchIE()
{

SHELLEXECUTEINFO sei;
memset(&sei, 0, sizeof (sei));
sei.cbSize = sizeof (sei);
sei.fMask = 0 ;
sei.lpParameters = "www.cnn.com";
sei.lpFile = _T("IEXPLORE.EXE");
sei.lpVerb = _T("Open");

if(ShellExecuteEx (&sei) == 0)
{
TCHAR szError[100];
wsprintf(szError,_T("Error calling ShellExecuteEx: %d"),GetLastError());
MessageBox(NULL,szError,_T("Error"),MB_OK);
return FALSE;
}return TRUE;
}
====End code.
My development environment is using embedded visual c++.
Now my question is, If connection is available IE will launch with no problem and web page will be shown (using above code). But, if no connection is available IE will still launch but will time out after sometime and say "Page you are looking for cannot be found"

What I want is to keep the user of the IPAQ transparent from the connection. Hence, I need to test before launching IE and see if connection is available or not. Is it is, then I can simply launch the web page. Else I want to display some other page that I have in my cache.

Hopefully, my question can be understood. So, is there a way in my program I can detect for presence of network connection before hand????

I would appreciate if you can give me some sample code to look at.

Thanks





Is this message offensive or in violation of this board's policies? If so report it by clicking here.

Message Thread

For Additional Information:

Latest Articles:

  • Windows Mobile 7 Due Late Next Year?
  • Gartner Says Mobile Device Sales Flat in 2009
  • AT&T Ready to Give a Little on Net Neutrality?
  • CTIA Looks Ahead on 2010 Agenda Plans
  • Cisco Closes $2.9B Starent Acquistion
  • Verizon Fortifies Data Networks. iPhone on Tap?
  • Verizon Wireless Defends Early Termination Fees
  • iPhone Reigns Supreme in Mobile Use
  • T-Mobile Planning Free Windows Mobile 6.5 Updates for HTC Handsets?
  • Keep Lithium Batteries Out of Checked Bags When Flying
  • Latest Downloads:

  • Swift Comm Manager 1.0 (Pocket PC)
  • System Resources At Glance 1.0 (Pocket PC)
  • Satellite Clock 1.0 (Pocket PC)
  • Pop-up Task Manager 1.0 (Pocket PC)
  • Pocket Theme Editor 2 (Pocket PC)
  • Hi-Launcher 1.1 (Pocket PC)
  • Handy Phone Dialer 1.0 (Pocket PC)
  • Cliquick: Fastest, most powerful keyboard yet! Finger-friendly keys More screen space, 120 languages 4,0 (Pocket PC)
  • Handy Task Manager 1.0 (Pocket PC)
  • Alt+Tab Task Switcher 1.0 (Pocket PC)





  • The Network for Technology Professionals

    Search:

    About Internet.com

    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers