[PHP-DEV] Bug #12718: com_invoke always seems to return false
From: [EMAIL PROTECTED] Operating system: Win 2k PHP version: 4.0.6 PHP Bug Type: COM related Bug description: com_invoke always seems to return false I created a simple COM objecj in Vis C++. It has a method hello on it that does nothing except return S_OK, and a property bar that returns a string. I can use com_load to create the object and I can get the property string back out (com_propget), but if I call hello then it returns FALSE. $svr = com_load( SIMPLECOMASP.NKMSimpleObj ); $foo = com_invoke( $svr, hello ); if ( $foo ) echo $foo; else echo No; I created another method taking a BSTR input and a BSTR* output and that always returns false with the output being empty. I tried the calls from VB as well, and they seem to work OK, so the COM oject looks functional. If I run the COM exe from the debugger, I can trace through the functions - so they *are* being called, just a bogus return code from somewhere. -- Edit bug report at: http://bugs.php.net/?id=12718edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12718 Updated: com_invoke always seems to return false
ID: 12718 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: COM related Operating System: Win 2k PHP Version: 4.0.6 New Comment: Just to add to this: If I make the return value a retval in the IDL then I can use com_invoke and it works (for the same reason that a propget works). It just doesn't seem to like normal HRESULT return Previous Comments: [2001-08-13 11:35:58] [EMAIL PROTECTED] I created a simple COM objecj in Vis C++. It has a method hello on it that does nothing except return S_OK, and a property bar that returns a string. I can use com_load to create the object and I can get the property string back out (com_propget), but if I call hello then it returns FALSE. $svr = com_load( SIMPLECOMASP.NKMSimpleObj ); $foo = com_invoke( $svr, hello ); if ( $foo ) echo $foo; else echo No; I created another method taking a BSTR input and a BSTR* output and that always returns false with the output being empty. I tried the calls from VB as well, and they seem to work OK, so the COM oject looks functional. If I run the COM exe from the debugger, I can trace through the functions - so they *are* being called, just a bogus return code from somewhere. Edit this bug report at http://bugs.php.net/?id=12718edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]