Hi, Guys,
I have a VB.NET application that runs over Jan Axelson's HID example. It runs fine but the following module keeps issuing an error (It issues an error once every 30 minutes) Mostly the software it works fine:
Friend Function IsWindows98Gold() As Boolean
Try
Dim myEnvironment As OperatingSystem = Environment.OSVersion
' Windows 98 Gold is version 4.10 with a build number less than 2183.
Dim version98SE As New System.Version(4, 10, 2183)
If (Version.op_LessThan(myEnvironment.Version, version98SE) = True) Then
Debug.Write("The OS is Windows 98 Gold.")
Return True
Else
Debug.Write("The OS is more recent than Windows 98 Gold.")
Return False
End If
Catch ex As Exception
DisplayException(MODULE_NAME, ex)
Throw
End Try
End Function
The error reported is:
The runtime has encountered a fatal error. The address of the error was at 0xe5e3f50d, on thread 0x9a8. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
I tried to avoid the Win98 OP system check by just returning FALSE on the Function but it does not work (I do not understand why)
Would anybody know how to get rid of those errors ?
Thanks
Antonio Fasano
Sao Paulo
Brazil