Re: Llamar una DLL desde PHP
| From: | Francisco José Padilla Castillo | Date: | Fri, 18 Jun 2004 08:07:07 +0000 |
| Subject: | Re: Llamar una DLL desde PHP | ||
| References: | 1 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-49485@lists.php.net to get a copy of this message | ||
Bueno, a lo mejor te voy a decir una bobería, pero en tu script pones foo.bar o
el nombre de la dll que has creado?????
Saludos
> Hola,
> he encontrado en esta web un ejemplo en donde se explica como escribir
> una dll en Visual Basic para luego llamarla desde PHP como un objeto COM:
>
> #####################################################################
> Simple example for creating your own dll's which can be called as COM
> objects in PHP:
>
> First create your ActiveX dll (Visual Basic):
> Name your project as "foo" and class as "bar".
>
> '---start VB code---
> Public Function hello() As String
> hello = "Hello World!"
> End Function
> '---end VB code---
>
> Then make the dll and register it with regsvr32.exe
>
> Now create your PHP script:
>
> 1| <?php
> 2| $obj = new COM("foo.bar");
> 3| $output=$obj->hello(); // Call the "hello()" method
> 4| echo $output; // Displays Hello World! (so this comes from the dll!)
> 5| ?>
> #####################################################################
>
> He intentado hacer funcionar este ejemplo pero no lo he conseguido.
> Primero escribo la dll y luego la registro sin problemas, pero despues
> al ejecutar el script PHP recibo un WARNING en la linea 2 (al crear el
> objeto COM) que me dice "Invalid ProgID, GUID string or Moniker:
> Sintaxis no valida."
> ¿Alguien sabria decirme que estoy haciendo mal?
> Gracias.
>
> --
> PHP Spanish Localization Talk Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.