K
Kath
I have a VB.net project, for PPC 2003 on the XDA II. I am trying to
add functionality in my application to automatically reconnect GPRS if
it disconnects, and monitor it's state, etc. I am trying to use a
reference to OpenNETCF's connection manager.
I've managed to add a reference to the OpenNETCF.Net.dll, and my
project works with the added references (openNETCF.Net.dll and
mscorlib). However, I have the following problems if I try to declare
an instance of the opennetcf:
1) In my global declarations module, I add the declaration:
"Public GPRSconn As New OpenNETCF.Net.ConnectionManager".
When I try to run the project, it crashes on my form's class (before
opening the form), with a MissingMethodException (in myproject.exe).
2) I move the declaration to my first form, declaring it locally in a
sub (I need it as a global variable, but I was just trying to get it
to work!). The form loads fine. When I click on my button, it crashes
on the
line which calls my sub to declare the GPRSconn, with the exception:
TypeLoadException (in myproject.exe).
ie.
Private Sub TrytoDecGPRS()
Try
Dim GPRSconn As New OpenNETCF.Net.ConnectionManager
MsgBox(GPRSconn.State.ToString)
Catch ex As Exception
MsgBox("intro(tryGPRS): " + ex.Message)
End Try
End Sub
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnLogin.Click
TrytoDecGPRS()
It crashes on the line "TrytoDecGPRS()"
Am I not declaring the opennetcf correctly? Am I missing something?
Any help greatly appreciated!
Thanks,
Kath
add functionality in my application to automatically reconnect GPRS if
it disconnects, and monitor it's state, etc. I am trying to use a
reference to OpenNETCF's connection manager.
I've managed to add a reference to the OpenNETCF.Net.dll, and my
project works with the added references (openNETCF.Net.dll and
mscorlib). However, I have the following problems if I try to declare
an instance of the opennetcf:
1) In my global declarations module, I add the declaration:
"Public GPRSconn As New OpenNETCF.Net.ConnectionManager".
When I try to run the project, it crashes on my form's class (before
opening the form), with a MissingMethodException (in myproject.exe).
2) I move the declaration to my first form, declaring it locally in a
sub (I need it as a global variable, but I was just trying to get it
to work!). The form loads fine. When I click on my button, it crashes
on the
line which calls my sub to declare the GPRSconn, with the exception:
TypeLoadException (in myproject.exe).
ie.
Private Sub TrytoDecGPRS()
Try
Dim GPRSconn As New OpenNETCF.Net.ConnectionManager
MsgBox(GPRSconn.State.ToString)
Catch ex As Exception
MsgBox("intro(tryGPRS): " + ex.Message)
End Try
End Sub
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnLogin.Click
TrytoDecGPRS()
It crashes on the line "TrytoDecGPRS()"
Am I not declaring the opennetcf correctly? Am I missing something?
Any help greatly appreciated!
Thanks,
Kath