Variant Arrays passed to ActiveX COM DLL

I am attempting to make calls from a Delphi 5 app to an ActiveX COM dll
that I believe to have been written in VB. Calls to methods that use
regular variant type parameters work fine, but when I attempt to call a
method that returns values in arrays I get an error message that
says: "Access violation at address 1000F192 in module 'whatsit.dll'.
Write of address 00000000."

The functions declaration from the imported tlb file looks like:

procedure GetNames(out vID: OleVariant; out vName: OleVariant);

where both vID and vName are arrays.

The call in the delphi app looks like:

var
    vID, vName: OleVariant;
begin
    vID := VarArrayRef(VarArrayCreate([0, 1000], varVariant));
    vName := VarArrayRef(VarArrayCreate([0, 1000], varVariant));
    Hardware.GetNames(vID, vName);
end;

The following call in VB works fine:

Dim objDLL, aryId(), aryNames()

Set objDLL = CreateObject("Whatsit.Hardware")
RetVal = objDll.GetNames(aryId, aryNames)

Can anybody help me? Thanks in advance.

Sent via Deja.com http://www.deja.com/
Before you buy.