ID: 26632 Updated by: [EMAIL PROTECTED] Reported By: Regis dot Derimay at iQvolution dot com -Status: Wont fix +Status: Open Bug Type: COM related Operating System: Windows XP Professional -PHP Version: 4.3.4 +PHP Version: 5CVS
Previous Comments: ------------------------------------------------------------------------ [2003-12-16 03:06:17] [EMAIL PROTECTED] Get the latest PHP 5 CVS snapshot from http://snaps.php.net/ It has a totally rewritten COM extension which should work a lot better.. (The PHP 4 extension is no longer supported) ------------------------------------------------------------------------ [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-16 03:02:38] Regis dot Derimay at iQvolution dot com This bug has not been solved. At least I could a lot of bugs discussing the problems with passing references but NONE of them is solving the problem. Offen people forget to use new VARIANT with the constant VT_BYREF. In that particular case, I think I pass the correct variant, but it is not working. ALL other functions with parameters not send by ref are working. So please reopen. Thanks ------------------------------------------------------------------------ [2003-12-15 16:53:27] [EMAIL PROTECTED] Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. Try PHP 5..this extension is no longer supported in PHP 4. ------------------------------------------------------------------------ [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