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 */;
Propriétés
Type | Visibilité | Source | Unité | Parent |
---|---|---|---|---|
constructor | public | System.SyncObjs.pas System.SyncObjs.hpp |
System.SyncObjs | TSemaphore |
Description
Instancie un objet THandleObject.
System.SyncObjs.TSemaphore.Create hérite de System.SyncObjs.THandleObject.Create. Tout le contenu en-dessous de cette ligne se réfère à System.SyncObjs.THandleObject.Create.
Instancie un objet THandleObject.
Appelez Create pour créer un objet THandleObject.
Définissez le paramètre UseCOMWait pour garantir que lorsqu'un thread est bloqué et en attente de l'objet, tous les rappels STA COM peuvent être effectués dans ce thread.