php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6447 Windows COM invalid warning message
Submitted: 2000-08-30 16:50 UTC Modified: 2000-10-09 07:49 UTC
From: Howard dot Cohodas at dkt dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.2 OS: NT4 SP6a
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Howard dot Cohodas at dkt dot com
New email:
PHP Version: OS:

 

 [2000-08-30 16:50 UTC] Howard dot Cohodas at dkt dot 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-07 13:25 UTC] Howard dot Cohodas at dkt dot 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:  %s\n", 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-10-09 07:49 UTC] zeev@php.net
Fixed in the CVS, thanks
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Jun 28 05:00:01 2026 UTC