Win32:API Printer call - Can anyone fix this (PLEASE READ)
This is what I am exactly trying to do.
The problems with your snippet I found are:
1. Use "Winspool" instead of winspool.drv
2. Use [P,P,P] instead of [P,N,P]
I did all this, but when I run my code I am getting the error:
" Can't call method "Call" without a package or object reference at win32.pl
line 12. "
I realized that the API.PM does not have "Call" method.
I have downloaded WIN32::API from http://dada.perl.it/
If anyone else have downloaded from anywhere else, please let me know.
If anyone already knows about this problem/solution to it please let me
>New to Windows. I got some API calls to work but not this one:
>$function1 = new Win32::API("winspool.drv","OpenPrinter",[P,N,P],N);
>$val2 =(0) x 4;
>$PRINTER = (0) x 4;
>$return = $function1->Call($val1,$PRINTER,$val2);
>print "$return == $PRINTER\n";
>If you can run/fix this please post and/or write me. Thanks.