INTEROP - Passing Array Parameters to .NET Code

  • 15 years ago

    I need help here!


    I dont how to pass an array to my Class Library INTEROP, Im going to call this COM.net from COM VB6 and right now is send me an ERROR, type mismatch.
    How I need to made the call to this component from VB6.
    Do I need a special definition?
    Do you have an example?



    .NET - CLASS LIBRARY
    Public Interface iCostInventory
    Function updCostMaterialAbasto(ByVal ArrGotElements As Array As Boolean
    End Interface


    Public Class clsCostInventoryT Implements iCostInventory
    Function updCostMaterialAbasto(ByVal ArrGotElements As Array) As Boolean Implements iCostInventory.updCostMaterialAbasto



    VB6
           Dim ArrGotElements(2) As String
           ArrGotElements(0) = "11"
           ArrGotElements(1) = "      410917"
           ArrGotElements(2) = "JMXPMEXDT"


       tablaSap = gnInterf.updCostMaterialAbasto(ArrGotElements) ERROR!!!!


Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil perpetrated by skilled but perverted professionals.” - Jon Ribbens