Win32:API

C code :
--------------
int __stdcall my_func( int num ) {

  return num;
}
--------------

.def file
--------------
LIBRARY myfunc
EXPORTS

my_func
--------------

Perl Code :
--------------
use Win32::API;

$function = Win32::API->new( 'myfunc.dll', 'int __stdcall my_func( int num )', 
);
print $function->Call( 15 );
--------------

make sure you export your symbols correctly (.def file in Visual C++ for 
example)

David

Jaroslawsky, Nicholas wrote:
Can anyone help me with an example of a perl script calling a dll on a windows box. What module's support this if there are any and a snippit of code would be helpful. thanks --nick
Confidentiality Note: The information contained in this message, and any
attachments, may contain confidential and/or privileged material. It is intended
solely for the person or entity to which it is addressed. Any review,
retransmission, dissemination, or taking of any action in reliance upon this
information by persons or entities other than the intended recipient is
prohibited. If you received this in error, please contact the sender and delete
the material from any computer.



------------------------------------------------------------------------

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

--
________________________________

VPI - Innovative Radar Solutions
________________________________

David Legault, Ing. jr., M.Sc.A
Radar Consultant, Programmer
Vantage Point International Inc.
400 March Road, Suite 210
Ottawa, Ontario  K2K 3H4
Tel (613) 592-7700 ext 229
Fax (613) 592-7701
E-mail: [EMAIL PROTECTED]
http://www.vantpoint.com
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to