24 |
|
{ Corporation. All Rights Reserved. } |
25 |
|
{ Contributor(s): Jeff Overcash } |
26 |
|
{ } |
27 |
+ |
{ IBX For Lazarus (Firebird Express) } |
28 |
+ |
{ Contributor: Tony Whyman, MWA Software http://www.mwasoftware.co.uk } |
29 |
+ |
{ Portions created by MWA Software are copyright McCallum Whyman } |
30 |
+ |
{ Associates Ltd 2011 } |
31 |
+ |
{ } |
32 |
|
{************************************************************************} |
33 |
|
|
34 |
|
{ |
35 |
|
InterBase Express provides component interfaces to |
36 |
|
functions introduced in InterBase 6.0. The Services |
37 |
< |
components (TIB*Service, TIBServerProperties) and |
33 |
< |
Install components (TIBInstall, TIBUninstall, TIBSetup) |
37 |
> |
components (TIB*Service, TIBServerProperties) |
38 |
|
function only if you have installed InterBase 6.0 or |
39 |
< |
later software |
39 |
> |
later software, including Firebird |
40 |
|
} |
41 |
|
|
42 |
|
unit IBServices; |
46 |
|
interface |
47 |
|
|
48 |
|
uses |
49 |
< |
{$IFDEF LINUX } |
46 |
< |
unix, |
47 |
< |
{$ELSE} |
48 |
< |
{$DEFINE HAS_SQLMONITOR} |
49 |
> |
{$IFDEF WINDOWS } |
50 |
|
Windows, |
51 |
+ |
{$ELSE} |
52 |
+ |
unix, |
53 |
|
{$ENDIF} |
54 |
< |
Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, |
54 |
> |
SysUtils, Classes, Graphics, Controls, Forms, Dialogs, |
55 |
|
IBDialogs, IBHeader, IB, IBExternals; |
56 |
|
|
57 |
|
const |
511 |
|
implementation |
512 |
|
|
513 |
|
uses |
514 |
< |
IBIntf {$IFDEF HAS_SQLMONITOR}, IBSQLMonitor {$ENDIF}; |
514 |
> |
IBIntf , IBSQLMonitor, Math; |
515 |
|
|
516 |
|
{ TIBCustomService } |
517 |
|
|
551 |
|
if Assigned(FOnAttach) then |
552 |
|
FOnAttach(Self); |
553 |
|
|
551 |
– |
{$IFDEF HAS_SQLMONITOR} |
554 |
|
MonitorHook.ServiceAttach(Self); |
553 |
– |
{$ENDIF} |
555 |
|
end; |
556 |
|
|
557 |
|
procedure TIBCustomService.Loaded; |
646 |
|
FLoginPrompt := True; |
647 |
|
FTraceFlags := []; |
648 |
|
FOutputbuffer := nil; |
649 |
+ |
FProtocol := Local; |
650 |
|
end; |
651 |
|
|
652 |
|
destructor TIBCustomService.Destroy; |
673 |
|
end |
674 |
|
else |
675 |
|
FHandle := nil; |
674 |
– |
{$IFDEF HAS_SQLMONITOR} |
676 |
|
MonitorHook.ServiceDetach(Self); |
676 |
– |
{$ENDIF} |
677 |
|
end; |
678 |
|
|
679 |
|
function TIBCustomService.GetActive: Boolean; |
727 |
|
FQuerySPBLength := 0; |
728 |
|
FQueryParams := ''; |
729 |
|
end; |
730 |
– |
{$IFDEF HAS_SQLMONITOR} |
730 |
|
MonitorHook.ServiceQuery(Self); |
732 |
– |
{$ENDIF} |
731 |
|
end; |
732 |
|
|
733 |
|
procedure TIBCustomService.SetActive(const Value: Boolean); |
1245 |
|
FStartSPBLength := 0; |
1246 |
|
FStartParams := ''; |
1247 |
|
end; |
1250 |
– |
{$IFDEF HAS_SQLMONITOR} |
1248 |
|
MonitorHook.ServiceStart(Self); |
1252 |
– |
{$ENDIF} |
1249 |
|
end; |
1250 |
|
|
1251 |
|
procedure TIBControlService.ServiceStart; |
1810 |
|
|
1811 |
|
function TIBSecurityService.GetUserInfoCount: Integer; |
1812 |
|
begin |
1813 |
< |
Result := High(FUSerInfo); |
1813 |
> |
Result := Max(High(FUSerInfo),0); |
1814 |
|
end; |
1815 |
|
|
1816 |
|
procedure TIBSecurityService.AddUser; |