[PHP-DEV] Bug #11658 Updated: Getting values by reference don't work From: andrej.aschenbrenner <email protected>
Date: 06/28/01

ID: 11658
User Update by: andrej.aschenbrenner <email protected>
Old-Status: Closed
Status: Open
Bug Type: COM related
Operating system: Windows NT 4.0 SP 6
PHP Version: 4.0.6
Description: Getting values by reference don't work

still closed?

Previous Comments:
---------------------------------------------------------------------------

[2001-06-27 04:16:21] andrej.aschenbrenner <email protected>
It didn't work!
I get this:

Warning: Invoke() failed: Typ paßt nicht.
in D:wwwwebzeapplicationindex.php on line 10

translated: ...: Type mismatch.

Line 10 looks like this:
$instance->CheckLogin($user, COM_REMOTE_SERVER, $allowed);

I have tried all of the combinations I could think of,
VT_UI1|BYREF, VT_UI2|BYREF, VT_UI4|BYREF, VT_I1|BYREF,
VT_I2|BYREF, VT_I4|BYREF, VT_INT|BYREF, VT_UINT|BYREF
It doesn't matter. I get always the same type mismatch warning.

Note that the variable $allowed in the function of the
COM-Object is defined as "long".

Please help me to get this working.

---------------------------------------------------------------------------

[2001-06-26 10:19:19] phanto <email protected>
closed

---------------------------------------------------------------------------

[2001-06-26 10:19:03] phanto <email protected>
$user = "test_user";
$allowed = new VARIANT(8, VT_I4|VT_BYREF);

$instance = new COM("dll.CObject") or die("Unable to
instanciate dll.CObject");
$instance->CheckLogin($user, COM_REMOTE_SERVER, $allowed);

echo $allowed->value;

/* you can use $allowed->type to check it against
 * VT_* constants
 * look into the php documentation for more flags
 * passing variables by reference is a deprecated
 * zend feature (i don't know why) and it didn't work
 * in every case in earlier versions.
 */

---------------------------------------------------------------------------

[2001-06-26 07:00:49] sniper <email protected>
The #11660 was already bogused. Reopened this one.

---------------------------------------------------------------------------

[2001-06-25 17:21:56] jeroen <email protected>
Was submitted twice. Dup. of 11660

---------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online.

Full Bug description available at: http://bugs.php.net/?id=11658

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>