Problem trying to use DOTNET class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux