Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion RawPrinter.pas
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ ERAWPrinterError = class(ERAWPrinterException);
TRAWPrinter = class(TComponent)
private
fESCList : array[0..ESC_MAX] of string;
{$if CompilerVersion > 18}
fPrnHandle : THandle;
{$ELSE}
fPrnHandle : DWord;
{$ENDIF}
fPrnName : string;
fPrnMode : TRAWPrinterMode;
fPrnStatus : TRAWPrinterStatus;
Expand Down Expand Up @@ -411,7 +415,11 @@ function TRAWPrinter.BeginDoc: boolean;
if (fPrnStatus = rpsClosed) then
begin
if (fPrnName = '') then SetToDefaultPrinter;
if OpenPrinter(PChar(fPrnName), fPrnHandle, nil) then fPrnStatus := rpsOpened
{$if CompilerVersion > 18}
if OpenPrinter(PWideChar(fPrnName), fPrnHandle, nil) then fPrnStatus := rpsOpened
{$ELSE}
if OpenPrinter(PChar(fPrnName), fPrnHandle, nil) then fPrnStatus := rpsOpened
{$ENDIF}
else raise ERAWPrinterError.Create(Format(errPrinterError, [fPrnName]));
end;

Expand Down