Groups | Blog | Home
all groups > dotnet compact framework > october 2007 >

dotnet compact framework : RasEnumConnections problem on WM2005


ctacke/
10/10/2007 8:22:55 AM
If you simply want to know if the connection exists, try resolving the
PPP_PEER domain name. If it resolves, you're connected.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


[quoted text, click to view]

Korwin
10/10/2007 12:35:19 PM
Hi,
When connect my device to desktop computer, ActiveSync synchronize and
establish connection. When call RasEnumConnections function on device with
PC2003, it returns ActiveSync connection. But on device with WM2005 it
returns no active connections.
So, my question is: How can I detect ActiveSync connection on device with
WM2005?

Korwin

Chris Oswald
10/10/2007 12:59:28 PM
There are probably several things you could look at in the SystemState
library. Here is what I would do.

Dim desktopConnections As New
Microsoft.WindowsMobile.Status.SystemState(Microsoft.WindowsMobile.Status.SystemProperty.ConnectionsDesktopCount)

AddHandler desktopConnections .Changed, AddressOf
ConnectionCountChanged

Private Sub ConnectionCountChanged(ByVal sender As Object, ByVal args
As Microsoft.WindowsMobile.Status.ChangeEventArgs)
MsgBox(args.NewValue)
End Sub

[quoted text, click to view]
AddThis Social Bookmark Button