I think he means something different.
try the following in IDL:
typedef SAFEARRAY(LONG) MyData ; // Use your datatype instead of
LONG
[id(1), helpstring("MyFunc")] HRESULT MyFunc([out]MyArray* MyData);
Edwin
Quote:
> Embed the SAFEARRAY in a LPVARIANT. i.e. something like this:
> STDMETHODIMP CMyClass::MyMethod(/*[out, retval]*/ LPVARIANT pMyArray)
> {
> if (pMyArray)
> {
> VariantInit(*pMyArray);
> pMyArray->vt = VT_BSTR | VT_ARRAY;
> pMyArray->parray = SafeArrayCreateVector(VT_BSTR, 0, nStrings);
> // fill the array
> return S_OK;
> }
> return E_INVALIDARG;
> }
> > Hi Folks,
> > I want pass back an Array on strings, so I thought I would use
> SAFEARRAY
> > *pMyArray, but the MIDL complains that SAFEARRAY* is a PVOID and it
> doesn't
> > like VOIDS, PVOIDS etc.
> > Any idea what to do??
> > Cheers
> > Martin