----- Original Message -----
From: "David Legault" <[EMAIL PROTECTED]>
To: "Dev - Perl Win32 Users - MList"
<[email protected]>
Sent: Saturday, July 23, 2005 2:38 AM
Subject: Win32:API Problem
> Hello,
>
> I'm trying to use the Win32:API module to access a DLL function with
> this perl code :
>
> $function = Win32::API->new( 'test.dll', 'int startSimulation(int
> eRunMode)', );
> $return = $function->Call(0);
> print $return;
>
> The C code for the function in the DLL is :
>
> int startSimulation( int eRunMode ) {
>
> return 0;
> }
>
Try rewriting the C code as:
int __stdcall startSimulation( int eRunMode ) {
return 0;
}
Then recompile the dll and try your perl code again. (Works for me.)
Cheers,
Rob
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs