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

Comparing ibx/trunk/fbintf/client/2.5/FB25Events.pas (file contents):
Revision 47 by tony, Mon Jan 9 15:31:51 2017 UTC vs.
Revision 215 by tony, Thu Mar 15 16:25:03 2018 UTC

# Line 60 | Line 60
60   {                                                                        }
61   {************************************************************************}
62   unit FB25Events;
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 70 | Line 73 | interface
73  
74   uses
75    {$IFDEF WINDOWS}Windows, {$ENDIF}Classes, SysUtils, IB, FB25ClientAPI, FB25Attachment,
76 <  IBExternals, IBHeader, syncobjs, FBEvents;
76 >  IBExternals, IBHeader, syncobjs, FBEvents
77 >  {$IF defined(FPC) and defined(UNIX)} ,cthreads {$IFEND};
78  
79   type
80    TFB25Events = class;
# Line 90 | Line 94 | type
94    public
95      constructor Create(aOwner: TFB25Events);
96      destructor Destroy; override;
97 <    procedure eventCallbackFunction(length: short; updated: PChar);
97 >    procedure eventCallbackFunction(length: short; updated: PAnsiChar);
98      procedure WaitForEvent;
99      procedure CancelWait;
100   end;
# Line 150 | Line 154 | type
154   constructor TEventHandlerThread.Create(Owner: TFB25Events;
155     EventHandler: TEventhandlerInterface);
156   begin
157 <   inherited Create(true);
157 >   inherited Create(false);
158     FOwner := Owner;
159     FEventHandler := EventHandler;
160     FreeOnTerminate := true;
157   Start;
161   end;
162  
163   procedure TEventHandlerThread.Terminate;
# Line 165 | Line 168 | type
168  
169    {This procedure is used for the event call back - note the cdecl }
170  
171 < procedure IBEventCallback( ptr: pointer; length: short; updated: PChar); cdecl;
171 > procedure IBEventCallback( ptr: pointer; length: short; updated: PAnsiChar); cdecl;
172   begin
173     if (ptr = nil) or (length = 0) or (updated = nil) then
174       Exit;
# Line 214 | Line 217 | begin
217   end;
218  
219   procedure TEventhandlerInterface.eventCallbackFunction(length: short;
220 <  updated: PChar);
220 >  updated: PAnsiChar);
221   begin
222    FOwner.FCriticalSection.Enter;
223    try

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines