[fpc-pascal]Linking to Windows

Matt D. Emson matt at Diplomat.co.uk
Wed Feb 5 17:23:01 CET 2003


function OpenPrinter(pPrinterName: PChar; var phPrinter: THandle; pDefault: PPrinterDefaults): BOOL; stdcall;    external 'winspool.drv' name 'OpenPrinterA';

Will work.

Matt

> -----Original Message-----
> From: fpc-pascal-admin at deadlock.et.tudelft.nl 
> [mailto:fpc-pascal-admin at deadlock.et.tudelft.nl] On Behalf Of 
> Hans MÃ¥rtensson
> Sent: 05 February 2003 14:58
> To: fpc-pascal at deadlock.et.tudelft.nl
> Subject: Re: [fpc-pascal]Linking to Windows
> 
> 
> At 19:10 04-02-2003 -0500, you wrote:
> >
> >You can get the SDK help files from Borland:
> >
> >ftp://ftp.borland.com/pub/delphi/techpubs/delphi3/d3ms.zip
> >
> >Be warned, this is a 15M download.
> >
> >Rolf Grunsky
> 
> Thank you for the link, but I have allready got these help 
> files allthough in an older version, and they don't include 
> the information of DLL names and indices.
> 
> My problem is that I want to use some win32 functions that 
> are not included in the FreePascal Windows unit, e. g. 
> OpenPrinter or SetPrinter. According to the FreePascal 
> Programmers' manual (ch. 4.1) the easyist way to do this is  
> declaring an external procedure. But then you have to know 
> the name of the DLL and the index where the function resides. 
> The Borland help files have all the information of the win32 
> functions except in which DLLs they resides.
> 
> Hans M.
> 
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org 
> http://lists.freepascal.org/mailman/listinfo/f> pc-pascal
> 




More information about the fpc-pascal mailing list