|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-03-02 11:44 UTC] e dot vandeoudeweetering at marcanti dot esprit-sg dot
Description: ------------ When COM is used to retrieve an out parameters value in a function call, the value remains empty. See: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/getstringvalue_method_in_class_stdregprov.asp Reproduce code: --------------- $com_reg = new COM("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\default:StdRegProv"); $value = 'old_value'; $com_reg -> getStringValue('subtree', "key\\subkey", 'entryName', $value); print $value; Expected result: ---------------- The value from the registry key 'subtree\key\subkey\entryName' should be printed. Actual result: -------------- The value 'old_value' that is declared earlier in the code is printed. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 15:00:02 2025 UTC |
Please mark this request as BOGUS! Wrap the variable into a variant object, then make the function call: $com_reg = new COM("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\default:StdR egProv"); $value = new VARIANT(); $com_reg -> getStringValue('subtree', "key\\subkey", 'entryName', $value); print $value; see: http://bugs.php.net/bug.php?id=16567 http://www.php.net/variant