How to get online status 
Author Message
 How to get online status

I need to get online status - when the computer is connected to the network
(for ex. using dial-up).

It is the same state as in Outlook Express "Working online" or "Working
offline"

Thanx.

Bredy.



Mon, 16 Feb 2004 06:47:40 GMT  
 How to get online status
Hi,

If you want to get the online status (whether connected or not connected)
of a dial-up (RAS) connetion, you can use the RasGetConnectStatus()

RasGetConnectStatus(HRASCONN hrasconn, LPRASCONNSTATUS rasStatus)

The first parameter is the handle for the RAS connection, you can get this
handle either through RasDial or RasEnumConnection. You can get the online
status from the second parameter. If (rasStatus.rasconnstate ==
RASCS_Connected), then you are connected.

For detailed information, please refer to MSDN.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wces...

Here's also an example of using RasGetConnectStatus, please check to see if
it can help you.
http://www.codeproject.com/useritems/rasconnection.asp

Thanks,
Kelton



Mon, 16 Feb 2004 09:52:46 GMT  
 How to get online status
Thanx, but it isn't what I ask. There is state "Work Offline" when you open
Internet Explorer and select File -> Work offline in menu (and there is
check mark, if you are really working offline). I don't have RAS installed,
but I'm still able set offline status using this command.

In future, I wish to set this state from my application.

Quote:
> Hi,

> If you want to get the online status (whether connected or not connected)
> of a dial-up (RAS) connetion, you can use the RasGetConnectStatus()

> RasGetConnectStatus(HRASCONN hrasconn, LPRASCONNSTATUS rasStatus)

> The first parameter is the handle for the RAS connection, you can get this
> handle either through RasDial or RasEnumConnection. You can get the online
> status from the second parameter. If (rasStatus.rasconnstate ==
> RASCS_Connected), then you are connected.

> For detailed information, please refer to MSDN.



Mon, 16 Feb 2004 15:55:10 GMT  
 How to get online status
Hi,

The "offline" in IE menu is different from the conception of RAS
connection. Offline in IE menu tells IE to get the contents from your IE
cache, not from Internet (even you are actually connected to Internet at
this current time). If you are accessing a web page that cannot be found in
offline cache and you are now not connected to Internet, a connection
dialog box will pop up asking you to dial up to Internet.

Thanks,
Kelton



Mon, 16 Feb 2004 20:43:19 GMT  
 How to get online status
Yeah. That is right. So, I need to know, if user is offline or not. And I
will need to switch to "online" or back from my application.
Quote:
> Hi,

> The "offline" in IE menu is different from the conception of RAS
> connection. Offline in IE menu tells IE to get the contents from your IE
> cache, not from Internet (even you are actually connected to Internet at
> this current time). If you are accessing a web page that cannot be found
> in
> offline cache and you are now not connected to Internet, a connection
> dialog box will pop up asking you to dial up to Internet.

> Thanks,
> Kelton



Mon, 16 Feb 2004 21:11:09 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Newbie: Detect online status

2. Find online status

3. online status without connect dialog

4. Is RasGetConnectStatus sufficient to get online status of internet

5. Determining Online Status

6. Find online status

7. Switching online/offline status of windows ce devices

8. Getting Printer Status/Comment like PrintDialog

9. Getting modem status

10. getting visible status

11. getting checkbox status

12. Getting the status from an HP Printer

 

 
Powered by phpBB® Forum Software