From: <mie...@us...> - 2013-07-09 23:35:52
|
Revision: 9357 http://sourceforge.net/p/oorexx/code-0/9357 Author: miesfeld Date: 2013-07-09 23:35:50 +0000 (Tue, 09 Jul 2013) Log Message: ----------- #1188 OLE failure on 4.1.3 Modified Paths: -------------- main/branches/4.1/trunk/extensions/platform/windows/ole/orexxole.c Modified: main/branches/4.1/trunk/extensions/platform/windows/ole/orexxole.c =================================================================== --- main/branches/4.1/trunk/extensions/platform/windows/ole/orexxole.c 2013-07-08 23:51:48 UTC (rev 9356) +++ main/branches/4.1/trunk/extensions/platform/windows/ole/orexxole.c 2013-07-09 23:35:50 UTC (rev 9357) @@ -1296,20 +1296,29 @@ hr = pDispatchEx->GetMemberProperties(id, which, &props); if ( FAILED(hr) ) { - // This should not be possible. - goto done_out; + // This should not be possible, unless it is IE, which advertises + // things it doesn't support. + if ( hr != E_NOTIMPL ) + { + goto done_out; + } } - if ( props & fdexPropCanGet ) flags |= DISPATCH_PROPERTYGET; - if ( props & fdexPropCanPut ) flags |= DISPATCH_PROPERTYPUT; - if ( props & fdexPropCanPutRef ) flags |= DISPATCH_PROPERTYPUTREF; - if ( props & fdexPropCanCall ) flags |= DISPATCH_METHOD; - if ( props & fdexPropCannotGet ) flags &= ~DISPATCH_PROPERTYGET; - if ( props & fdexPropCannotPut ) flags &= ~DISPATCH_PROPERTYPUT; - if ( props & fdexPropCannotPutRef ) flags &= ~DISPATCH_PROPERTYPUTREF; - if ( props & fdexPropCannotCall ) flags &= ~DISPATCH_METHOD; + if ( props != 0 ) + { + if ( props & fdexPropCanGet ) flags |= DISPATCH_PROPERTYGET; + if ( props & fdexPropCanPut ) flags |= DISPATCH_PROPERTYPUT; + if ( props & fdexPropCanPutRef ) flags |= DISPATCH_PROPERTYPUTREF; + if ( props & fdexPropCanCall ) flags |= DISPATCH_METHOD; + if ( props & fdexPropCannotGet ) flags &= ~DISPATCH_PROPERTYGET; + if ( props & fdexPropCannotPut ) flags &= ~DISPATCH_PROPERTYPUT; + if ( props & fdexPropCannotPutRef ) flags &= ~DISPATCH_PROPERTYPUTREF; + if ( props & fdexPropCannotCall ) flags &= ~DISPATCH_METHOD; + } - // If flags are 0, something is wrong ... but we just ignore this for now. + // If flags are 0, something is wrong ... but with IE at least, + // GetMemberProperties() *never* works. In this case we try to fall + // back to using the type info. if ( flags == 0 && pTypeInfo ) { POLEFUNCINFO tempFuncInfo = NULL; |