API:System.SyncObjs.TSemaphore.Create
Delphi
constructor Create(UseCOMWait: Boolean = False); overload;
constructor Create(SemaphoreAttributes: PSecurityAttributes; AInitialCount, AMaximumCount: Integer; const Name: string; UseCOMWait: Boolean = False); overload;
constructor Create(DesiredAccess: Cardinal; InheritHandle: Boolean; const Name: string; UseCOMWait: Boolean = False); overload;
C++
__fastcall TSemaphore(bool UseCOMWait)/* overload */;
__fastcall TSemaphore(Winapi::Windows::PSecurityAttributes SemaphoreAttributes, int AInitialCount, int AMaximumCount, const System::UnicodeString Name, bool UseCOMWait)/* overload */;
__fastcall TSemaphore(unsigned DesiredAccess, bool InheritHandle, const System::UnicodeString Name, bool UseCOMWait)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
constructor | public | System.SyncObjs.pas System.SyncObjs.hpp |
System.SyncObjs | TSemaphore |
Description
Instantiates a THandleObject object.
System.SyncObjs.TSemaphore.Create inherits from System.SyncObjs.THandleObject.Create. All content below this line refers to System.SyncObjs.THandleObject.Create.
Instantiates a THandleObject object.
Call Create to create a THandleObject object.
Set the UseCOMWait parameter to ensure that when a thread is blocked and waiting for the object, any STA COM calls can be made back into this thread.