PHP 4.0 Bug #6447 Updated: Windows COM invalid warning message

From: Date: Mon, 09 Oct 2000 11:49:19 +0000
Subject: PHP 4.0 Bug #6447 Updated: Windows COM invalid warning message
Groups: php.dev 
Request: Send a blank email to php-dev+get-34497@lists.php.net to get a copy of this message
ID: 6447 Updated by: zeev Reported By: Howard.Cohodas@dkt.com Status: Closed Bug Type: Scripting Engine problem Assigned To: Comments: Fixed in the CVS, thanks Previous Comments: --------------------------------------------------------------------------- [2000-10-07 13:25:01] Howard.Cohodas@dkt.com Proposed fix provided by Serge Golovin [res@digt.com]. This problem is a show stopper. diff -u COM.c COM.c.new --- COM.c Wed Sep 27 13:06:00 2000 +++ COM.c.new Wed Sep 27 12:24:57 2000 @@ -667,7 +667,6 @@ HRESULT hr; OLECHAR *propname; char *error_message; - VARIANTARG var_result; DISPPARAMS dispparams; VARIANTARG new_value; DISPID mydispid = DISPID_PROPERTYPUT; @@ -698,13 +697,6 @@ LOCALE_SYSTEM_DEFAULT, DISPATCH_PROPERTYPUT, &dispparams, NULL, NULL, 0); - dispparams.cArgs = 0; - dispparams.cNamedArgs = 0; - - hr = i_dispatch->lpVtbl->Invoke(i_dispatch, dispid, &IID_NULL, - LOCALE_SYSTEM_DEFAULT, DISPATCH_PROPERTYGET, - &dispparams, &var_result, NULL, 0); - if (FAILED(hr)) { error_message = php_COM_error_message(hr); php_error(E_WARNING,"PropPut() failed: %sn", error_message); @@ -713,7 +705,7 @@ RETURN_FALSE; } - php_variant_to_pval(&var_result, return_value, 0); + php_variant_to_pval(&new_value, return_value, 0); efree(propname); } --------------------------------------------------------------------------- [2000-08-30 16:50:31] Howard.Cohodas@dkt.com Configuration... php-4.0.2 Server API: ISAPI WinNT4 SP6a HTTP Server: WebSitePro/2.5.4 mySQL: 3.23.22-beta ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <?php $id = new com("otf_GIF32_COM.GIF_Encode"); $id->Company_Name = "Design Knowledge Technologies Inc."; ?> When a property is write-only the following error message results. Warning: PropPut() failed: Invalid number of parameters. The PropPut actually succeeded. Information derived from the write-only property was correct. I recoded the COM and adding a read capability. The warning message is gone. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=6447

« previous php.dev (#34497) next »