Note:
- Pass BSTR variable to COM method, HRESULT return is
8000FFFF
- Previous calls with interface pointer, was successful: HRESULT is
0
- Execution, inside Visual Studio succeeds, outside fails - release and debug
Illustration:
const char *simFile;
simFile = new char;
//omitted
_bstr_t simFileToOpen(simFile);
BSTR raw_sim_Open = simFileToOpen.copy();
SysFreeString(simFileToOpen);
delete simFile;
hresult = pis8->raw_Open (raw_sim_Open); //0x8000FFFF returned