muzakfetch has asked for the wisdom of the Perl Monks concerning the following question:

To anyone's knowledge, using perl, is there a way to enumerate what functions are available in a .DLL?

Also, I'm trying to write a simple interface to run SQR reports that a vendor has supplied. The method they have for running these reports requires a user to sit in front of their computer and click buttons.

So I've found VB people who have done things like this:

Declare Function sqr Lib "sqrw.dll" (ByVal sString As String) As Integ +er Declare Function sqrend Lib "sqrw.dll" () As Integer private sub SQR_Procedure dim nResult as integer dim sString as string sString = sTempPath & "Temp.SQR <put your dblogon info here> -E<filename of error listing goes here> -M<allmaxes.max directory goes here> -O<error log directory goes here -XCB -ZMF<sqrerr.dat directory goes here>" nResult = sqr(sString) nResult = sqrend() ' Make sure you call sqrend after you're done end sub
However, since I dont like VB I'm trying to do it somewhat better in Perl:

use warnings; use strict; use Win32::API; my $sqr = new Win32::API->( 'sqrwt', 'sqrt', 'P', 'N' ) || die $!; my $sqrend = new Win32::API->('sqrwt', 'sqrend', '', 'N' ) || die $!; my $return = $sqr->Call( "Db_info.sqt USERNAME/PASSWORD@DBNAME -XCB -E +test.err"); warn $return if $return; $return = $sqrend->Call(); warn $return if $return;
Which returns:

Use of unitialized value in subroutine entry at sqrt_test.pl line 7 <DATA> line 164
Can't use string("") as a subroutine ref while "strict refs" in use at sqrt_test.pl line 7, <DATA> line 164

I assume that it complains because I'm not calling a function that exists in the .DLL?

Unix is so much easier. Bleh.

muzakfetch