Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing arguments 1

Status
Not open for further replies.

Alira

Programmer
Mar 21, 2001
77
CA
Hi ALL!

Here is my question...
I have to pass a multidimentional array with phone numbers and their descriptions from Outlook Contact info into custom .dll

This array is dynamic. I use ReDim statement when I know how many elements it will have.

This portion of code is written in VBScript. Then I have to pass this array to a .dll made in Visual Basic...

If I'm not mistaken .dll can accept only Variant.

What can I do?How to solve this?

Any help will be greatly appretiated. Have a great day!:)
 
VBScript only has variant.
Dim ary ' Create Variant NOT Dim ary() ' Array of variants

Redim ary(x) ' Puts array inside Variant

DLL must accept Variant from VBScript.

Sub ABC (ary As Variant)

Debug.Print ary(0) ' should work Generate Forms/Controls Resizing/Tabbing Class
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
Thank you!!!!!

It works perfectly:) Have a great day!:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top