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