mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 10:48:12 +02:00
* Improve Delphi compatibility of TEvent(object) constructors, while keeping also backwards compat by adding default parameters.
This commit is contained in:
parent
74f9523806
commit
616538c251
@ -67,7 +67,9 @@ type
|
||||
FManualReset: Boolean;
|
||||
public
|
||||
constructor Create(EventAttributes : PSecurityAttributes;
|
||||
AManualReset,InitialState : Boolean;const Name : string);
|
||||
AManualReset,InitialState : Boolean;const Name : string;
|
||||
UseComWait:boolean=false);
|
||||
constructor Create(UseComWait : Boolean=false);
|
||||
destructor destroy; override;
|
||||
procedure ResetEvent;
|
||||
procedure SetEvent;
|
||||
@ -153,7 +155,7 @@ begin
|
||||
end;
|
||||
|
||||
constructor TEventObject.Create(EventAttributes : PSecurityAttributes;
|
||||
AManualReset,InitialState : Boolean;const Name : string);
|
||||
AManualReset,InitialState : Boolean;const Name : string;UseComWait:boolean=false);
|
||||
|
||||
begin
|
||||
FHandle := BasicEventCreate(EventAttributes, AManualReset, InitialState, Name);
|
||||
@ -162,6 +164,13 @@ begin
|
||||
FManualReset:=AManualReset;
|
||||
end;
|
||||
|
||||
|
||||
constructor TEventObject.Create(UseComWait : Boolean=false);
|
||||
// cmompatibility shortcut constructor, Com waiting not implemented yet
|
||||
begin
|
||||
Create(nil,True,false,'',UseComWait);
|
||||
end;
|
||||
|
||||
destructor TEventObject.destroy;
|
||||
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user