DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: passing array to component

  1. #1
    ip266 Guest

    passing array to component


    I've a COM object which consists of the following function header:

    Public Function DllFunction(ByRef MyArray() as String) as String
    ....
    End Function

    In ASP page, I declare the array and call the DllFunction with passing it
    to. I hit an error. This is my ASP Code:

    Dim arrA(1)
    arrA(0) = "1"
    arrA(1) = "2"
    ...
    ...
    Dim str
    str = myObject.DllFunction(arr)


    Does anyone knows how to solve the problem without changing the COM function
    header to :

    Public Function DllFunction(MyArray as variant) as String


    Thanks in advance!

  2. #2
    Paul Clement Guest

    Re: passing array to component

    On 21 Feb 2002 19:39:11 -0800, "ip266" <ip266@yahoo.com> wrote:


    I've a COM object which consists of the following function header:

    Public Function DllFunction(ByRef MyArray() as String) as String
    ...
    End Function

    In ASP page, I declare the array and call the DllFunction with passing it
    to. I hit an error. This is my ASP Code:

    Dim arrA(1)
    arrA(0) = "1"
    arrA(1) = "2"
    ..
    ..
    Dim str
    str = myObject.DllFunction(arr)


    Does anyone knows how to solve the problem without changing the COM function
    header to :

    Public Function DllFunction(MyArray as variant) as String

    Try passing ByVal.

    http://support.microsoft.com/directo...EN-US;Q244012&


    Paul ~~~ pclement@ameritech.net
    Microsoft MVP (Visual Basic)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center