Apr 25, 2008, 6:39 AM
Post #3 of 4
I managed to install the Win32 and Win32API. I am running Perl 5.10.
The problem i am know running into is getting it to see the dll file.
I know win32 is functioning correctly as i am able to display the PID by loading the sytem32 dll and calling the function getCurrentPID.
Win32::API->Import("kernel32", "int GetCurrentProcessId()");
$PID = GetCurrentProcessId();
print "Current PID is => " . $PID . "\n";
but when i try
$GetFreeBoards = Win32::API->Import("myDLL.dll", 'int GetFreeBoards(long nBrdsToGet, long* nBrds, char* ListNames)',);
It does not work and i print out $^E to see what errors i am getting as the import returns 0 which is fail.
$^E returns always "The specified procedure could not be found"
I have tried using "new" instead of "import" and i get the same problem. which brings me to the conclusion it is not reading the dLL file. i have regsvr32 "myDLL.dll" and have it placed in the same directory as the perl file and i still get this same problem.
Any ideas or suggestions?