Re: Using DLL with PHP

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

 



Dan Shirah wrote:
>  Alrighty, so I went a different route...
> 
> I created my own ActiveX DLL...one that I know I can register.
> 
> Starting out really simple:
> 
> //My VB code
> Public Function hello() As String
> 
>     hello = "Hello World!"
> End Function
> 
> //My PHP code
> <?php
> function Hello() {
> $new_com = new COM("DMStoTIFF.conv");
> $output=$new_com->hello();
> echo $output;}
> Hello();
> ?>
> 
> So, after I register the DLL on the server my PHP page is correctly
> displaying the "Hello World!" dialog.
> 
> What I'm having problems with now is trying to pass a variable to the DLL.
> 
> Shouldn't I be able to do this just like any other PHP class/function?
> 
It doesn't appear that your function accepts a parameter.  What does
this do:

//VB
Public Function hello(ByVal name As String) As String
    hello = "Hello " & name & "!"
End Function

//PHP
echo $new_com->hello("Dan");

-- 
Thanks!
-Shawn
http://www.spidean.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux