D
David Hanson
Guys,
Check the class at the bottom. I am atrying to establish a GPRS connection
but I must be doing something wrong. Can someone tell me how I am supposed
to create a GPRS connection using this class as I get System.NotSupported
each time I call CConnMgrEstablishConnection. Some help on this would really
be appreciated.
Imports System.Runtime.InteropServices
Public Class ConnMan
Private Const LocateDll As String = "coredll.dll"
Public Structure CONNMGR_CONNECTIONINFO
Public cbSize As System.UInt32
Public dwParams As System.UInt32
Public dwFlags As System.UInt32
Public dwPriority As System.UInt32
Public bExclusive As System.UInt32
Public bDisabled As System.UInt32
Public guidDestNet0 As Byte
Public guidDestNet1 As Byte
Public guidDestNet2 As Byte
Public guidDestNet3 As Byte
Public guidDestNet4 As Byte
Public guidDestNet5 As Byte
Public guidDestNet6 As Byte
Public guidDestNet7 As Byte
Public guidDestNet8 As Byte
Public guidDestNet9 As Byte
Public guidDestNet10 As Byte
Public guidDestNet11 As Byte
Public guidDestNet12 As Byte
Public guidDestNet13 As Byte
Public guidDestNet14 As Byte
Public guidDestNet15 As Byte
Public hWnd As Integer
Public uMsg As System.UInt32
Public lParam As Integer
Public ulMaxCost As System.UInt32
Public ulMinRcvBw As System.UInt32
Public ulMaxConnLatency As System.UInt32
End Structure 'CONNMGR_CONNECTIONINFO
<DllImport(LocateDll)> _
Public Shared Function ConnMgrConnectionStatus(ByVal hConnection As
Long, ByRef pdwSatus As Long) As Long
End Function
<DllImport(LocateDll)> _
Public Shared Sub ConnMgrEnumDestinations(ByVal nIndex As Integer, ByRef
pDestInfo As CONNMGR_CONNECTIONINFO)
End Sub
<DllImport(LocateDll)> _
Public Shared Function CConnMgrEstablishConnection(ByVal pConnInfo As
CONNMGR_CONNECTIONINFO, ByRef hConnection As Long) As Long
End Function
End Class
Check the class at the bottom. I am atrying to establish a GPRS connection
but I must be doing something wrong. Can someone tell me how I am supposed
to create a GPRS connection using this class as I get System.NotSupported
each time I call CConnMgrEstablishConnection. Some help on this would really
be appreciated.
Imports System.Runtime.InteropServices
Public Class ConnMan
Private Const LocateDll As String = "coredll.dll"
Public Structure CONNMGR_CONNECTIONINFO
Public cbSize As System.UInt32
Public dwParams As System.UInt32
Public dwFlags As System.UInt32
Public dwPriority As System.UInt32
Public bExclusive As System.UInt32
Public bDisabled As System.UInt32
Public guidDestNet0 As Byte
Public guidDestNet1 As Byte
Public guidDestNet2 As Byte
Public guidDestNet3 As Byte
Public guidDestNet4 As Byte
Public guidDestNet5 As Byte
Public guidDestNet6 As Byte
Public guidDestNet7 As Byte
Public guidDestNet8 As Byte
Public guidDestNet9 As Byte
Public guidDestNet10 As Byte
Public guidDestNet11 As Byte
Public guidDestNet12 As Byte
Public guidDestNet13 As Byte
Public guidDestNet14 As Byte
Public guidDestNet15 As Byte
Public hWnd As Integer
Public uMsg As System.UInt32
Public lParam As Integer
Public ulMaxCost As System.UInt32
Public ulMinRcvBw As System.UInt32
Public ulMaxConnLatency As System.UInt32
End Structure 'CONNMGR_CONNECTIONINFO
<DllImport(LocateDll)> _
Public Shared Function ConnMgrConnectionStatus(ByVal hConnection As
Long, ByRef pdwSatus As Long) As Long
End Function
<DllImport(LocateDll)> _
Public Shared Sub ConnMgrEnumDestinations(ByVal nIndex As Integer, ByRef
pDestInfo As CONNMGR_CONNECTIONINFO)
End Sub
<DllImport(LocateDll)> _
Public Shared Function CConnMgrEstablishConnection(ByVal pConnInfo As
CONNMGR_CONNECTIONINFO, ByRef hConnection As Long) As Long
End Function
End Class