windows-pr 0.8.5 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,11 @@
1
+ = 0.8.6 - 14-Jun-2008
2
+ * Added the Windows::Network::Winsock module.
3
+ * Added the Windows::ToolHelper module.
4
+ * Added CLSCTX enum constants to the Windows::COM module.
5
+ * Added several WSA socket error constants to Windows::Error.
6
+ * Moved the Process32First and Process32Next functions from Windows::Process
7
+ to Windows::ToolHelper.
8
+
1
9
  = 0.8.5 - 28-May-2008
2
10
  * Added more pipe related error codes to the Windows::Error module.
3
11
  * Added the FlushFileBuffers function to the Windows::File module.
data/lib/windows/com.rb CHANGED
@@ -70,6 +70,29 @@ module Windows
70
70
  INVOKE_PROPERTYGET = 2
71
71
  INVOKE_PROPERTYPUT = 4
72
72
  INVOKE_PROPERTYPUTREF = 8
73
+
74
+ # CLSCTX enum constants
75
+
76
+ CLSCTX_INPROC_SERVER = 0x1
77
+ CLSCTX_INPROC_HANDLER = 0x2
78
+ CLSCTX_LOCAL_SERVER = 0x4
79
+ CLSCTX_INPROC_SERVER16 = 0x8
80
+ CLSCTX_REMOTE_SERVER = 0x10
81
+ CLSCTX_INPROC_HANDLER16 = 0x20
82
+ CLSCTX_RESERVED1 = 0x40
83
+ CLSCTX_RESERVED2 = 0x80
84
+ CLSCTX_RESERVED3 = 0x100
85
+ CLSCTX_RESERVED4 = 0x200
86
+ CLSCTX_NO_CODE_DOWNLOAD = 0x400
87
+ CLSCTX_RESERVED5 = 0x800
88
+ CLSCTX_NO_CUSTOM_MARSHAL = 0x1000
89
+ CLSCTX_ENABLE_CODE_DOWNLOAD = 0x2000
90
+ CLSCTX_NO_FAILURE_LOG = 0x4000
91
+ CLSCTX_DISABLE_AAA = 0x8000
92
+ CLSCTX_ENABLE_AAA = 0x10000
93
+ CLSCTX_FROM_DEFAULT_CONTEXT = 0x20000
94
+ CLSCTX_ACTIVATE_32_BIT_SERVER = 0x40000
95
+ CLSCTX_ACTIVATE_64_BIT_SERVER = 0x80000
73
96
 
74
97
  API.new('BindMoniker', 'PLPP', 'L', 'ole32')
75
98
  API.new('CLSIDFromProgID', 'PP', 'L', 'ole32')
@@ -130,6 +153,7 @@ module Windows
130
153
  API.new('OleGetIconOfClass', 'PPI', 'L', 'ole32')
131
154
  API.new('OleGetIconOfFile', 'PI', 'L', 'ole32')
132
155
  API.new('OleIconToCursor', 'PL', 'L', 'olepro32')
156
+ API.new('OleInitialize', 'V', 'L', 'ole32')
133
157
  API.new('OleRegGetMiscStatus', 'PLP', 'L', 'ole32')
134
158
  API.new('OleRegGetUserType', 'PLP', 'L', 'ole32')
135
159
  API.new('OleSetAutoConvert', 'PP', 'L', 'ole32')
data/lib/windows/error.rb CHANGED
@@ -325,6 +325,78 @@ module Windows
325
325
  SCHED_E_ACCOUNT_DBASE_CORRUPT = 267025 # 0x00041311L
326
326
  SCHED_E_NO_SECURITY_SERVICES = 267026 # 0x00041312L
327
327
  SCHED_E_UNKNOWN_OBJECT_VERSION = 267027 # 0x00041313L
328
+
329
+ # Socket errors
330
+ WSA_INVALID_HANDLE = 6
331
+ WSA_NOT_ENOUGH_MEMORY = 8
332
+ WSA_INVALID_PARAMETER = 87
333
+ WSA_OPERATION_ABORTED = 995
334
+ WSA_IO_INCOMPLETE = 996
335
+ WSA_IO_PENDING = 997
336
+ WSAEINTR = 10004
337
+ WSAEBADF = 10009
338
+ WSAEACCESS = 10013
339
+ WSAEFAULT = 10014
340
+ WSAEINVAL = 10022
341
+ WSAEMFILE = 10024
342
+ WSAEWOULDBLOCK = 10035
343
+ WSAEINPROGRESS = 10036
344
+ WSAEALREADY = 10037
345
+ WSAENOTSOCK = 10038
346
+ WSAEDESTADDRREQ = 10039
347
+ WSAEMSGSIZE = 10040
348
+ WSAEPROTOTYPE = 10041
349
+ WSAENOPROTOOPT = 10042
350
+ WSAEPROTONOSUPPORT = 10043
351
+ WSAESOCKTNOSUPPORT = 10044
352
+ WSAEOPNOTSUPP = 10045
353
+ WSAEPFNOSUPPORT = 10046
354
+ WSAEAFNOSUPPORT = 10047
355
+ WSAEADDRINUSE = 10048
356
+ WSAEADDRNOTAVAIL = 10049
357
+ WSAENETDOWN = 10050
358
+ WSAENETUNREACH = 10051
359
+ WSAENETRESET = 10052
360
+ WSAECONNABORTED = 10053
361
+ WSAECONNRESET = 10054
362
+ WSAENOBUFS = 10055
363
+ WSAEISCONN = 10056
364
+ WSAENOTCONN = 10057
365
+ WSAESHUTDOWN = 10058
366
+ WSAETOOMANYREFS = 10059
367
+ WSATIMEDOUT = 10060
368
+ WSAECONNREFUSED = 10061
369
+ WSAELOOP = 10062
370
+ WSAENAMETOOLONG = 10063
371
+ WSAEHOSTDOWN = 10064
372
+ WSAEHOSTUNREACH = 10065
373
+ WSAENOEMPTY = 10066
374
+ WSAEPROCLIM = 10067
375
+ WSAEUSERS = 10068
376
+ WSAEDQUOT = 10069
377
+ WSAESTALE = 10070
378
+ WSAEREMOTE = 10071
379
+ WSASYSNOTREADY = 10091
380
+ WSAVERNOTSUPPORTED = 10092
381
+ WSANOTINITIALISED = 10093
382
+ WSAEDISCON = 10101
383
+ WSAENOMORE = 10102
384
+ WSAECANCELLED = 10103
385
+ WSAEINVALIDPROCTABLE = 10104
386
+ WSAEINVALIDPROVIDER = 10105
387
+ WSAEPROVIDERFAILEDINIT = 10106
388
+ WSASYSCALLFAILURE = 10107
389
+ WSASERVICE_NOT_FOUND = 10108
390
+ WSATYPE_NOT_FOUND = 10109
391
+ WSA_E_NO_MORE = 10110
392
+ WSA_E_CANCELLED = 10111
393
+ WSAEREFUSED = 10112
394
+ WSAHOST_NOT_FOUND = 11001
395
+ WSATRY_AGAIN = 11002
396
+ WSANO_RECOVERY = 11003
397
+ WSANO_DATA = 11004
398
+ WSA_QOS_RECEIVERS = 11005
399
+ WSA_QOS_SENDERS = 11006
328
400
 
329
401
  API.new('GetLastError', 'V', 'L')
330
402
  API.new('SetLastError', 'L', 'V')
@@ -1,7 +1,9 @@
1
1
  require 'windows/api'
2
- include Windows
3
2
 
3
+ # The Windows module serves as a namespace only.
4
4
  module Windows
5
+ # The Process module includes process related functions and constants,
6
+ # including some tool help functions that relate to processes.
5
7
  module Process
6
8
  API.auto_namespace = 'Windows::Process'
7
9
  API.auto_constant = true
@@ -60,7 +62,7 @@ module Windows
60
62
  LOGON_WITH_PROFILE = 0x00000001
61
63
  LOGON_NETCREDENTIALS_ONLY = 0x00000002
62
64
 
63
- SHUTDOWN_NORETRY = 0x00000001
65
+ SHUTDOWN_NORETRY = 0x00000001
64
66
 
65
67
  API.new('CreateProcess', 'PPPPLLLPPP', 'B')
66
68
  API.new('CreateProcessAsUser', 'LPPLLILPPPP', 'B', 'advapi32')
@@ -85,8 +87,6 @@ module Windows
85
87
  API.new('GetProcessWorkingSetSize', 'LPP', 'B')
86
88
  API.new('GetStartupInfo', 'P', 'V')
87
89
  API.new('OpenProcess', 'LIL', 'L')
88
- API.new('Process32First', 'LP', 'B')
89
- API.new('Process32Next', 'LP', 'B')
90
90
  API.new('SetEnvironmentVariable', 'PP', 'B')
91
91
  API.new('SetPriorityClass', 'LL', 'B')
92
92
  API.new('SetProcessAffinityMask', 'LL', 'B')
@@ -101,7 +101,7 @@ module Windows
101
101
  begin
102
102
  API.new('GetProcessId', 'L', 'L')
103
103
  API.new('GetProcessHandleCount', 'LP', 'B')
104
- rescue Exception
104
+ rescue Windows::API::Error
105
105
  # Do nothing - not supported on current platform. It's up to you to
106
106
  # check for the existence of the constant in your code.
107
107
  end
@@ -0,0 +1,34 @@
1
+ require 'windows/api'
2
+
3
+ # Functions and constants from tlhelp32.h
4
+
5
+ module Windows
6
+ module ToolHelper
7
+ API.auto_namespace = 'Windows::ToolHelper'
8
+ API.auto_constant = true
9
+ API.auto_method = true
10
+ API.auto_unicode = true
11
+
12
+ TH32CS_SNAPHEAPLIST = 0x00000001
13
+ TH32CS_SNAPPROCESS = 0x00000002
14
+ TH32CS_SNAPTHREAD = 0x00000004
15
+ TH32CS_SNAPMODULE = 0x00000008
16
+ TH32CS_SNAPMODULE32 = 0x00000010
17
+ TH32CS_INHERIT = 0x80000000
18
+ TH32CS_SNAPALL = TH32CS_SNAPHEAPLIST | TH32CS_SNAPMODULE |
19
+ TH32CS_SNAPPROCESS | TH32CS_SNAPTHREAD
20
+
21
+ API.new('CreateToolhelp32Snapshot', 'LL', 'L')
22
+ API.new('Heap32First', 'PLL', 'B')
23
+ API.new('Heap32ListFirst', 'LP', 'B')
24
+ API.new('Heap32ListNext', 'LP', 'B')
25
+ API.new('Heap32Next', 'P', 'B')
26
+ API.new('Module32First', 'LP', 'B')
27
+ API.new('Module32Next', 'LP', 'B')
28
+ API.new('Process32First', 'LP', 'B')
29
+ API.new('Process32Next', 'LP', 'B')
30
+ API.new('Thread32First', 'LP', 'B')
31
+ API.new('Thread32Next', 'LP', 'B')
32
+ API.new('Toolhelp32ReadProcessMemory', 'LLPLL', 'B')
33
+ end
34
+ 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.5"
5
+ gem.version = "0.8.6"
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,33 +1,36 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
4
2
  name: windows-pr
5
3
  version: !ruby/object:Gem::Version
6
- version: 0.8.5
7
- date: 2008-05-28 00:00:00 -06:00
8
- summary: Windows functions and constants bundled via Win32::API
9
- require_paths:
10
- - lib
11
- email: djberg96@gmail.com
12
- homepage: http://www.rubyforge.org/projects/win32utils
13
- rubyforge_project: win32utils
14
- description: Windows functions and constants bundled via Win32::API
15
- autorequire:
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
24
- version:
4
+ version: 0.8.6
25
5
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
29
6
  authors:
30
7
  - Daniel J. Berger
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-06-14 00:00:00 -06:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: windows-api
17
+ version_requirement:
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.2.3
23
+ version:
24
+ description: Windows functions and constants bundled via Win32::API
25
+ email: djberg96@gmail.com
26
+ executables: []
27
+
28
+ extensions: []
29
+
30
+ extra_rdoc_files:
31
+ - MANIFEST
32
+ - README
33
+ - CHANGES
31
34
  files:
32
35
  - doc/conversion_guide.txt
33
36
  - lib/windows/clipboard.rb
@@ -59,6 +62,7 @@ files:
59
62
  - lib/windows/system_info.rb
60
63
  - lib/windows/thread.rb
61
64
  - lib/windows/time.rb
65
+ - lib/windows/tool_helper.rb
62
66
  - lib/windows/unicode.rb
63
67
  - lib/windows/volume.rb
64
68
  - lib/windows/window.rb
@@ -121,6 +125,32 @@ files:
121
125
  - README
122
126
  - test
123
127
  - windows-pr.gemspec
128
+ has_rdoc: true
129
+ homepage: http://www.rubyforge.org/projects/win32utils
130
+ post_install_message:
131
+ rdoc_options: []
132
+
133
+ require_paths:
134
+ - lib
135
+ required_ruby_version: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: "0"
140
+ version:
141
+ required_rubygems_version: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: "0"
146
+ version:
147
+ requirements: []
148
+
149
+ rubyforge_project: win32utils
150
+ rubygems_version: 1.1.1
151
+ signing_key:
152
+ specification_version: 2
153
+ summary: Windows functions and constants bundled via Win32::API
124
154
  test_files:
125
155
  - test/tc_clipboard.rb
126
156
  - test/tc_com.rb
@@ -162,25 +192,3 @@ test_files:
162
192
  - test/tc_unicode.rb
163
193
  - test/tc_volume.rb
164
194
  - test/tc_window.rb
165
- rdoc_options: []
166
-
167
- extra_rdoc_files:
168
- - MANIFEST
169
- - README
170
- - CHANGES
171
- executables: []
172
-
173
- extensions: []
174
-
175
- requirements: []
176
-
177
- dependencies:
178
- - !ruby/object:Gem::Dependency
179
- name: windows-api
180
- version_requirement:
181
- version_requirements: !ruby/object:Gem::Version::Requirement
182
- requirements:
183
- - - ">="
184
- - !ruby/object:Gem::Version
185
- version: 0.2.3
186
- version: