#26632 [Fbk->Opn]: Problem calling COM interface methods
ID: 26632 User updated by: Regis dot Derimay at iQvolution dot com Reported By: Regis dot Derimay at iQvolution dot com -Status: Feedback +Status: Open Bug Type: COM related Operating System: Windows XP Professional PHP Version: 5CVS New Comment: Hi! Thanks for the answer. Now I am using PHP 5 beta 4. I use the php-cgi.exe version. I'm doing the following: "; print_r($e); echo ""; } echo "End"; ?> It crashs echoing the following: Start com_exception Object ( [message:protected] => Failed to create COM object `iQvolution.iQLibIf': The specified module could not be found. [string:private] => [code:protected] => -2147024770 [file:protected] => C:\Documents and Settings\rd\My Documents\iQvolution\Develop\iQworks HTML\Debug\iQworks\ProjectManagement\COM.php [line:protected] => 5 [trace:private] => Array ( ) ) End Of course, it seems as the iQworks COM Obj is not registered, but this is not true as for example Excel with a visual basic script is working correctly. Do you want me to send you the dlls? Or do something that could help to debug the problem? Thanks! Régis Previous Comments: [2004-02-21 18:17:24] [EMAIL PROTECTED] Sorry, this report slipped through the cracks. I did however add automatic support for byref parameters, so the code below *should* work (no need to explicitly create variant objects for $x, $y, $z). Please let me know how you get on; try a recent PHP 5 snapshot (code was added a little while ago; beta 4 should work). iQlib = new COM("iQvolution.iQLibIf"); $iQlib->load("c:\\A.iQmod"); $numScans = $iQlib->getNumScans(); for($i = 0; $i < $numScans; $i++) { $objIf = $iQlib->getScanObject($i); $scanIf = $objIf->getScanObjSpecificIf(); $scanIf->getPosition($x, $y, $z, false); } [2004-02-21 03:33:16] Regis dot Derimay at iQvolution dot com Is someone working on this very anoying bug? Did not here anything since a while! Thanks [2003-12-22 06:50:17] Regis dot Derimay at iQvolution dot com Here the easiest script I got: DLLs and needed instrcutions were sent by email the 16th dec. at 11:58 European time. (Subject DLLs for Bug #26632) Hope this help. Would be nice to see this bug solved! load("c:\\A.iQmod"); $numScans = $iQlib->getNumScans(); echo "Nb of scans:{$numScans}\r\n"; for($i = 0; $i < $numScans; $i++) { $objIf = $iQlib->getScanObject($i); $scanName = $objIf->getName(); echo " Scan {$i}:&nsp;{$scanName}\r\n"; $x = VARIANT(0.0, VT_R8 | VT_BYREF); $y = VARIANT(0.0, VT_R8 | VT_BYREF); $z = VARIANT(0.0, VT_R8 | VT_BYREF); $scanIf = $objIf->getScanObjSpecificIf(); $scanIf->getPosition($x, $y, $z, false); } //$iQlib->Release(); $iQlib = null; } catch (exception $e) { echo ""; print_r($e); echo ""; } ?> [2003-12-16 05:39:31] [EMAIL PROTECTED] Please send the dll to [EMAIL PROTECTED] along with appropriate installation instructions and the smallest reproducing script. [2003-12-16 05:36:55] Regis dot Derimay at iQvolution dot com Hi. try and catch does not work. It still crash. I will now try to reduce the source as much as possible to a few lines of codes so you can reproduce it. The source code of our module is not available but I could send you the needed dll, so you can test it. To which email should I send the dlls? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/26632 -- Edit this bug report at http://bugs.php.net/?id=26632&edit=1
#26632 [Fbk->Opn]: Problem calling COM interface methods
ID: 26632 User updated by: Regis dot Derimay at iQvolution dot com Reported By: Regis dot Derimay at iQvolution dot com -Status: Feedback +Status: Open Bug Type: COM related Operating System: Windows XP Professional PHP Version: 5CVS New Comment: Here the easiest script I got: DLLs and needed instrcutions were sent by email the 16th dec. at 11:58 European time. (Subject DLLs for Bug #26632) Hope this help. Would be nice to see this bug solved! load("c:\\A.iQmod"); $numScans = $iQlib->getNumScans(); echo "Nb of scans:{$numScans}\r\n"; for($i = 0; $i < $numScans; $i++) { $objIf = $iQlib->getScanObject($i); $scanName = $objIf->getName(); echo " Scan {$i}:&nsp;{$scanName}\r\n"; $x = VARIANT(0.0, VT_R8 | VT_BYREF); $y = VARIANT(0.0, VT_R8 | VT_BYREF); $z = VARIANT(0.0, VT_R8 | VT_BYREF); $scanIf = $objIf->getScanObjSpecificIf(); $scanIf->getPosition($x, $y, $z, false); } //$iQlib->Release(); $iQlib = null; } catch (exception $e) { echo ""; print_r($e); echo ""; } ?> Previous Comments: [2003-12-16 05:39:31] [EMAIL PROTECTED] Please send the dll to [EMAIL PROTECTED] along with appropriate installation instructions and the smallest reproducing script. [2003-12-16 05:36:55] Regis dot Derimay at iQvolution dot com Hi. try and catch does not work. It still crash. I will now try to reduce the source as much as possible to a few lines of codes so you can reproduce it. The source code of our module is not available but I could send you the needed dll, so you can test it. To which email should I send the dlls? [2003-12-16 04:36:12] [EMAIL PROTECTED] Please try it without the reference flags: try { $x = new Variant(0.0); $y = new Variant(0.0); $z = new Variant(0.0); $sphere->getPosition($x, $y, $z, false); } catch (exception $e) { print_r($e); } If that doesn't work, can you please be more specific about what is going wrong (does it crash or does it throw an exception?). Please also include details about the "function that did not crash before (without the use of references)". Ideally, I want to be able to reproduce this on my machine here so I can debug it; is the component you are using publically available? (source preferred). [2003-12-16 03:57:34] Regis dot Derimay at iQvolution dot com No I was not. Now I tested it. It is still crashing, also in function in which it did not crash before (without use of references) [2003-12-16 03:07:48] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Are you using the latest CVS snapshot..? The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/26632 -- Edit this bug report at http://bugs.php.net/?id=26632&edit=1
#26632 [Fbk->Opn]: Problem calling COM interface methods
ID: 26632 User updated by: Regis dot Derimay at iQvolution dot com Reported By: Regis dot Derimay at iQvolution dot com -Status: Feedback +Status: Open Bug Type: COM related Operating System: Windows XP Professional PHP Version: 5CVS New Comment: Hi. try and catch does not work. It still crash. I will now try to reduce the source as much as possible to a few lines of codes so you can reproduce it. The source code of our module is not available but I could send you the needed dll, so you can test it. To which email should I send the dlls? Previous Comments: [2003-12-16 04:36:12] [EMAIL PROTECTED] Please try it without the reference flags: try { $x = new Variant(0.0); $y = new Variant(0.0); $z = new Variant(0.0); $sphere->getPosition($x, $y, $z, false); } catch (exception $e) { print_r($e); } If that doesn't work, can you please be more specific about what is going wrong (does it crash or does it throw an exception?). Please also include details about the "function that did not crash before (without the use of references)". Ideally, I want to be able to reproduce this on my machine here so I can debug it; is the component you are using publically available? (source preferred). [2003-12-16 03:57:34] Regis dot Derimay at iQvolution dot com No I was not. Now I tested it. It is still crashing, also in function in which it did not crash before (without use of references) [2003-12-16 03:07:48] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Are you using the latest CVS snapshot..? [2003-12-16 03:04:47] Regis dot Derimay at iQvolution dot com I forgot to say, that PHP 5 is crashing with this example. [2003-12-15 12:18:09] Regis dot Derimay at iQvolution dot com Description: I call the following in PHP: $x = new VARIANT(0.0, VT_R8 | VT_BYREF); $y = new VARIANT(0.0, VT_R8 | VT_BYREF); $z = new VARIANT(0.0, VT_R8 | VT_BYREF); com_invoke($sphereIf, "getPosition", $x, $y, $z, false); The getPosition function is defined by: interface IiQSphereObjIf : IDispatch { [id(1), helpstring("method getPosition")] HRESULT getPosition([out] double* x, [out] double* y, [out] double* z, [in] VARIANT_BOOL globalTrafo, [out, retval] int* result); }; I get the following error code Warning: com_invoke(): Invoke() failed: Type mismatch. Argument: 2 in ...php It seems to be a problem with the COM module when using functions with paramaters by reference (like x, y and z here). When using normal parameters everything is working well. Expected result: Having x y and z filed with the position. Actual result: -- I get the following error code Warning: com_invoke(): Invoke() failed: Type mismatch. Argument: 2 in ...php -- Edit this bug report at http://bugs.php.net/?id=26632&edit=1
#26632 [Fbk->Opn]: Problem calling COM interface methods
ID: 26632 User updated by: Regis dot Derimay at iQvolution dot com Reported By: Regis dot Derimay at iQvolution dot com -Status: Feedback +Status: Open Bug Type: COM related Operating System: Windows XP Professional PHP Version: 5CVS New Comment: No I was not. Now I tested it. It is still crashing, also in function in which it did not crash before (without use of references) Previous Comments: [2003-12-16 03:07:48] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Are you using the latest CVS snapshot..? [2003-12-16 03:04:47] Regis dot Derimay at iQvolution dot com I forgot to say, that PHP 5 is crashing with this example. [2003-12-15 12:18:09] Regis dot Derimay at iQvolution dot com Description: I call the following in PHP: $x = new VARIANT(0.0, VT_R8 | VT_BYREF); $y = new VARIANT(0.0, VT_R8 | VT_BYREF); $z = new VARIANT(0.0, VT_R8 | VT_BYREF); com_invoke($sphereIf, "getPosition", $x, $y, $z, false); The getPosition function is defined by: interface IiQSphereObjIf : IDispatch { [id(1), helpstring("method getPosition")] HRESULT getPosition([out] double* x, [out] double* y, [out] double* z, [in] VARIANT_BOOL globalTrafo, [out, retval] int* result); }; I get the following error code Warning: com_invoke(): Invoke() failed: Type mismatch. Argument: 2 in ...php It seems to be a problem with the COM module when using functions with paramaters by reference (like x, y and z here). When using normal parameters everything is working well. Expected result: Having x y and z filed with the position. Actual result: -- I get the following error code Warning: com_invoke(): Invoke() failed: Type mismatch. Argument: 2 in ...php -- Edit this bug report at http://bugs.php.net/?id=26632&edit=1