Array ^ 2 pass into COM

Results 1 to 2 of 2

Thread: Array ^ 2 pass into COM

  1. #1
    SPG Guest

    Default Array ^ 2 pass into COM

    Hopefully I&#039m missing something simple here, as I don&#039t want to be told that it can&#039t be done...<BR><BR>I&#039m trying to move an array of arrays into a COM object.<BR><BR>COM header is <BR>Public Function acceptArray(ByVal strIn As String, Optional ByVal massiveArray As Variant) As String<BR>(with the massiveArray being where I&#039m aiming my array of arrays for)<BR><BR>My current call into the COM looks like <BR> response.write objArrayPass.acceptArray("Drat!", foo)<BR>with foo being<BR> dim foo(3)<BR> foo(0) = array("blarg", "twonk", "5")<BR> [repeat for foo(1, 2, and 3)]<BR><BR>The error message is "Invalid procedure call or argument"; sending in foo() gives "Subscript out of range" -- both of these happen at the script level.<BR><BR>Thx,<BR>SPG

  2. #2
    Join Date
    Dec 1969

    Default RE: Array ^ 2 pass into COM

    it&#039s the "byval"...<BR><BR>you need to accept the array ByRef<BR><BR>...<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts