AnsweredAssumed Answered

Problem with integration of VEE objects into VB

Question asked by tejas.dave on Apr 10, 2010
Latest reply on Apr 14, 2010 by UndeadBob

    I working on integration of VEE user function into Visual Basic taking reference of Callable AciveX Automation Server in Microsoft Visual Studio 2008. I first tried with very simple example and i called it from Visual basic code and it worked fine. But when i introduced some .NET code into that example. It works fine in VEE Pro. But when i called it from visual basic it failed.

   It gives me error saying "ComException was unhandled", cannot access .NET object to perform operations. VEE Error No: 754 at line where i am calling that function. One more error saying "Could not resolve COM reference "36f6e2f6-a9ce-11d4-98e5-00108301cb39" version 1.0. The type library importer encountered an error during type verification. Try importing without class members." VB code is as follow:

I have attached snap shot of error message, which i got in MS visual studio 2008.

Public Class Form1
    Dim server As New CallableVEE.CallServer
    Dim library As CallableVEE.Library
    Dim calcUF As CallableVEE.UserFunction
    Dim libfile As String

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        libfile = "C:\SDA_VEE_Control\Var_Calc.vee"
        server = CreateObject("CallableVEE.CallServer")
        library = server.Libraries.Load(libfile)
        calcUF = library.UserFunctions("Calc")
        calcUF.Call()      '----------------------------- Errored Line
    End Sub

End Class

I suspect it has to do with COM and .Net interoperability. Can anyone tell me how to resolve this problem or require more infomation on it. Thanks in advance.