PC Review


Reply
Thread Tools Rate Thread

Is this Correct Gurus?

 
 
David Hanson
Guest
Posts: n/a
 
      9th Nov 2003
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


 
Reply With Quote
 
 
 
 
Alex Feinman [MVP]
Guest
Posts: n/a
 
      10th Nov 2003
The structure must be passed ByRef

"David Hanson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
David Hanson
Guest
Posts: n/a
 
      10th Nov 2003
Ok Alex I have changed this but still get the same problem,

Do you know what i must set the structure variables to?


"Alex Feinman [MVP]" <(E-Mail Removed)> wrote in message
news:ey0wN%(E-Mail Removed)...
> The structure must be passed ByRef
>
> "David Hanson" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> >
> >

>
>



 
Reply With Quote
 
Shaun Wilde
Guest
Posts: n/a
 
      12th Nov 2003
Hi All

We have a Toshiba 3370 PDA that does not seem to run .NET apps.

We think we have installed the right framework and have tried SP1 as well.

Does anyone here on the group use this sort of device for .NET development.

It may be a fault with the device but it could be the framework.

Thanks

Shaun Wilde


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Correct date preview correct but printed as #Name? =?Utf-8?B?UnVpIFNhbnRvcw==?= Microsoft Access Reports 1 16th Nov 2004 02:31 PM
Looking for .NET/C# Gurus DotNetJunkies User Microsoft Dot NET 2 26th Mar 2004 09:11 AM
gurus please help stev Microsoft Excel Worksheet Functions 4 16th Oct 2003 12:31 AM
I need a reference to the correct resource to correct my problem Scooter Windows XP Performance 1 4th Aug 2003 10:09 PM
One for the gurus Alvin Bruney Microsoft C# .NET 2 19th Jul 2003 01:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:26 PM.