ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/udr/client/FBEvents.pas
(Generate patch)

Comparing ibx/trunk/fbintf/client/FBEvents.pas (file contents):
Revision 47 by tony, Mon Jan 9 15:31:51 2017 UTC vs.
Revision 56 by tony, Mon Mar 6 10:20:02 2017 UTC

# Line 60 | Line 60
60   {                                                                        }
61   {************************************************************************}
62   unit FBEvents;
63 + {$IFDEF MSWINDOWS}
64 + {$DEFINE WINDOWS}
65 + {$ENDIF}
66  
67   {$IFDEF FPC}
68 < {$mode objfpc}{$H+}
68 > {$mode delphi}
69   {$interfaces COM}
70   {$ENDIF}
71  
# Line 81 | Line 84 | type
84      FAttachment: IAttachment;
85      FEventCounts: TEventCounts;
86    protected
87 <    FEventBuffer: PChar;
87 >    FEventBuffer: PByte;
88      FEventBufferLen: integer;
89 <    FResultBuffer: PChar;
89 >    FResultBuffer: PByte;
90      FEventHandler: TEventHandler;
91      FCriticalSection: TCriticalSection;
92      FInWaitState: boolean;
# Line 99 | Line 102 | type
102      {IEvents}
103      procedure GetEvents(EventNames: TStrings);
104      procedure SetEvents(EventNames: TStrings); overload;
105 <    procedure SetEvents(Event: string); overload;
105 >    procedure SetEvents(Event: AnsiString); overload;
106      procedure Cancel;
107      function ExtractEventCounts: TEventCounts;
108      function GetAttachment: IAttachment;
# Line 119 | Line 122 | const
122   procedure TFBEvents.CreateEventBlock;
123   var
124    i: integer;
125 <  EventNames: array of PChar;
125 >  EventNames: array of PAnsiChar;
126 >  EventName: AnsiString;
127   begin
128    with FirebirdClientAPI do
129    begin
# Line 133 | Line 137 | begin
137      setlength(EventNames,MaxEvents);
138      try
139        for i := 0 to FEvents.Count-1 do
140 <        EventNames[i] := PChar(FEvents[i]);
140 >      begin
141 >        EventName := FEvents[i];
142 >        EventNames[i] := PAnsiChar(EventName);
143 >      end;
144  
145        FEventBufferlen := isc_event_block(@FEventBuffer,@FResultBuffer,
146                            FEvents.Count,
# Line 189 | Line 196 | begin
196    with FirebirdClientAPI do
197       isc_event_counts( @EventCountList, FEventBufferLen, FEventBuffer, FResultBuffer);
198    j := 0;
199 <  P := EventCountList;
199 >  P := @EventCountList;
200    for i := 0 to FEvents.Count - 1 do
201    begin
202      if EventCountList[i] <> 0 then
# Line 247 | Line 254 | begin
254    end;
255   end;
256  
257 < procedure TFBEvents.SetEvents(Event: string);
257 > procedure TFBEvents.SetEvents(Event: AnsiString);
258   var S: TStringList;
259   begin
260    S := TStringList.Create;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines