On Wed, Feb 11, 2009 at 1:18 PM, Dan Shirah <mrsquash2@xxxxxxxxx> wrote: > 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? > I wouldn't think it should matter much, but I notice you've got your VB function declared to return a String, and never give it a value. Shouldn't it just return the Integer value that the internal function call is returning? ' VB Function Public Function DMStoTIFFconv(ByVal FullPathFrom As String, ByVal FullPathTo As String) As Integer DMStoTIFFconv = DTM_CONVDMSToMultiTIFF(FullPathFrom, FullPathTo) End Function Also, I'm wondering whether the double-slashes are getting passed into the object method rather than being treated as escape characters. You might try passing one of those values to your Hello() method to make sure they are going into your class correctly. This also doesn't begin to delve into whether the COM object uses the same security context as PHP. I would think so, but that's just a guess. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php