Problem trying to use DOTNET class

"Peter Facey" <[email protected]>
Newsgroups gmane.comp.php.windows
Message-ID <[email protected]>
I can't get

$serial = new DOTNET('System', 'System.IO.Ports.SerialPort');

to work because it always says "PHP Fatal error:  Uncaught exception
'com_exception' with message 'Failed to instantiate .Net object
[CreateInstance] [0x80070002] The system cannot find the file specified." It
does this even if I use a fully qualified assembly name such as

$serial = new DOTNET('System.IO.Ports, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=a8425bc35256e463', 'System.IO.Ports.SerialPort');

Thinking I had got the above info wrong, I asked on the Microsoft .NET forum
but they cannot suggest better info
(see
http://social.msdn.microsoft.com/Forums/vstudio/en-US/683a5e94-50fe-49c3-abd
b-f23856d2f5f0/problem-with-getting-php-to-instantiate-net-object )

Two questions:
1) There is some uncertainty in the PHP manual as to whether I should be
using the DOTNET class or the dotnet_load function. The former only to be
found via the 2 year old comment from Rudi Lippert (see
http://uk3.php.net/manual/en/function.dotnet-load.php )
Which should I use please?
2) Any idea what I am doing wrong?

Fails in PHP 5.3.6 and 5.5.0
I have .NET 2.0, 3.0, 3.5 and 4 installed on my Windows 7 64-bit PC (of
course PHP is running in 32-bit mode).
I have read elsewhere that PHP dotnet doesn't work with .NET v4, hence why I
was trying to use v2.

regards


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.