Dear all,
I have a perfectly well running code in Windows XP .Net Studio 2005. When I copied and tried to run the code in the Windows 7 64 bit .Net Studio 2005 it gives error Exception from HRESULT:0x800A1F42. This exception is where I have declared the MsCOMM.
Public Function InitComm() As Boolean
Try
With commport
If .PortOpen = True Then
.PortOpen = False
End If
.DTREnable = True
.Handshaking = MSCommLib.HandshakeConstants.comNone
.NullDiscard = False
.CommPort = comport
.Settings = "9600,e,8,1"
.OutBufferSize = 1024
.InBufferSize = 1024
'.InputMode = 0
.InputMode = MSCommLib.InputModeConstants.comInputModeBinary
.InBufferCount = 0
.OutBufferCount = 0
If .PortOpen = False Then
.InputMode = MSCommLib.InputModeConstants.comInputModeBinary
.InBufferSize = 1024
.PortOpen = True
End If
End With

Catch ex As Exception
MsgBox(ex.Message & " at " & "PmxComm.InitComm")
End Try

End Function

This comes when comm is not registered. But I have registered both in sysWoW64 and System32. Still not working, please help.
Yogi