AnsweredAssumed Answered

vrf VB.net 2005 et VEE pro 6.0

Question asked by VRFuser on Jun 14, 2006
Hi,

I want to use VB.Net with callableVeeServer.

Normally, with VBA I can used Variant type to Input and output data to and from Vee UserFunction.

When I replace Variant type by Object type for Inputs and outputs, the here after error appears at the line “Call Uf1.Call(Inputs, Outputs)â€

Expected parameter "Outputs" to be passed ByRef

This error can also be caused by passing a scalar

variable when an array is expected.

 

 

Imports CallableVEE

Public Class Form1

    Dim MonServeur As New CallServer

    Dim Librairie As CallableVEE.Library

    Dim Uf1 As UserFunction

    Dim Libpath As String

    Dim Inputs(1) As Object

    Public Outputs(1) As Object

 

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

 

 

        ' Create VEE server object and load library

        MonServeur = CreateObject("CallableVEE.CallServer")

        Libpath = "examplescallableveelib.vee"

        Librairie = MonServeur.Libraries.Load(MonServeur.InstallDir & Libpath)

 

        ' Set debug mode appropriately

        MonServeur.Debug = True

 

        ' Call simple VEE UF and update spreadsheet

        Uf1 = Librairie.UserFunctions("TwoInTwoOut1")

        Inputs(0) = 2

        Inputs(1) = 5

 

        Call Uf1.Call(Inputs, Outputs)

 

 

    End Sub

End Class

 

With a user function without Output terminal, and with

Call Uf1.Call(Inputs),

No error appears and Vee windows appears

 

Where is the problem?

Thanks for your help

Regards

 

Michel JOSEPH

EMITECH île de France,

Laboratoires CEM Militaire, aéronautique, spatial et automobile.

3, rue de coudriers

78180 Montigny le Bretonneux

Tél: 01 30 57 55 55

Fax: :01 30 57 86 40

Mail: m.joseph@emitech.fr

URL: www.emitech.fr

 


---

To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "www.oswegosw.com/vrf_archive/".  

Outcomes