[fpc-pascal]Missing Win32 API Function -- Part 2

Full_Name memsom at post.interalpha.co.uk
Fri Aug 9 10:44:03 CEST 2002


Quoting Micha³ Bartoszkiewicz <embe at magma-net.pl>:

> The correct declaration would be:
> Function EnumPrinters (Flags: dword; Name: pchar; Level: dword;
> pPrinterEnum: pointer;
>          cbBuf: dword; var pcbNeeded, pcReturned: dword): bool; stdcall;
> 
>          external 'winspool' name 'EnumPrintersA';

This is basically what Delphi 5 uses too, so I would have to concur. I didn't 
use your declaration when I tested it (silly of me) I just used 'winspool' and 
the function was defined already. The above declaration with your original code 
works in Delphi anyway.

Matt
--

"Computer games don't affect kids; I mean if Pac-Man affected us as kids, 
we'd all be running around in darkened rooms, munching magic pills and 
listening to repetitive electronic music." 
Kristian Wilson, 
Nintendo, Inc, 1989

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d? s+++:+ a- C++ UL+ P L++ E---- W- N+ o+ K- w 
O- M V PS PE-- Y PGP- t- 5-- X- R- tv+ b+ DI++ D+ 
G e++ h--- r+++ y+++ 
------END GEEK CODE BLOCK------




More information about the fpc-pascal mailing list