I am having trying to implement the 'TS_EngineDisplayFileDialog ()' method to obtain a user specified directory path.
Specifically the two arguents requiring a pointer to pointer to SAFEARRAY. The local help specifies that a specific function must be used to release the SAFEARRAY. Therefore, I declared the two variables:
SAFEARRAY *selPaths = NULL;
SAFEARRAY *absPaths = NULL;
The compiler accepted this without any errors. The resources are then released when no longer needed in the following manner:
if (NULL != selPaths)
CA_SafeArrayDestroy (selPaths);
if (NULL != absPaths)
CA_SafeArrayDestroy (absPaths);
At runtime it's a different story. When TS_EngineDisplayFileDialog is cal
led the following runtime error occurs:
Invalid argument: Expected SAFEARRAY of BSTR.
If these objects get allocated by the call, how can the user preload any info into a nonexistent structure before the call.
I was unable to find any examples of the use of this call. Could someone provide an example of how to use this call, specifically the setup of the two SAFEARRAY arguments?