I have the following IDL which works fine for passing a string value from JS to C++. The JS code passes a string value to the c++/COM object.
[id(1), helpstring("method DoSomething")] HRESULT DoSomething([in] BSTR otlToken);
I now need to add another method to return a string to a javascript caller. I added the following to the IDL:
[id(3), helpstring("method GetValue")] HRESULT GetValue([out] BSTR *nicknames);
The developer who is working on the JS side says he gets a message about wrong number of arguments and other things depending on if he tries to call the method or access it as a property.
Does JS require a call by reference to get this or do I have to pass the one BSTR* param as [in,out]?
How can I get this to work? (getting a string value from C++/IDL to a JS caller?
What does the IDL have to look like and what should the JS code look like?