Bug #51205 [Fbk->Opn]: Fatal error: com_exception: The parameter is incorrect

[email protected] ("zelnaga at gmail dot com") Fri, 26 Mar 2010 18:47:13 +0100 (CET)
Newsgroups php.bugs
Message-ID <[email protected]>
Edit report at http://bugs.php.net/bug.php?id=51205&edit=1

 ID:               51205
 User updated by:  zelnaga at gmail dot com
 Reported by:      zelnaga at gmail dot com
 Summary:          Fatal error: com_exception: The parameter is incorrect
-Status:           Feedback
+Status:           Open
 Type:             Bug
 Package:          COM related
 Operating System: Windows XP
 PHP Version:      5.3.1

 New Comment:

the $rng->GetBytes($v); line.


Previous Comments:
------------------------------------------------------------------------
[2010-03-15 15:27:30] [email protected]

In what line does this happen?

------------------------------------------------------------------------
[2010-03-04 22:31:57] zelnaga at gmail dot com

Description:
------------
Hi,

I need to use RNGCryptoServiceProvider in PHP.

I have tried:

$rng = new DOTNET("mscorlib",
"System.Security.Cryptography.RNGCryptoServiceProvider");
$arr = array(0);
$v = new VARIANT($arr,VT_ARRAY);
$rng->GetBytes($v);
unset($rng);

The component loads fine.

But I got this error: Fatal error: Uncaught exception 'com_exception'
with message 'Error [0x80070057] The parameter is incorrect.

Any ideas?



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



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51205&edit=1