#41078 [Opn->Asn]: Its not possible to call Static dotNet Classes with dotnet
| From: | tony2001@php.net | Date: | Fri, 13 Apr 2007 20:13:48 +0000 |
| Subject: | #41078 [Opn->Asn]: Its not possible to call Static dotNet Classes with dotnet | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-111460@lists.php.net to get a copy of this message | ||
ID: 41078
Updated by: tony2001@php.net
Reported By: mail at brutos dot org
-Status: Open
+Status: Assigned
Bug Type: COM related
Operating System: Windows Vista Ultimate x86
PHP Version: 5CVS-2007-04-13 (snap)
-Assigned To:
+Assigned To: wez
Previous Comments:
------------------------------------------------------------------------
[2007-04-13 17:45:35] mail at brutos dot org
Description:
------------
You can call non static classes like
System.Collections.Stack
or
System.Text.StringBuilder
But no static classes like System.Console.
Reproduce code:
---------------
<?php
$console = new DOTNET("mscorlib", "System.Console");
$console->WriteLine("Hello World!");
?>
Expected result:
----------------
Hello World!
Actual result:
--------------
Fatal error: Uncaught exception 'com_exception' with message 'Failed to
instanti
ate .Net object [CreateInstance] [0x80131513] ' in
C:\Users\Brutos\Desktop\test.php:2
Stack trace:
#0 C:\Users\Brutos\Desktop\test.php(2): dotnet->dotnet('mscorlib',
'System.Console')
#1 {main}
thrown in C:\Users\Brutos\Desktop\test.php on line 2
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41078&edit=1