Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie help - Catastrophic failure

Status
Not open for further replies.

bigracefan

Programmer
Apr 2, 2002
304
0
0
US
I'm writing my first com interface and I'm getting a "Catastrophic Failure" message when I try to invoke a method from the com object. Any help or direction would be greatly apprciated.
Code:
Imports SSICONNECTLib
Imports System.Reflection
Imports System.Runtime.InteropServices


Public Class Form1


    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim SSICon As New SSICONNECTLib.SSIConnect
        Try
            SSICon.ComPortNumber = 1
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try



    End Sub
End Class
 
The failure is likely from something with in the COM object, not much we can do to help :(

You could check the ex.InnerException to see if there is anymore information wrapped inside of it.

Other than that, not much to do from the .Net side. But depending on what your goal is, .Net has the System.IO.Ports namespace that allows for real easy COM port control.

Wow, I just realized that could be a bit confusing. COM Objects are based on the Component Object Model. Com ports is referring to the communication port, RS232, on the back of your computer.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Thanks so much for the quick reply. I wanted to make sure that I wasn't off the mark on trying this. Let me ask you thou, is it possible to use any COM object or are some not usuable in .Net? Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top