#41286 [Com]: Variant VT_ARRAY of VT_UI1

From: Date: Thu, 26 Mar 2009 18:53:58 +0000
Subject: #41286 [Com]: Variant VT_ARRAY of VT_UI1
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-135179@lists.php.net to get a copy of this message
ID: 41286 Comment by: kaisellgren at gmail dot com Reported By: milman at gmx dot de Status: Open Bug Type: Feature/Change Request PHP Version: 5.2.2 New Comment: I am experiencing same problems. $rng = new DOTNET("mscorlib", "System.Security.Cryptography.RNGCryptoServiceProvider"); $arr = array(0); $v = new VARIANT($arr,VT_ARRAY | VT_UI1); $rng->GetBytes($v); unset($rng); It throws an error: Fatal error: Uncaught exception 'com_exception' with message 'Variant type conversion failed: Type mismatch. Previous Comments: ------------------------------------------------------------------------ [2007-05-04 17:12:28] milman at gmx dot de Description: ------------ for calling navigate2 you need to pass array of byte. that is not possible. Reproduce code: --------------- <?php $ie = new COM("InternetExplorer.Application"); $ie->Visible = true; $ie->Height = 500 ; $ie->Width = 700 ; $post = array (ord('p'),ord('='),ord('1')) ; $v = new VARIANT($post, VT_ARRAY|VT_UI1); //postdata need to be array of byte $ie->Navigate2("http://host/web/echo_request.php",0,'',$v) ; ?> Expected result: ---------------- posting data to web-server Actual result: -------------- com_exception ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41286&edit=1

« previous php.bugs (#135179) next »