I have a COM method that makes use of an array of strings. The IDL prototype is:
[id(1), helpstring("method Test")] HRESULT Test([in] SAFEARRAY(BSTR) *FileNames);
The header file has the method prototype: STDMETHOD(Test)(/*[in]*/ SAFEARRAY **FileNames);
and the cpp file has the method
STDMETHODIMP CTestClass::Test(SAFEARRAY **FileNames)
// Suff happens here
What I have not been able to figure out is how to access the strings in the FileNames variable. Can someone post or point me to code that explains how to iterate through the SAFEARRAY and retrieve the values?