Re: Using DLL with PHP

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

 



 MAYBE a little closer to a solution!

//VB for Reference
Private Declare Function DTM_CONVDMSToMultiTIFF Lib "D32_CONV.DLL" _
            (ByVal FullPathFrom As String, ByVal FullPathTo As String) As
Integer

Public Function hello(ByVal name As String) As String

    hello = "Hello" & name & "World!"
End Function
Public Function DMStoTIFFconv(ByVal FullPathFrom As String, ByVal FullPathTo
As String) As String
    Dim DMSconv As Integer
    DMSconv = DTM_CONVDMSToMultiTIFF(FullPathFrom, FullPathTo)
End Function
//PHP Code
<?php
function Hello() {
$new_com = new COM("DMStoTIFF.conv");
$output=$new_com->hello('Happy'); // Call the "hello()" method
echo $output; // Displays Hello World! (so this comes from the dll!)
$convert=$new_com->DMStoTIFFconv('C:\\TEST\\04186177.dms','C:\\TEST\04186177.tif');
}
Hello();
?>

So, previously I was having issues calling the D32_CONV.DLL...
I "think" I am past that now.

If I comment out
$convert=$new_com->DMStoTIFFconv('C:\\TEST\\04186177.dms','C:\\TEST\04186177.tif');
the "Hello Happy World" text prints to the screen no problem.

But when I try to access the VB to call the actual DTM_CONVDMSToMultiTIFF
function I am getting one of two errors. I am either timing out, or getting
a message saying incomplete headers.

The D32_CONV.DLL file is a conversion library that will convert a file from
DMS format to TIF based on two parameters. Since this function is converting
a document, do you think my problem is trying to assign that to the $convert
variable instead of a file output location?

[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