Commit 36541e78 authored by kravtsov's avatar kravtsov

[-] Исправлены некоторые ошибки

parent 49244456
......@@ -6,8 +6,8 @@
*******************************************************************
OposShtrih_1.13_493.exe
30 мая 2018 20:40
OposShtrih_1.13_494.exe
1 июня 2018 16:00
[-] Исправлены некоторые ошибки
......
......@@ -5,8 +5,10 @@ interface
uses
// VCL
Classes, SysUtils,
// OPOS
Opos, Oposhi, OposException,
// This
Opos, Oposhi, OposException;
GNUGetText;
type
{ TOposDate }
......@@ -34,64 +36,6 @@ function PowerNotifyToStr(Value: Integer): WideString;
const
CRLF = #13#10;
S_OPOS_OR_ALREADYOPEN = ' ';
S_OPOS_OR_REGBADNAME = ' ';
S_OPOS_OR_REGPROGID =
' , ' + CRLF +
' Prog ID Class ID';
S_OPOS_OR_CREATE =
' , ' + CRLF +
' IDispatch';
S_OPOS_OR_BADIF =
' , ' + CRLF +
' ';
S_OPOS_OR_FAILEDOPEN =
' , ' + CRLF +
' ';
S_OPOS_OR_BADVERSION =
' 1';
S_OPOS_ORS_NOPORT =
' , ';
S_OPOS_ORS_NOTSUPPORTED =
' ';
S_OPOS_ORS_CONFIG =
' ';
S_OPOS_ORS_SPECIFIC =
' ';
S_UNKNOWN_CODE = ' ';
(*
S_OPOS_OR_ALREADYOPEN = 'Control Object already open';
S_OPOS_OR_REGBADNAME =
'The registry does not contain a key for the specified device name';
S_OPOS_OR_REGPROGID =
'Could not read the device name key''s default value, or' + CRLF +
'could not convert this Prog ID to a valid Class ID';
S_OPOS_OR_CREATE =
'Could not create a service object instance, or ' + CRLF +
'could not get its IDispatch interface';
S_OPOS_OR_BADIF =
'The service object does not support one or more of the' + CRLF +
'method required by its release';
S_OPOS_OR_FAILEDOPEN =
'The service object returned a failure status from its' + CRLF +
'open call, but doesn''t have a more specific failure code';
S_OPOS_OR_BADVERSION =
'The service object major version number is not 1';
S_OPOS_ORS_NOPORT =
'Port access required at open, but configured port' + CRLF +
'is invalid or inaccessible';
S_OPOS_ORS_NOTSUPPORTED =
'Service Object does not support the specified device';
S_OPOS_ORS_CONFIG =
'Configuration information error';
S_OPOS_ORS_SPECIFIC =
'Errors greater than this value are SO-specific';
S_UNKNOWN_CODE = 'Unknown code';
*)
implementation
function GetCommonPropertyName(const ID: Integer): WideString;
......@@ -218,19 +162,40 @@ end;
function GetOpenResultText(Value: Integer): WideString;
begin
case Value of
OPOS_OR_ALREADYOPEN : Result := S_OPOS_OR_ALREADYOPEN;
OPOS_OR_REGBADNAME : Result := S_OPOS_OR_REGBADNAME;
OPOS_OR_REGPROGID : Result := S_OPOS_OR_REGPROGID;
OPOS_OR_CREATE : Result := S_OPOS_OR_CREATE;
OPOS_OR_BADIF : Result := S_OPOS_OR_BADIF;
OPOS_OR_FAILEDOPEN : Result := S_OPOS_OR_FAILEDOPEN;
OPOS_OR_BADVERSION : Result := S_OPOS_OR_BADVERSION;
OPOS_ORS_NOPORT : Result := S_OPOS_ORS_NOPORT;
OPOS_ORS_NOTSUPPORTED : Result := S_OPOS_ORS_NOTSUPPORTED;
OPOS_ORS_CONFIG : Result := S_OPOS_ORS_CONFIG;
OPOS_ORS_SPECIFIC : Result := S_OPOS_ORS_SPECIFIC;
OPOS_OR_ALREADYOPEN : Result :=
_('Control Object already open');
OPOS_OR_REGBADNAME : Result :=
_('The registry does not contain a key for the specified device name');
OPOS_OR_REGPROGID : Result :=
_('Could not read the device name key''s default value, or could not convert this Prog ID to a valid Class ID');
OPOS_OR_CREATE : Result :=
_('Could not create a service object instance, or could not get its IDispatch interface');
OPOS_OR_BADIF : Result :=
_('The service object does not support one or more of the method required by its release');
OPOS_OR_FAILEDOPEN : Result :=
_('The service object returned a failure status from its open call, but doesn''t have a more specific failure code');
OPOS_OR_BADVERSION : Result :=
_('The service object major version number is not 1');
OPOS_ORS_NOPORT : Result :=
_('Port access required at open, but configured port is invalid or inaccessible');
OPOS_ORS_NOTSUPPORTED : Result :=
_('Service Object does not support the specified device');
OPOS_ORS_CONFIG : Result :=
_('Configuration information error');
OPOS_ORS_SPECIFIC : Result :=
_('Errors greater than this value are SO-specific');
else
Result := S_UNKNOWN_CODE;
Result := _('Unknown code');
end;
end;
......
......@@ -115,7 +115,7 @@ AutoIncBuild=1
MajorVer=1
MinorVer=13
Release=0
Build=537
Build=538
Debug=0
PreRelease=0
Special=0
......@@ -126,7 +126,7 @@ CodePage=1252
[Version Info Keys]
CompanyName=SHTRIH-M
FileDescription=OPOS setup utility
FileVersion=1.13.0.537
FileVersion=1.13.0.538
InternalName=OPOS setup
LegalCopyright=SHTRIH-M 2013
LegalTrademarks=
......
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,13,0,493
PRODUCTVERSION 1,13,0,493
FILEVERSION 1,13,0,494
PRODUCTVERSION 1,13,0,494
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x4L
......@@ -13,7 +13,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "SHTRIH-M\0"
VALUE "FileDescription", "OPOS setup utility\0"
VALUE "FileVersion", "1.13.0.493\0"
VALUE "FileVersion", "1.13.0.494\0"
VALUE "InternalName", "OPOS setup \0"
VALUE "LegalCopyright", "SHTRIH-M \251 2013 \0"
VALUE "OriginalFilename", "OposConfig.exe\0"
......
[Closed Files]
File_0=SourceModule,'C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\MockSharedPrinter.pas',0,1,576,67,614,0,0
File_1=SourceModule,'C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\TextFiscalPrinterDevice.pas',0,1,1414,29,1434,0,0
File_2=SourceModule,'C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\MockFiscalPrinterDevice.pas',0,1,1426,3,1445,0,0
File_3=SourceModule,'C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\Units\duRetalix.pas',0,1,138,44,147,0,0
File_4=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\Retalix.pas',0,1,277,1,286,0,0
File_5=SourceModule,'C:\projects\OPOSShtrih\Source\Shared\LogFile.pas',0,1,214,28,223,0,0
File_6=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\VSysUtils.pas',0,1,2,39,10,0,0
File_7=SourceModule,'c:\program files (x86)\borland\delphi7\source\rtl\Win\Windows.pas',0,1,28818,1,28830,0,0
File_8=SourceModule,'C:\projects\OPOSShtrih\Source\Shared\BStdUtil.pas',0,1,95,65,119,0,0
File_9=SourceModule,'C:\projects\OPOSShtrih\Source\Shared\FileUtils.pas',0,1,1,1,1,0,0
File_0=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterTypes.pas',0,1,353,1,376,0,0
File_1=SourceModule,'C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterDevice.pas',0,1,5076,1,5096,0,0
File_2=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Fmu\fmuFptrReceipt.pas',0,1,38,5,43,1,0
File_3=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Units\PrinterTest.pas',0,1,1029,47,1039,0,0
File_4=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Fmu\fmuFptrAddHeaderTrailer.pas',0,1,37,27,45,0,0
File_5=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Units\OPOSDate.pas',0,1,22,45,27,0,0
File_6=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Fmu\fmuFptrFiscalReports.pas',0,1,81,103,89,1,1
File_7=SourceModule,'C:\projects\OPOSShtrih\Source\OposTest\Fmu\fmuFptrDirectIO.pas',0,1,1,1,1,1,0
File_8=SourceModule,'C:\projects\OPOSShtrih\Source\SmFptrSrv\Units\oleMain.pas',0,124,1,201,11,0,0
[Modules]
Count=0
EditWindowCount=0
Module0=C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas
Count=1
EditWindowCount=1
TypeLibWindowCount=3
[C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\SmFiscalPrinterTest.dpr]
[C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas]
ModuleType=SourceModule
FormState=0
FormOnTop=0
......@@ -63,6 +64,10 @@ FormOnTop=0
FormState=0
FormOnTop=0
[C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\SmFiscalPrinterTest.dpr]
FormState=0
FormOnTop=0
[C:\projects\OPOSShtrih\Test\SmFiscalPrinterTest\SmFiscalPrinterTestLib.dpr]
FormState=0
FormOnTop=0
......@@ -87,6 +92,40 @@ FormOnTop=0
FormState=0
FormOnTop=0
[EditWindow0]
ViewCount=1
CurrentView=0
View0=0
CodeExplorer=CodeExplorer@EditWindow0
MessageView=MessageView@EditWindow0
Create=1
Visible=1
State=2
Left=324
Top=138
Width=1302
Height=682
MaxLeft=-8
MaxTop=106
MaxWidth=1936
MaxHeight=952
ClientWidth=1920
ClientHeight=914
LeftPanelSize=0
LeftPanelClients=CodeExplorer@EditWindow0
LeftPanelData=00000400010000000C000000436F64654578706C6F7265720000000000000000000000000000000000FFFFFFFF
RightPanelSize=0
BottomPanelSize=0
BottomPanelClients=MessageView@EditWindow0
BottomPanelData=00000400010000000B0000004D657373616765566965770000000000000000000000000000000000FFFFFFFF
[View0]
Module=C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas
CursorX=86
CursorY=1885
TopLine=1874
LeftCol=1
[TypeLibEditWindow0]
Create=1
Visible=0
......@@ -157,10 +196,14 @@ LRDockWidth=320
Dockable=1
[Breakpoints]
Count=3
Count=7
Breakpoint0='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\CustomReceipt.pas',160,'',0,1,'',1,0,0,'',1,'','',''
Breakpoint1='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\MalinaPlugin.pas',194,'',0,1,'',1,0,0,'',1,'','',''
Breakpoint2='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',3739,'',0,1,'',1,0,0,'',1,'','',''
Breakpoint2='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',2026,'',0,1,'',1,0,0,'',1,'','',''
Breakpoint3='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',2037,'',0,1,'',1,0,0,'',1,'','',''
Breakpoint4='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',2052,'',0,1,'',1,0,0,'',1,'','',''
Breakpoint5='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',2066,'',0,1,'',1,0,0,'',1,'','',''
Breakpoint6='C:\projects\OPOSShtrih\Source\SmFiscalPrinter\Units\FiscalPrinterImpl.pas',2011,'',0,1,'',1,0,0,'',1,'','',''
[AddressBreakpoints]
Count=0
......@@ -184,14 +227,14 @@ ClientHeight=84
Create=1
Visible=1
State=0
Left=8
Top=124
Width=517
Height=429
Left=0
Top=115
Width=528
Height=621
MaxLeft=-1
MaxTop=-1
ClientWidth=501
ClientHeight=395
ClientWidth=512
ClientHeight=587
TBDockHeight=681
LRDockWidth=445
Dockable=0
......@@ -413,6 +456,38 @@ Column2Width=545
EntryPointPane=225
CompUnitPane=104
[CodeExplorer@EditWindow0]
Create=1
Visible=0
State=0
Left=-128
Top=-6
Width=140
Height=305
MaxLeft=-1
MaxTop=-1
ClientWidth=140
ClientHeight=305
TBDockHeight=305
LRDockWidth=140
Dockable=1
[MessageView@EditWindow0]
Create=1
Visible=0
State=0
Left=-134
Top=-705
Width=443
Height=85
MaxLeft=-1
MaxTop=-1
ClientWidth=443
ClientHeight=85
TBDockHeight=85
LRDockWidth=443
Dockable=1
[DockHosts]
DockHostCount=1
......@@ -436,5 +511,5 @@ DockClients=CallStackWindow
DockSiteData=0000040000000000D20100000000000001DF03000000000000010000000087000000000000000100000002D2010000000000000200000000DF0300000F00000043616C6C537461636B57696E646F770200000000F7010000000000000100000000080100000000000001000000008C010000000000000100000000100200000000000001000000009802000000000000FFFFFFFF
[ActiveProject]
ActiveProject=2
ActiveProject=3
......@@ -55,7 +55,7 @@ begin
if Command = DIO_CUSTOM_COMMAND then
Command := StrToInt(edtCustomCommand.Text);
pString := edtInString.Text;
pData := StrToInt(edtData.Text);
pData := StrToIntDef(edtData.Text, 0);
Result := FiscalPrinter.DirectIO(Command, pData, pString);
if Result = OPOS_SUCCESS then
begin
......
object fmFptrReceipt: TfmFptrReceipt
Left = 434
Top = 220
Left = 940
Top = 196
AutoScroll = False
Caption = 'Fiscal Receipt'
ClientHeight = 270
......
......@@ -36,19 +36,11 @@ implementation
{$R *.DFM}
procedure TfmFptrReceipt.btnBeginFisclReceiptClick(Sender: TObject);
var
AdditionalHeader: WideString;
begin
EnableButtons(False);
try
FiscalPrinter.FiscalReceiptStation := cbFiscalReceiptStation.ItemIndex + 1;
FiscalPrinter.FiscalReceiptType := cbFiscalReceiptType.ItemIndex + 1;
AdditionalHeader :=
'**** AdditionalHeader Line 1 ****' + #13#10 +
'**** AdditionalHeader Line 2 ****';
FiscalPrinter.AdditionalHeader := AdditionalHeader;
FiscalPrinter.BeginFiscalReceipt(chbPrintHeader.Checked);
finally
EnableButtons(True);
......
......@@ -115,7 +115,7 @@ AutoIncBuild=1
MajorVer=1
MinorVer=13
Release=0
Build=524
Build=525
Debug=0
PreRelease=0
Special=0
......@@ -126,7 +126,7 @@ CodePage=1252
[Version Info Keys]
CompanyName=SHTRIH-M
FileDescription=OPOS test utility
FileVersion=1.13.0.524
FileVersion=1.13.0.525
InternalName=OPOS test
LegalCopyright=SHTRIH-M 2013
LegalTrademarks=
......
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,13,0,493
PRODUCTVERSION 1,13,0,493
FILEVERSION 1,13,0,494
PRODUCTVERSION 1,13,0,494
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x4L
......@@ -13,7 +13,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "SHTRIH-M\0"
VALUE "FileDescription", "OPOS test utility\0"
VALUE "FileVersion", "1.13.0.493\0"
VALUE "FileVersion", "1.13.0.494\0"
VALUE "InternalName", "OPOS test\0"
VALUE "LegalCopyright", "SHTRIH-M \251 2013 \0"
VALUE "OriginalFilename", "OposTest.exe\0"
......
......@@ -7,7 +7,7 @@ uses
DeviceService;
const
GenericServiceVersion = deviceVersion113 + 493;
GenericServiceVersion = deviceVersion113 + 494;
implementation
......
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,13,0,493
PRODUCTVERSION 1,13,0,493
FILEVERSION 1,13,0,494
PRODUCTVERSION 1,13,0,494
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x4L
......@@ -13,7 +13,7 @@ BEGIN
BEGIN
VALUE "CompanyName", "SHTRIH-M\0"
VALUE "FileDescription", "Fiscal printer service\0"
VALUE "FileVersion", "1.13.0.493\0"
VALUE "FileVersion", "1.13.0.494\0"
VALUE "InternalName", "Fiscal printer driver\0"
VALUE "LegalCopyright", "SHTRIH-M \251 2013 \0"
VALUE "OriginalFilename", "SmFiscalPrinter.dll\0"
......
......@@ -10,7 +10,7 @@ uses
// Indy
IdTcpClient, IdGlobal,
// This
LogFile, StringUtils, DriverError;
LogFile, StringUtils, DriverError, GNUGetText;
const
/////////////////////////////////////////////////////////////////////////////
......@@ -32,14 +32,6 @@ const
E_SALE_NOT_ENABLED = 205; //
E_TAG_NOT_FOUND = 206; //
const
SEKMSRV_GENERIC_ERROR = ' ';
SEKMSRV_NOT_IMPLEMENTED = ' ';
SEKMSRV_UNSUPPORTED_TYPE = ' ';
SEKMSRV_UNSUPPORTED_VERSION = ' ';
SEKMSRV_UNKNOWN_ERROR = ' ';
type
{ TEkmServerRequest }
......@@ -163,16 +155,24 @@ begin
begin
case Response.Status of
EKMSRV_GENERIC_ERROR:
raiseError(E_KMSRV_GENERIC_ERROR, Tnt_WideFormat('%s %s', ['EKMSRV:' + SEKMSRV_GENERIC_ERROR]));
raiseError(E_KMSRV_GENERIC_ERROR, Tnt_WideFormat('%s %s', [
'EKMSRV:' + _('General error')]));
EKMSRV_NOT_IMPLEMENTED:
raiseError(E_KMSRV_NOT_IMPLEMENTED, Tnt_WideFormat('%s %s', ['EKMSRV: ' + SEKMSRV_NOT_IMPLEMENTED]));
raiseError(E_KMSRV_NOT_IMPLEMENTED, Tnt_WideFormat('%s %s', [
'EKMSRV: ' + _('Not implemented')]));
EKMSRV_UNSUPPORTED_TYPE:
raiseError(E_KMSRV_UNSUPPORTED_TYPE, Tnt_WideFormat('%s %s', ['EKMSRV: ' + SEKMSRV_UNSUPPORTED_TYPE]));
raiseError(E_KMSRV_UNSUPPORTED_TYPE, Tnt_WideFormat('%s %s', [
'EKMSRV: ' + _('Unsupported type')]));
EKMSRV_UNSUPPORTED_VERSION:
raiseError(E_KMSRV_UNSUPPORTED_VERSION, Tnt_WideFormat('%s %s', ['EKMSRV: ' + SEKMSRV_UNSUPPORTED_VERSION]))
raiseError(E_KMSRV_UNSUPPORTED_VERSION, Tnt_WideFormat('%s %s', [
'EKMSRV: ' + _('Unsupported version')]))
else
raiseError(E_UNKNOWN, Tnt_WideFormat('EKMSRV: %d, %d', [Response.Status,
SEKMSRV_UNKNOWN_ERROR]));
raiseError(E_UNKNOWN, Tnt_WideFormat('EKMSRV: %d, %d', [
Response.Status, _('Unknown error')]));
end;
end;
......
......@@ -1888,7 +1888,7 @@ begin
Data.Station := Printer.Station;
Data.Font := Parameters.HeaderFont;
Data.Alignment := taLeft;
Data.Wrap := Parameters.WrapText;
Data.Wrap := False;
Device.PrintText(Data);
end;
Printer.CutPaper;
......@@ -1898,7 +1898,7 @@ begin
Data.Station := Printer.Station;
Data.Font := Parameters.HeaderFont;
Data.Alignment := taLeft;
Data.Wrap := Parameters.WrapText;
Data.Wrap := False;
Device.PrintText(Data);
end;
Parameters.HeaderPrinted := True;
......@@ -1973,7 +1973,7 @@ begin
Data.Station := Printer.Station;
Data.Font := Parameters.HeaderFont;
Data.Alignment := taLeft;
Data.Wrap := Parameters.WrapText;
Data.Wrap := False;
Device.PrintText(Data);
end;
end;
......@@ -2008,6 +2008,7 @@ var
const
HeaderFontHeight = 22;
begin
if Parameters.LogoPosition = LogoBeforeHeader then
begin
if Parameters.LogoSize <= (Device.GetModel.NumHeaderLines * HeaderFontHeight) then
......@@ -2022,7 +2023,7 @@ begin
Data.Station := PRINTER_STATION_REC;
Data.Font := Parameters.HeaderFont;
Data.Alignment := taLeft;
Data.Wrap := Parameters.WrapText;
Data.Wrap := False;
Device.PrintText(Data);
end;
......@@ -2033,7 +2034,7 @@ begin
Data.Station := PRINTER_STATION_REC;
Data.Font := Parameters.HeaderFont;
Data.Alignment := taLeft;
Data.Wrap := Parameters.WrapText;
Data.Wrap := False;
Device.PrintText(Data);
end;
......@@ -2048,7 +2049,7 @@ begin
Data.Station := PRINTER_STATION_REC;
Data.Font := Parameters.HeaderFont;
Data.Alignment := taLeft;
Data.Wrap := Parameters.WrapText;
Data.Wrap := False;
Device.PrintText(Data);
end;
Printer.CutPaper;
......
......@@ -9,7 +9,7 @@ uses
TntRegistry, TntClasses, TntSysUtils,
// This
Oposhi, PrinterTypes, LogFile, FileUtils, StringUtils, TextMap, RegUtils,
WException, gnugettext;
WException, gnugettext, DriverError;
const
/////////////////////////////////////////////////////////////////////////////
......@@ -161,7 +161,6 @@ implementation
const
FiscalPrinterProgID = 'OposShtrih.FiscalPrinter';
MsgKeyOpenError = 'Error opening registry key: %s';
{ TMalinaParams }
......@@ -507,7 +506,7 @@ begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
KeyName := GetSysKeyName(DeviceName);
if not Reg.OpenKey(KeyName, True) then
raiseExceptionFmt(MsgKeyOpenError, [KeyName]);
raiseOpenKeyError(KeyName);
Reg.WriteString('', FiscalPrinterProgID);
// Malina
......
......@@ -6,10 +6,10 @@ uses
// VCL
Windows, SysUtils, Classes, Registry,
// Tnt
TntClasses, TntStdCtrls, TntRegistry,
TntClasses, TntStdCtrls, TntRegistry, TntSysUtils,
// This
PrinterParameters, FileUtils, LogFile, SmIniFile, Oposhi, WException,
TntSysUtils, gnugettext;
gnugettext, DriverError;
type
{ TPrinterParametersReg }
......@@ -52,7 +52,6 @@ implementation
const
REG_KEY_VATCODES = 'VatCodes';
REG_KEY_PAYTYPES = 'PaymentTypes';
MsgKeyOpenError = 'Error opening registry key: %s';
function ReadEncodingReg(const DeviceName: WideString; Logger: ILogFile): Integer;
var
......@@ -541,7 +540,7 @@ begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
KeyName := GetSysKeyName(DeviceName);
if not Reg.OpenKey(KeyName, True) then
raiseExceptionFmt(MsgKeyOpenError, [KeyName]);
raiseOpenKeyError(KeyName);
Reg.WriteString('', FiscalPrinterProgID);
Reg.WriteInteger('ComNumber', Parameters.PortNumber);
......