RE: [fpc-pascal]Linking to Windows

2003-02-05 Thread Matt D. Emson
function OpenPrinter(pPrinterName: PChar; var phPrinter: THandle; pDefault: PPrinterDefaults): BOOL; stdcall;external 'winspool.drv' name 'OpenPrinterA'; Will work. Matt > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] On Behalf Of > Hans Mårtensson > Se

Re[2]: [fpc-pascal]Linking to Windows

2003-02-05 Thread Konstantin G. Khlebnikov
HM> This gives linking error during compilation because it has not been defined HM> what to link with. A NAME can be added after the word 'external', but then HM> I need to know the name of the DLL that includes the OpenPrinter function. I think in "winspool.drv" :) http://msdn.microsoft.com/lib

Re: [fpc-pascal]Linking to Windows

2003-02-05 Thread Hans Mårtensson
At 02:00 05-02-2003 +0100, you wrote: >please post the 'uses' clauses and the function declaration from your source. >that should make it easier. > >anton. > Here is a test program I have used: program x_prog; {$APPTYPE GUI} uses windows; var pPrinter: LPHANDLE; prd: PRINTER_DEFAULTS; Procedu

Re: [fpc-pascal]Linking to Windows

2003-02-05 Thread Hans Mårtensson
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,

[fpc-pascal]Errors?

2003-02-05 Thread Ziegenhorn Tourism Database
Hello, maybe I have seen two errors in 1.0.6 (Linux): Program Test; {$R+} Var ch : 'A'..'C'; begin writeln('Hello'); ch:=char(75); writeln(ch); end. Should give a range check error, I think. Function GetType : longint; Var ix : longint; begin {..} GetType:=123; {...} ix:=G