root / trunk / Pithos.Client.WPF / NativeMethods.cs @ 5e31048f
History | View | Annotate | Download (12.4 kB)
1 | 1caef52e | Panagiotis Kanavos | using System; |
---|---|---|---|
2 | 1caef52e | Panagiotis Kanavos | using System.Runtime.InteropServices; |
3 | 1caef52e | Panagiotis Kanavos | |
4 | 1caef52e | Panagiotis Kanavos | namespace Pithos.Client.WPF |
5 | 1caef52e | Panagiotis Kanavos | { |
6 | 1caef52e | Panagiotis Kanavos | #region Enums & Structs |
7 | 1caef52e | Panagiotis Kanavos | |
8 | 1caef52e | Panagiotis Kanavos | #region enum HChangeNotifyEventID |
9 | 1caef52e | Panagiotis Kanavos | /// <summary> |
10 | 1caef52e | Panagiotis Kanavos | /// Describes the event that has occurred. |
11 | 1caef52e | Panagiotis Kanavos | /// Typically, only one event is specified at a time. |
12 | 1caef52e | Panagiotis Kanavos | /// If more than one event is specified, the values contained |
13 | 1caef52e | Panagiotis Kanavos | /// in the <i>dwItem1</i> and <i>dwItem2</i> |
14 | 1caef52e | Panagiotis Kanavos | /// parameters must be the same, respectively, for all specified events. |
15 | 1caef52e | Panagiotis Kanavos | /// This parameter can be one or more of the following values. |
16 | 1caef52e | Panagiotis Kanavos | /// </summary> |
17 | 1caef52e | Panagiotis Kanavos | /// <remarks> |
18 | 1caef52e | Panagiotis Kanavos | /// <para><b>Windows NT/2000/XP:</b> <i>dwItem2</i> contains the index |
19 | 1caef52e | Panagiotis Kanavos | /// in the system image list that has changed. |
20 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> is not used and should be <see langword="null"/>.</para> |
21 | 1caef52e | Panagiotis Kanavos | /// <para><b>Windows 95/98:</b> <i>dwItem1</i> contains the index |
22 | 1caef52e | Panagiotis Kanavos | /// in the system image list that has changed. |
23 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> is not used and should be <see langword="null"/>.</para> |
24 | 1caef52e | Panagiotis Kanavos | /// </remarks> |
25 | 1caef52e | Panagiotis Kanavos | [Flags] |
26 | 1caef52e | Panagiotis Kanavos | enum HChangeNotifyEventID |
27 | 1caef52e | Panagiotis Kanavos | { |
28 | 1caef52e | Panagiotis Kanavos | /// <summary> |
29 | 1caef52e | Panagiotis Kanavos | /// All events have occurred. |
30 | 1caef52e | Panagiotis Kanavos | /// </summary> |
31 | 1caef52e | Panagiotis Kanavos | SHCNE_ALLEVENTS = 0x7FFFFFFF, |
32 | 1caef52e | Panagiotis Kanavos | |
33 | 1caef52e | Panagiotis Kanavos | /// <summary> |
34 | 1caef52e | Panagiotis Kanavos | /// A file type association has changed. <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> |
35 | 1caef52e | Panagiotis Kanavos | /// must be specified in the <i>uFlags</i> parameter. |
36 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> and <i>dwItem2</i> are not used and must be <see langword="null"/>. |
37 | 1caef52e | Panagiotis Kanavos | /// </summary> |
38 | 1caef52e | Panagiotis Kanavos | SHCNE_ASSOCCHANGED = 0x08000000, |
39 | 1caef52e | Panagiotis Kanavos | |
40 | 1caef52e | Panagiotis Kanavos | /// <summary> |
41 | 1caef52e | Panagiotis Kanavos | /// The attributes of an item or folder have changed. |
42 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> or |
43 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
44 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the item or folder that has changed. |
45 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> is not used and should be <see langword="null"/>. |
46 | 1caef52e | Panagiotis Kanavos | /// </summary> |
47 | 1caef52e | Panagiotis Kanavos | SHCNE_ATTRIBUTES = 0x00000800, |
48 | 1caef52e | Panagiotis Kanavos | |
49 | 1caef52e | Panagiotis Kanavos | /// <summary> |
50 | 1caef52e | Panagiotis Kanavos | /// A nonfolder item has been created. |
51 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> or |
52 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
53 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the item that was created. |
54 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> is not used and should be <see langword="null"/>. |
55 | 1caef52e | Panagiotis Kanavos | /// </summary> |
56 | 1caef52e | Panagiotis Kanavos | SHCNE_CREATE = 0x00000002, |
57 | 1caef52e | Panagiotis Kanavos | |
58 | 1caef52e | Panagiotis Kanavos | /// <summary> |
59 | 1caef52e | Panagiotis Kanavos | /// A nonfolder item has been deleted. |
60 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> or |
61 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
62 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the item that was deleted. |
63 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> is not used and should be <see langword="null"/>. |
64 | 1caef52e | Panagiotis Kanavos | /// </summary> |
65 | 1caef52e | Panagiotis Kanavos | SHCNE_DELETE = 0x00000004, |
66 | 1caef52e | Panagiotis Kanavos | |
67 | 1caef52e | Panagiotis Kanavos | /// <summary> |
68 | 1caef52e | Panagiotis Kanavos | /// A drive has been added. |
69 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> or |
70 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
71 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the root of the drive that was added. |
72 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> is not used and should be <see langword="null"/>. |
73 | 1caef52e | Panagiotis Kanavos | /// </summary> |
74 | 1caef52e | Panagiotis Kanavos | SHCNE_DRIVEADD = 0x00000100, |
75 | 1caef52e | Panagiotis Kanavos | |
76 | 1caef52e | Panagiotis Kanavos | /// <summary> |
77 | 1caef52e | Panagiotis Kanavos | /// A drive has been added and the Shell should create a new window for the drive. |
78 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> or |
79 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
80 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the root of the drive that was added. |
81 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> is not used and should be <see langword="null"/>. |
82 | 1caef52e | Panagiotis Kanavos | /// </summary> |
83 | 1caef52e | Panagiotis Kanavos | SHCNE_DRIVEADDGUI = 0x00010000, |
84 | 1caef52e | Panagiotis Kanavos | |
85 | 1caef52e | Panagiotis Kanavos | /// <summary> |
86 | 1caef52e | Panagiotis Kanavos | /// A drive has been removed. <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> or |
87 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
88 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the root of the drive that was removed. |
89 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> is not used and should be <see langword="null"/>. |
90 | 1caef52e | Panagiotis Kanavos | /// </summary> |
91 | 1caef52e | Panagiotis Kanavos | SHCNE_DRIVEREMOVED = 0x00000080, |
92 | 1caef52e | Panagiotis Kanavos | |
93 | 1caef52e | Panagiotis Kanavos | /// <summary> |
94 | 1caef52e | Panagiotis Kanavos | /// Not currently used. |
95 | 1caef52e | Panagiotis Kanavos | /// </summary> |
96 | 1caef52e | Panagiotis Kanavos | SHCNE_EXTENDED_EVENT = 0x04000000, |
97 | 1caef52e | Panagiotis Kanavos | |
98 | 1caef52e | Panagiotis Kanavos | /// <summary> |
99 | 1caef52e | Panagiotis Kanavos | /// The amount of free space on a drive has changed. |
100 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> or |
101 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
102 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the root of the drive on which the free space changed. |
103 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> is not used and should be <see langword="null"/>. |
104 | 1caef52e | Panagiotis Kanavos | /// </summary> |
105 | 1caef52e | Panagiotis Kanavos | SHCNE_FREESPACE = 0x00040000, |
106 | 1caef52e | Panagiotis Kanavos | |
107 | 1caef52e | Panagiotis Kanavos | /// <summary> |
108 | 1caef52e | Panagiotis Kanavos | /// Storage media has been inserted into a drive. |
109 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> or |
110 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
111 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the root of the drive that contains the new media. |
112 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> is not used and should be <see langword="null"/>. |
113 | 1caef52e | Panagiotis Kanavos | /// </summary> |
114 | 1caef52e | Panagiotis Kanavos | SHCNE_MEDIAINSERTED = 0x00000020, |
115 | 1caef52e | Panagiotis Kanavos | |
116 | 1caef52e | Panagiotis Kanavos | /// <summary> |
117 | 1caef52e | Panagiotis Kanavos | /// Storage media has been removed from a drive. |
118 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> or |
119 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
120 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the root of the drive from which the media was removed. |
121 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> is not used and should be <see langword="null"/>. |
122 | 1caef52e | Panagiotis Kanavos | /// </summary> |
123 | 1caef52e | Panagiotis Kanavos | SHCNE_MEDIAREMOVED = 0x00000040, |
124 | 1caef52e | Panagiotis Kanavos | |
125 | 1caef52e | Panagiotis Kanavos | /// <summary> |
126 | 1caef52e | Panagiotis Kanavos | /// A folder has been created. <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> |
127 | 1caef52e | Panagiotis Kanavos | /// or <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
128 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the folder that was created. |
129 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> is not used and should be <see langword="null"/>. |
130 | 1caef52e | Panagiotis Kanavos | /// </summary> |
131 | 1caef52e | Panagiotis Kanavos | SHCNE_MKDIR = 0x00000008, |
132 | 1caef52e | Panagiotis Kanavos | |
133 | 1caef52e | Panagiotis Kanavos | /// <summary> |
134 | 1caef52e | Panagiotis Kanavos | /// A folder on the local computer is being shared via the network. |
135 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> or |
136 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
137 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the folder that is being shared. |
138 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> is not used and should be <see langword="null"/>. |
139 | 1caef52e | Panagiotis Kanavos | /// </summary> |
140 | 1caef52e | Panagiotis Kanavos | SHCNE_NETSHARE = 0x00000200, |
141 | 1caef52e | Panagiotis Kanavos | |
142 | 1caef52e | Panagiotis Kanavos | /// <summary> |
143 | 1caef52e | Panagiotis Kanavos | /// A folder on the local computer is no longer being shared via the network. |
144 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> or |
145 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
146 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the folder that is no longer being shared. |
147 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> is not used and should be <see langword="null"/>. |
148 | 1caef52e | Panagiotis Kanavos | /// </summary> |
149 | 1caef52e | Panagiotis Kanavos | SHCNE_NETUNSHARE = 0x00000400, |
150 | 1caef52e | Panagiotis Kanavos | |
151 | 1caef52e | Panagiotis Kanavos | /// <summary> |
152 | 1caef52e | Panagiotis Kanavos | /// The name of a folder has changed. |
153 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> or |
154 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
155 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the previous pointer to an item identifier list (PIDL) or name of the folder. |
156 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> contains the new PIDL or name of the folder. |
157 | 1caef52e | Panagiotis Kanavos | /// </summary> |
158 | 1caef52e | Panagiotis Kanavos | SHCNE_RENAMEFOLDER = 0x00020000, |
159 | 1caef52e | Panagiotis Kanavos | |
160 | 1caef52e | Panagiotis Kanavos | /// <summary> |
161 | 1caef52e | Panagiotis Kanavos | /// The name of a nonfolder item has changed. |
162 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> or |
163 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
164 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the previous PIDL or name of the item. |
165 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> contains the new PIDL or name of the item. |
166 | 1caef52e | Panagiotis Kanavos | /// </summary> |
167 | 1caef52e | Panagiotis Kanavos | SHCNE_RENAMEITEM = 0x00000001, |
168 | 1caef52e | Panagiotis Kanavos | |
169 | 1caef52e | Panagiotis Kanavos | /// <summary> |
170 | 1caef52e | Panagiotis Kanavos | /// A folder has been removed. |
171 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> or |
172 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
173 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the folder that was removed. |
174 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> is not used and should be <see langword="null"/>. |
175 | 1caef52e | Panagiotis Kanavos | /// </summary> |
176 | 1caef52e | Panagiotis Kanavos | SHCNE_RMDIR = 0x00000010, |
177 | 1caef52e | Panagiotis Kanavos | |
178 | 1caef52e | Panagiotis Kanavos | /// <summary> |
179 | 1caef52e | Panagiotis Kanavos | /// The computer has disconnected from a server. |
180 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> or |
181 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
182 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the server from which the computer was disconnected. |
183 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> is not used and should be <see langword="null"/>. |
184 | 1caef52e | Panagiotis Kanavos | /// </summary> |
185 | 1caef52e | Panagiotis Kanavos | SHCNE_SERVERDISCONNECT = 0x00004000, |
186 | 1caef52e | Panagiotis Kanavos | |
187 | 1caef52e | Panagiotis Kanavos | /// <summary> |
188 | 1caef52e | Panagiotis Kanavos | /// The contents of an existing folder have changed, |
189 | 1caef52e | Panagiotis Kanavos | /// but the folder still exists and has not been renamed. |
190 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_IDLIST"/> or |
191 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_PATH"/> must be specified in <i>uFlags</i>. |
192 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> contains the folder that has changed. |
193 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem2</i> is not used and should be <see langword="null"/>. |
194 | 1caef52e | Panagiotis Kanavos | /// If a folder has been created, deleted, or renamed, use SHCNE_MKDIR, SHCNE_RMDIR, or |
195 | 1caef52e | Panagiotis Kanavos | /// SHCNE_RENAMEFOLDER, respectively, instead. |
196 | 1caef52e | Panagiotis Kanavos | /// </summary> |
197 | 1caef52e | Panagiotis Kanavos | SHCNE_UPDATEDIR = 0x00001000, |
198 | 1caef52e | Panagiotis Kanavos | |
199 | 1caef52e | Panagiotis Kanavos | SHCNE_UPDATEITEM = 0x00002000, |
200 | 1caef52e | Panagiotis Kanavos | |
201 | 1caef52e | Panagiotis Kanavos | /// <summary> |
202 | 1caef52e | Panagiotis Kanavos | /// An image in the system image list has changed. |
203 | 1caef52e | Panagiotis Kanavos | /// <see cref="HChangeNotifyFlags.SHCNF_DWORD"/> must be specified in <i>uFlags</i>. |
204 | 1caef52e | Panagiotis Kanavos | /// </summary> |
205 | 1caef52e | Panagiotis Kanavos | SHCNE_UPDATEIMAGE = 0x00008000, |
206 | 1caef52e | Panagiotis Kanavos | |
207 | 1caef52e | Panagiotis Kanavos | } |
208 | 1caef52e | Panagiotis Kanavos | #endregion // enum HChangeNotifyEventID |
209 | 1caef52e | Panagiotis Kanavos | |
210 | 1caef52e | Panagiotis Kanavos | #region public enum HChangeNotifyFlags |
211 | 1caef52e | Panagiotis Kanavos | /// <summary> |
212 | 1caef52e | Panagiotis Kanavos | /// Flags that indicate the meaning of the <i>dwItem1</i> and <i>dwItem2</i> parameters. |
213 | 1caef52e | Panagiotis Kanavos | /// The uFlags parameter must be one of the following values. |
214 | 1caef52e | Panagiotis Kanavos | /// </summary> |
215 | 1caef52e | Panagiotis Kanavos | [Flags] |
216 | 1caef52e | Panagiotis Kanavos | public enum HChangeNotifyFlags |
217 | 1caef52e | Panagiotis Kanavos | { |
218 | 1caef52e | Panagiotis Kanavos | /// <summary> |
219 | 1caef52e | Panagiotis Kanavos | /// The <i>dwItem1</i> and <i>dwItem2</i> parameters are DWORD values. |
220 | 1caef52e | Panagiotis Kanavos | /// </summary> |
221 | 1caef52e | Panagiotis Kanavos | SHCNF_DWORD = 0x0003, |
222 | 1caef52e | Panagiotis Kanavos | /// <summary> |
223 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> and <i>dwItem2</i> are the addresses of ITEMIDLIST structures that |
224 | 1caef52e | Panagiotis Kanavos | /// represent the item(s) affected by the change. |
225 | 1caef52e | Panagiotis Kanavos | /// Each ITEMIDLIST must be relative to the desktop folder. |
226 | 1caef52e | Panagiotis Kanavos | /// </summary> |
227 | 1caef52e | Panagiotis Kanavos | SHCNF_IDLIST = 0x0000, |
228 | 1caef52e | Panagiotis Kanavos | /// <summary> |
229 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> and <i>dwItem2</i> are the addresses of null-terminated strings of |
230 | 1caef52e | Panagiotis Kanavos | /// maximum length MAX_PATH that contain the full path names |
231 | 1caef52e | Panagiotis Kanavos | /// of the items affected by the change. |
232 | 1caef52e | Panagiotis Kanavos | /// </summary> |
233 | 1caef52e | Panagiotis Kanavos | SHCNF_PATHA = 0x0001, |
234 | 1caef52e | Panagiotis Kanavos | /// <summary> |
235 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> and <i>dwItem2</i> are the addresses of null-terminated strings of |
236 | 1caef52e | Panagiotis Kanavos | /// maximum length MAX_PATH that contain the full path names |
237 | 1caef52e | Panagiotis Kanavos | /// of the items affected by the change. |
238 | 1caef52e | Panagiotis Kanavos | /// </summary> |
239 | 1caef52e | Panagiotis Kanavos | SHCNF_PATHW = 0x0005, |
240 | 1caef52e | Panagiotis Kanavos | /// <summary> |
241 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> and <i>dwItem2</i> are the addresses of null-terminated strings that |
242 | 1caef52e | Panagiotis Kanavos | /// represent the friendly names of the printer(s) affected by the change. |
243 | 1caef52e | Panagiotis Kanavos | /// </summary> |
244 | 1caef52e | Panagiotis Kanavos | SHCNF_PRINTERA = 0x0002, |
245 | 1caef52e | Panagiotis Kanavos | /// <summary> |
246 | 1caef52e | Panagiotis Kanavos | /// <i>dwItem1</i> and <i>dwItem2</i> are the addresses of null-terminated strings that |
247 | 1caef52e | Panagiotis Kanavos | /// represent the friendly names of the printer(s) affected by the change. |
248 | 1caef52e | Panagiotis Kanavos | /// </summary> |
249 | 1caef52e | Panagiotis Kanavos | SHCNF_PRINTERW = 0x0006, |
250 | 1caef52e | Panagiotis Kanavos | /// <summary> |
251 | 1caef52e | Panagiotis Kanavos | /// The function should not return until the notification |
252 | 1caef52e | Panagiotis Kanavos | /// has been delivered to all affected components. |
253 | 1caef52e | Panagiotis Kanavos | /// As this flag modifies other data-type flags, it cannot by used by itself. |
254 | 1caef52e | Panagiotis Kanavos | /// </summary> |
255 | 1caef52e | Panagiotis Kanavos | SHCNF_FLUSH = 0x1000, |
256 | 1caef52e | Panagiotis Kanavos | /// <summary> |
257 | 1caef52e | Panagiotis Kanavos | /// The function should begin delivering notifications to all affected components |
258 | 1caef52e | Panagiotis Kanavos | /// but should return as soon as the notification process has begun. |
259 | 1caef52e | Panagiotis Kanavos | /// As this flag modifies other data-type flags, it cannot by used by itself. |
260 | 1caef52e | Panagiotis Kanavos | /// </summary> |
261 | 1caef52e | Panagiotis Kanavos | SHCNF_FLUSHNOWAIT = 0x2000 |
262 | 1caef52e | Panagiotis Kanavos | } |
263 | 1caef52e | Panagiotis Kanavos | #endregion // enum HChangeNotifyFlags |
264 | 1caef52e | Panagiotis Kanavos | |
265 | 1caef52e | Panagiotis Kanavos | |
266 | 1caef52e | Panagiotis Kanavos | #endregion |
267 | 1caef52e | Panagiotis Kanavos | |
268 | 1caef52e | Panagiotis Kanavos | |
269 | 1caef52e | Panagiotis Kanavos | internal static class NativeMethods |
270 | 1caef52e | Panagiotis Kanavos | { |
271 | 1caef52e | Panagiotis Kanavos | [DllImport("shell32.dll")] |
272 | 1caef52e | Panagiotis Kanavos | public static extern void SHChangeNotify(HChangeNotifyEventID wEventId, |
273 | 1caef52e | Panagiotis Kanavos | HChangeNotifyFlags uFlags, |
274 | 1caef52e | Panagiotis Kanavos | IntPtr dwItem1, |
275 | 1caef52e | Panagiotis Kanavos | IntPtr dwItem2); |
276 | 1caef52e | Panagiotis Kanavos | |
277 | 1caef52e | Panagiotis Kanavos | } |
278 | 1caef52e | Panagiotis Kanavos | } |