RasEnumConnections problem on WM2005

  • Thread starter Thread starter Korwin
  • Start date Start date
K

Korwin

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
 
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
 
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
 
Back
Top