Re: Arrays passed as parameters from VB ActiveX DLL
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Wed, 11 Jan 2006 09:17:46 -0500
"Ben" <ben@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:43c50f3f$1_1@xxxxxxxxxxxxxxxxxxxxxx
> I need to call a VB function that passes out variants that are in fact
> arrays. The function is declared as follows...
>
> Public Function VAX_Directory(ByVal pstr_VAX_Directory As String, _
> ByVal pstr_VAX_Filename As String, _
> Optional pstr_Filelist As Variant, _
> Optional pstr_Datelist As Variant, _
> Optional pstr_Sizelist As Variant, _
> Optional pstr_Attrlist As Variant) As
> Integer
>
> I have managed to pass the String parameters into the function
> correctly using BSTR, but don't know how to declare the array
> parameters. I have tried using a SAFEARRAY, but with no luck.
You say they are [out] parameters. So you pass in a VARIANT* initialized
to VT_EMPTY, and the function fills in a safearray and sets the type to
VT_ARRAY | VT_SomeType.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- Follow-Ups:
- References:
- Prev by Date: Arrays passed as parameters from VB ActiveX DLL
- Next by Date: Re: RS232 Keep RTS high
- Previous by thread: Arrays passed as parameters from VB ActiveX DLL
- Next by thread: Re: Arrays passed as parameters from VB ActiveX DLL
- Index(es):
Relevant Pages
|