1 | ' Classes/System/Threading/EventWaitHandle.ab
|
---|
2 |
|
---|
3 | NameSpace System
|
---|
4 | NameSpace Threading
|
---|
5 |
|
---|
6 | Enum EventResetMode
|
---|
7 | AutoReset = False
|
---|
8 | ManualReset = True
|
---|
9 | End Enum
|
---|
10 |
|
---|
11 | Class EventWaitHandle
|
---|
12 | Inherits System.Threading.WaitHandle
|
---|
13 |
|
---|
14 | Public
|
---|
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 | /*
|
---|
30 | WaitHandle で保持されているすべてのリソースを解放します。
|
---|
31 | WaitHandleから継承
|
---|
32 | Virtual Sub Close()
|
---|
33 | End Sub
|
---|
34 | */
|
---|
35 |
|
---|
36 | /*CreateObjRef*/
|
---|
37 |
|
---|
38 | /*
|
---|
39 | WaitHandleから継承
|
---|
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 | /*
|
---|
88 | WaitHandleから継承
|
---|
89 | WaitAll
|
---|
90 | WaitAny
|
---|
91 | WaitOne
|
---|
92 | */
|
---|
93 |
|
---|
94 | /*
|
---|
95 | WaitHandle から継承
|
---|
96 | Handle
|
---|
97 | SafeWaitHandle
|
---|
98 | */
|
---|
99 |
|
---|
100 | End Class
|
---|
101 |
|
---|
102 | End Namespace
|
---|
103 | End Namespace
|
---|