A VB.net app I am running on a different machine to where I compiled it is exiting with windows errors.
It's a .net clr20r3 exception in system.net.sockets.socket, p7 is 2cb0 and p8 is 67.
According to Hans' answer here however the best thing to do is catch exceptions within the program to reduce the pain of tracking them down.
So I have surrounded my load method (it's a forms application so there is no main I can access - right?) with the following
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Form1_Load_internal(sender, e)
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End Sub
Still, however this does not catch the exception and I get the same .net exception.
Where might the exception be happening and how can I track it down?
nb I have some DllImports in the class definition too, could this be the problem?
<DllImport(dllname, EntryPoint:="get_license_details", SetLastError:=True, _
CharSet:=CharSet.Ansi, ExactSpelling:=False, CallingConvention:=CallingConvention.StdCall)> _
Shared Sub get_license_details_dll(ByVal message As StringBuilder, ByRef gotlicense As Integer, ByRef candeauthorize As Integer, ByVal maxlength As Integer)
End Sub