source: trunk/Include/Classes/System/Threading/EventWaitHandle.ab@ 494

Last change on this file since 494 was 494, checked in by NoWest, 16 years ago

#ifndef~#define~#endifを除去

File size: 2.3 KB
Line 
1' Classes/System/Threading/EventWaitHandle.ab
2
3NameSpace System
4NameSpace Threading
5
6Enum EventResetMode
7 AutoReset = False
8 ManualReset = True
9End Enum
10
11Class EventWaitHandle
12 Inherits System.Threading.WaitHandle
13
14Public
15 Sub EventWaitHandle (initialState As Boolean, mode As EventResetMode)
16 This.Handle(CreateEvent(NULL,mode As BOOL,initialState As BOOL,NULL))
17 End Sub
18 Sub EventWaitHandle (initialState As Boolean, mode As EventResetMode, name As String)
19 This.Handle(CreateEvent(NULL,mode As BOOL,initialState As BOOL,ToTCStr(name)))
20 End Sub
21 Sub EventWaitHandle (initialState As Boolean, mode As EventResetMode, name As String, ByRef createdNew As Boolean)
22 This.Handle(CreateEvent(NULL,mode As BOOL,initialState As BOOL,ToTCStr(name)))
23 If ERROR_ALREADY_EXISTS=GetLastError() Then createdNew=False Else createdNew=True
24 End Sub
25/* Sub EventWaitHandle (initialState As Boolean, mode As EventResetMode, name As String, ByRef createdNew As Boolean, EventWaitHandleSecurity)
26 TODO
27 End Sub*/
28
29/*
30WaitHandle で保持されているすべてのリソースを解放します。
31WaitHandleから継承
32Virtual Sub Close()
33End Sub
34*/
35
36/*CreateObjRef*/
37
38/*
39WaitHandleから継承
40 Virtual Sub Dispose()
41 End Sub
42*/
43
44/*Equals*/
45/*Finalize*/
46/*GetAccessControl*/
47/*GetHashCode*/
48/*GetLifetimeService*/
49/*InitializeLifetimeService*/
50/*MemberwiseClone*/
51
52
53 /*
54 既存の名前付き同期イベントを開きます。
55 */
56 Static Function OpenExisting(name As String) As WaitHandle
57 This.Handle(OpenEvent(EVENT_ALL_ACCESS,FALSE,ToTCStr(name)))
58 End Function
59
60 /*
61 セキリティアクセスを指定して既存の名前付き同期イベントを開きます。
62 */
63/* Static Function OpenExisting(name As String, rights As EventWaitHandleRights) As WaitHandle
64 TODO
65 End Function*/
66
67 /*
68 イベントの状態を非シグナル状態に設定し、スレッドをブロックします。
69 */
70 Function Reset() As Boolean
71 If ResetEvent(This.Handle()) Then Return True
72 Reset=False
73 End Function
74
75
76 /*
77 イベントの状態をシグナル状態に設定し、待機している 1 つ以上のスレッドが進行できるようにします。
78 */
79 Function Set() As Boolean
80 If SetEvent(This.Handle()) Then Return True
81 Set=False
82 End Function
83
84/*SetAccessControl*/
85/*ToString*/
86
87/*
88WaitHandleから継承
89WaitAll
90WaitAny
91WaitOne
92*/
93
94/*
95WaitHandle から継承
96Handle
97SafeWaitHandle
98*/
99
100End Class
101
102End Namespace
103End Namespace
Note: See TracBrowser for help on using the repository browser.