I have an ActiveX control that I ve written using ATL, and am running into a somewhat serious and confusing problem. When iDispatch::Invoke is called with DISPATCH_PROPERTYPUT/METHOD everything is fine. When I return a value to the IE javascript, after a method call of a VT_BSTR with a valid BSTR, it works fine.
But when I try:
var stringValue = Object.stringValue;
which calls iDispatch invoked with the DISPATCH_PROPERTYGET flag, and I set the return value to VT_BSTR with a valid BSTR (the exact same one i use with the method calls), I get a permission denied error box in IE.
When I return various other datatypes (longs, integers, bools, ...etc) to the IE javascript, it works fine (with the propertyGet() method). I only get permission denied when returning VT_BSTR.
Any ideas?