|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-04-05 06:35 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 07:00:01 2025 UTC |
Description: ------------ I am using PHP 5.1.2 on Apache 2.0. In my PHP code I am trying to set a COM OLE poprerty: $simcase->ObjectValue($inobj1, $inpropname1,"",$inunits1)=$inval1; ($simcase is a COM object) Using: echo $simcase->ObjectValue($inobj1, $inpropname1,"",$inunits1); works fine. Expected result: ---------------- I expected the method to execute and set the property without any problem. According to the type library what I have written is perfectly legal and works with VBScript etc. HRESULT ObjectValue([in] IDispatch* object, [in] BSTR variable, [in,optional] BSTR subVariable, [in,optional] BSTR units, [out, retval] double* value); [helpstring("Sets"),propput,helpcontext(NO_HELP_PANEL)] HRESULT ObjectValue([in] IDispatch* object, [in] BSTR variable, [in,optional] BSTR subVariable, [in,optional] BSTR units, [in] double value); [helpstring("Gets"),propget,helpcontext(NO_HELP_PANEL)] Actual result: -------------- Fatal error: Can't use method return value in write context... With com_set being gone, I cant find any work around. I also found a comment somewhere saying "we cant support ()= so we have "[]=". But what do you do if your property also takes arguments?