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 */;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
constructor | public | System.SyncObjs.pas System.SyncObjs.hpp |
System.SyncObjs | TSemaphore |
説明
THandleObject オブジェクトをインスタンス化します。
System.SyncObjs.TSemaphore.Create は System.SyncObjs.THandleObject.Create を継承しています。以下の内容はすべて System.SyncObjs.THandleObject.Create を参照しています。
THandleObject オブジェクトをインスタンス化します。
Create を呼び出すと、THandleObject オブジェクトを作成することができます。
UseCOMWait パラメータを設定すると、スレッドがブロックされてオブジェクトを待っているときに発生した STA COM 呼び出しをこのスレッドに戻すことができます。