home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Plus! (NZ) 2001 June
/
HDC50.iso
/
Runimage
/
Delphi50
/
Doc
/
SYNCOBJS.INT
< prev
next >
Wrap
Text File
|
1999-08-11
|
2KB
|
60 lines
{*******************************************************}
{ }
{ Borland Delphi Visual Component Library }
{ Win32 Synchronization objects }
{ }
{ Copyright (c) 1997,99 Inprise Corporation }
{ }
{*******************************************************}
unit SyncObjs;
{$H+,X+}
interface
uses Sysutils, Windows, Messages, Classes;
type
TSynchroObject = class(TObject)
public
procedure Acquire; virtual;
procedure Release; virtual;
end;
THandleObject = class(TSynchroObject)
public
destructor Destroy; override;
property LastError: Integer;
property Handle: THandle;
end;
TWaitResult = (wrSignaled, wrTimeout, wrAbandoned, wrError);
TEvent = class(THandleObject)
public
constructor Create(EventAttributes: PSecurityAttributes; ManualReset,
InitialState: Boolean; const Name: string);
function WaitFor(Timeout: DWORD): TWaitResult;
procedure SetEvent;
procedure ResetEvent;
end;
TSimpleEvent = class(TEvent)
public
constructor Create;
end;
TCriticalSection = class(TSynchroObject)
public
constructor Create;
destructor Destroy; override;
procedure Acquire; override;
procedure Release; override;
procedure Enter;
procedure Leave;
end;
implementation