windows-pr 0.8.3 → 0.8.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,10 @@
1
+ = 0.8.4 - 18-May-2008
2
+ * Added the Windows::NTFS::File module.
3
+ * Added several IOCTL macro methods to the Windows::DeviceIO module.
4
+ * Wrapped the GetLayeredWindowAttributes function in the Windows::Window
5
+ module since it is only supported on Windows XP or later.
6
+ * Fixed the CreateThread prototype with regards to callback support.
7
+
1
8
  = 0.8.3 - 26-Apr-2008
2
9
  * Now requires windows-api 0.2.3 or later to take advantage of the
3
10
  improvements in auto constant generation.
@@ -68,8 +68,13 @@ module Windows
68
68
  FILE_DEVICE_KSEC = 0x00000039
69
69
  FILE_DEVICE_FIPS = 0x0000003A
70
70
  FILE_DEVICE_INFINIBAND = 0x0000003B
71
+
72
+ IOCTL_DISK_BASE = FILE_DEVICE_DISK
71
73
 
72
- FILE_ANY_ACCESS = 0
74
+ FILE_ANY_ACCESS = 0
75
+ FILE_READ_ACCESS = 0x0001
76
+ FILE_WRITE_ACCESS = 0x0002
77
+ FILE_SPECIAL_ACCESS = FILE_ANY_ACCESS
73
78
 
74
79
  METHOD_BUFFERED = 0
75
80
  METHOD_IN_DIRECT = 1
@@ -123,5 +128,120 @@ module Windows
123
128
  def FSCTL_DELETE_USN_JOURNAL
124
129
  CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 62, METHOD_BUFFERED, 0)
125
130
  end
131
+
132
+ def IOCTL_DISK_GET_DRIVE_GEOMETRY
133
+ CTL_CODE(IOCTL_DISK_BASE, 0x0000, METHOD_BUFFERED, FILE_ANY_ACCESS)
134
+ end
135
+
136
+ def IOCTL_DISK_GET_PARTITION_INFO
137
+ CTL_CODE(IOCTL_DISK_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
138
+ end
139
+
140
+ def IOCTL_DISK_SET_PARTITION_INFO
141
+ CTL_CODE(IOCTL_DISK_BASE, 0x0002, METHOD_BUFFERED,
142
+ FILE_READ_ACCESS | FILE_WRITE_ACCESS
143
+ )
144
+ end
145
+
146
+ def IOCTL_DISK_GET_DRIVE_LAYOUT
147
+ CTL_CODE(IOCTL_DISK_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
148
+ end
149
+
150
+ def IOCTL_DISK_SET_DRIVE_LAYOUT
151
+ CTL_CODE(IOCTL_DISK_BASE, 0x0004, METHOD_BUFFERED,
152
+ FILE_READ_ACCESS | FILE_WRITE_ACCESS)
153
+ end
154
+
155
+ def IOCTL_DISK_VERIFY
156
+ CTL_CODE(IOCTL_DISK_BASE, 0x0005, METHOD_BUFFERED, FILE_ANY_ACCESS)
157
+ end
158
+
159
+ def IOCTL_DISK_FORMAT_TRACKS
160
+ CTL_CODE(IOCTL_DISK_BASE, 0x0006, METHOD_BUFFERED,
161
+ FILE_READ_ACCESS | FILE_WRITE_ACCESS
162
+ )
163
+ end
164
+
165
+ def IOCTL_DISK_REASSIGN_BLOCKS
166
+ CTL_CODE(IOCTL_DISK_BASE, 0x0007, METHOD_BUFFERED,
167
+ FILE_READ_ACCESS | FILE_WRITE_ACCESS
168
+ )
169
+ end
170
+
171
+ def IOCTL_DISK_PERFORMANCE
172
+ CTL_CODE(IOCTL_DISK_BASE, 0x0008, METHOD_BUFFERED, FILE_ANY_ACCESS)
173
+ end
174
+
175
+ def IOCTL_DISK_IS_WRITABLE
176
+ CTL_CODE(IOCTL_DISK_BASE, 0x0009, METHOD_BUFFERED, FILE_ANY_ACCESS)
177
+ end
178
+
179
+ def IOCTL_DISK_LOGGING
180
+ CTL_CODE(IOCTL_DISK_BASE, 0x000a, METHOD_BUFFERED, FILE_ANY_ACCESS)
181
+ end
182
+
183
+ def IOCTL_DISK_FORMAT_TRACKS_EX
184
+ CTL_CODE(IOCTL_DISK_BASE, 0x000b, METHOD_BUFFERED,
185
+ FILE_READ_ACCESS | FILE_WRITE_ACCESS
186
+ )
187
+ end
188
+
189
+ def IOCTL_DISK_HISTOGRAM_STRUCTURE
190
+ CTL_CODE(IOCTL_DISK_BASE, 0x000c, METHOD_BUFFERED, FILE_ANY_ACCESS)
191
+ end
192
+
193
+ def IOCTL_DISK_HISTOGRAM_DATA
194
+ CTL_CODE(IOCTL_DISK_BASE, 0x000d, METHOD_BUFFERED, FILE_ANY_ACCESS)
195
+ end
196
+
197
+ def IOCTL_DISK_HISTOGRAM_RESET
198
+ CTL_CODE(IOCTL_DISK_BASE, 0x000e, METHOD_BUFFERED, FILE_ANY_ACCESS)
199
+ end
200
+
201
+ def IOCTL_DISK_REQUEST_STRUCTURE
202
+ CTL_CODE(IOCTL_DISK_BASE, 0x000f, METHOD_BUFFERED, FILE_ANY_ACCESS)
203
+ end
204
+
205
+ def IOCTL_DISK_REQUEST_DATA
206
+ CTL_CODE(IOCTL_DISK_BASE, 0x0010, METHOD_BUFFERED, FILE_ANY_ACCESS)
207
+ end
208
+
209
+ def IOCTL_DISK_PERFORMANCE_OFF
210
+ CTL_CODE(IOCTL_DISK_BASE, 0x0018, METHOD_BUFFERED, FILE_ANY_ACCESS)
211
+ end
212
+
213
+ def IOCTL_DISK_GET_PARTITION_INFO_EX
214
+ CTL_CODE(IOCTL_DISK_BASE, 0x0012, METHOD_BUFFERED, FILE_ANY_ACCESS)
215
+ end
216
+
217
+ def IOCTL_DISK_SET_PARTITION_INFO_EX
218
+ CTL_CODE(IOCTL_DISK_BASE, 0x0013, METHOD_BUFFERED,
219
+ FILE_READ_ACCESS | FILE_WRITE_ACCESS
220
+ )
221
+ end
222
+
223
+ def IOCTL_DISK_GET_DRIVE_LAYOUT_EX
224
+ CTL_CODE(IOCTL_DISK_BASE, 0x0014, METHOD_BUFFERED, FILE_ANY_ACCESS)
225
+ end
226
+
227
+ def IOCTL_DISK_SET_DRIVE_LAYOUT_EX
228
+ CTL_CODE(IOCTL_DISK_BASE, 0x0015, METHOD_BUFFERED,
229
+ FILE_READ_ACCESS | FILE_WRITE_ACCESS
230
+ )
231
+ end
232
+
233
+ def IOCTL_DISK_CREATE_DISK
234
+ CTL_CODE(IOCTL_DISK_BASE, 0x0016, METHOD_BUFFERED,
235
+ FILE_READ_ACCESS | FILE_WRITE_ACCESS
236
+ )
237
+ end
238
+
239
+ def IOCTL_DISK_GET_LENGTH_INFO
240
+ CTL_CODE(IOCTL_DISK_BASE, 0x0017, METHOD_BUFFERED, FILE_READ_ACCESS)
241
+ end
242
+
243
+ def IOCTL_DISK_GET_DRIVE_GEOMETRY_EX
244
+ CTL_CODE(IOCTL_DISK_BASE, 0x0028, METHOD_BUFFERED, FILE_ANY_ACCESS)
245
+ end
126
246
  end
127
247
  end
@@ -29,7 +29,7 @@ module Windows
29
29
  THREAD_PRIORITY_TIME_CRITICAL = 15
30
30
 
31
31
  API.new('CreateRemoteThread', 'LPLLPLP', 'L')
32
- API.new('CreateThread', 'PLPPLP', 'L')
32
+ API.new('CreateThread', 'PLKPLP', 'L')
33
33
  API.new('ExitThread', 'L', 'V')
34
34
  API.new('GetCurrentThread', 'V', 'L')
35
35
  API.new('GetCurrentThreadId', 'V', 'L')
@@ -37,7 +37,6 @@ module Windows
37
37
  API.new('GetForegroundWindow', 'V', 'L', 'user32')
38
38
  API.new('GetGUIThreadInfo', 'LP', 'B', 'user32')
39
39
  API.new('GetLastActivePopup', 'L', 'L', 'user32')
40
- API.new('GetLayeredWindowAttributes', 'LPBL', 'B', 'user32')
41
40
  API.new('GetParent', 'L', 'L', 'user32')
42
41
  API.new('GetProcessDefaultLayout', 'P', 'B', 'user32')
43
42
  API.new('GetShellWindow', 'V', 'L', 'user32')
@@ -51,5 +50,13 @@ module Windows
51
50
  API.new('GetWindowText', 'LPI', 'I', 'user32')
52
51
  API.new('GetWindowTextLength', 'L', 'I', 'user32')
53
52
  API.new('GetWindowThreadProcessId', 'LP', 'L', 'user32')
53
+
54
+ # Windows XP or later
55
+ begin
56
+ API.new('GetLayeredWindowAttributes', 'LPBL', 'B', 'user32')
57
+ rescue Exception
58
+ # Do nothing - not supported on current platform. It's up to you
59
+ # to check for the existence of the constant in your code.
60
+ end
54
61
  end
55
62
  end
data/windows-pr.gemspec CHANGED
@@ -2,7 +2,7 @@ require "rubygems"
2
2
 
3
3
  spec = Gem::Specification.new do |gem|
4
4
  gem.name = "windows-pr"
5
- gem.version = "0.8.3"
5
+ gem.version = "0.8.4"
6
6
  gem.author = "Daniel J. Berger"
7
7
  gem.email = "djberg96@gmail.com"
8
8
  gem.homepage = "http://www.rubyforge.org/projects/win32utils"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: windows-pr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-04-26 00:00:00 -06:00
12
+ date: 2008-05-18 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency