windows-pr 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +7 -0
- data/MANIFEST +57 -56
- data/README +7 -1
- data/doc/conversion_guide.txt +6 -3
- data/lib/windows/com/accessibility.rb +13 -13
- data/lib/windows/mailslot.rb +22 -0
- data/lib/windows/process.rb +1 -1
- data/test/tc_mailslot.rb +22 -0
- data/windows-pr.gemspec +20 -13
- metadata +8 -4
data/CHANGES
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
= 1.0.7 - 20-Aug-2009
|
2
|
+
* Added the Windows::Mailslot module.
|
3
|
+
* The IsProcessInJob function in the Windows::Process module is now wrapped
|
4
|
+
properly so that it doesn't cause an error on Windows 2000. Thanks go to
|
5
|
+
Finbar Clenaghan for the spot.
|
6
|
+
* Minor updates to the conversion guide.
|
7
|
+
|
1
8
|
= 1.0.6 - 19-Jul-2009
|
2
9
|
* Added several job functions to the Windows::Process module.
|
3
10
|
* Updated license to Artistic 2.0.
|
data/MANIFEST
CHANGED
@@ -1,64 +1,65 @@
|
|
1
|
-
CHANGES
|
2
|
-
MANIFEST
|
3
|
-
README
|
4
|
-
Rakefile
|
5
|
-
windows-pr.gemspec
|
1
|
+
* CHANGES
|
2
|
+
* MANIFEST
|
3
|
+
* README
|
4
|
+
* Rakefile
|
5
|
+
* windows-pr.gemspec
|
6
6
|
|
7
|
-
doc/conversion_guide.txt
|
7
|
+
* doc/conversion_guide.txt
|
8
8
|
|
9
|
-
lib/windows/clipboard.rb
|
10
|
-
lib/windows/console.rb
|
11
|
-
lib/windows/device_io.rb
|
12
|
-
lib/windows/directory.rb
|
13
|
-
lib/windows/error.rb
|
14
|
-
lib/windows/eventlog.rb
|
15
|
-
lib/windows/file_mapping.rb
|
16
|
-
lib/windows/file.rb
|
17
|
-
lib/windows/filesystem.rb
|
18
|
-
lib/windows/handle.rb
|
19
|
-
lib/windows/library.rb
|
20
|
-
lib/windows/limits.rb
|
21
|
-
lib/windows/
|
22
|
-
lib/windows/
|
23
|
-
lib/windows/
|
24
|
-
lib/windows/
|
25
|
-
lib/windows/
|
26
|
-
lib/windows/
|
27
|
-
lib/windows/
|
28
|
-
lib/windows/
|
29
|
-
lib/windows/
|
30
|
-
lib/windows/
|
31
|
-
lib/windows/
|
32
|
-
lib/windows/
|
33
|
-
lib/windows/
|
34
|
-
lib/windows/
|
35
|
-
lib/windows/
|
36
|
-
lib/windows/
|
37
|
-
lib/windows/
|
38
|
-
lib/windows/
|
9
|
+
* lib/windows/clipboard.rb
|
10
|
+
* lib/windows/console.rb
|
11
|
+
* lib/windows/device_io.rb
|
12
|
+
* lib/windows/directory.rb
|
13
|
+
* lib/windows/error.rb
|
14
|
+
* lib/windows/eventlog.rb
|
15
|
+
* lib/windows/file_mapping.rb
|
16
|
+
* lib/windows/file.rb
|
17
|
+
* lib/windows/filesystem.rb
|
18
|
+
* lib/windows/handle.rb
|
19
|
+
* lib/windows/library.rb
|
20
|
+
* lib/windows/limits.rb
|
21
|
+
* lib/windows/mailslot.rb
|
22
|
+
* lib/windows/memory.rb
|
23
|
+
* lib/windows/national.rb
|
24
|
+
* lib/windows/nio.rb
|
25
|
+
* lib/windows/network_management.rb
|
26
|
+
* lib/windows/path.rb
|
27
|
+
* lib/windows/pipe.rb
|
28
|
+
* lib/windows/process.rb
|
29
|
+
* lib/windows/registry.rb
|
30
|
+
* lib/windows/security.rb
|
31
|
+
* lib/windows/service.rb
|
32
|
+
* lib/windows/shell.rb
|
33
|
+
* lib/windows/sound.rb
|
34
|
+
* lib/windows/synchronize.rb
|
35
|
+
* lib/windows/system_info.rb
|
36
|
+
* lib/windows/time.rb
|
37
|
+
* lib/windows/unicode.rb
|
38
|
+
* lib/windows/volume.rb
|
39
|
+
* lib/windows/window.rb
|
39
40
|
|
40
|
-
lib/windows/com/automation.rb
|
41
|
+
* lib/windows/com/automation.rb
|
41
42
|
|
42
|
-
lib/windows/gdi/bitmap.rb
|
43
|
-
lib/windows/gdi/device_context.rb
|
44
|
-
lib/windows/gdi/painting_drawing.rb
|
43
|
+
* lib/windows/gdi/bitmap.rb
|
44
|
+
* lib/windows/gdi/device_context.rb
|
45
|
+
* lib/windows/gdi/painting_drawing.rb
|
45
46
|
|
46
|
-
lib/windows/msvcrt/buffer.rb
|
47
|
-
lib/windows/msvcrt/directory.rb
|
48
|
-
lib/windows/msvcrt/file.rb
|
49
|
-
lib/windows/msvcrt/io.rb
|
50
|
-
lib/windows/msvcrt/string.rb
|
51
|
-
lib/windows/msvcrt/time.rb
|
47
|
+
* lib/windows/msvcrt/buffer.rb
|
48
|
+
* lib/windows/msvcrt/directory.rb
|
49
|
+
* lib/windows/msvcrt/file.rb
|
50
|
+
* lib/windows/msvcrt/io.rb
|
51
|
+
* lib/windows/msvcrt/string.rb
|
52
|
+
* lib/windows/msvcrt/time.rb
|
52
53
|
|
53
|
-
lib/windows/network/management.rb
|
54
|
-
lib/windows/network/snmp.rb
|
55
|
-
lib/windows/network/winsock.rb
|
54
|
+
* lib/windows/network/management.rb
|
55
|
+
* lib/windows/network/snmp.rb
|
56
|
+
* lib/windows/network/winsock.rb
|
56
57
|
|
57
|
-
lib/windows/ntfs/winternl.rb
|
58
|
+
* lib/windows/ntfs/winternl.rb
|
58
59
|
|
59
|
-
lib/windows/window/classes.rb
|
60
|
-
lib/windows/window/dialog.rb
|
61
|
-
lib/windows/window/menu.rb
|
62
|
-
lib/windows/window/message.rb
|
63
|
-
lib/windows/window/properties.rb
|
64
|
-
lib/windows/window/timer.rb
|
60
|
+
* lib/windows/window/classes.rb
|
61
|
+
* lib/windows/window/dialog.rb
|
62
|
+
* lib/windows/window/menu.rb
|
63
|
+
* lib/windows/window/message.rb
|
64
|
+
* lib/windows/window/properties.rb
|
65
|
+
* lib/windows/window/timer.rb
|
data/README
CHANGED
@@ -20,6 +20,12 @@
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
+
== Installation
|
24
|
+
=== Gem Installation
|
25
|
+
gem install windows-pr
|
26
|
+
=== Manual Installation
|
27
|
+
rake install
|
28
|
+
|
23
29
|
== Methods
|
24
30
|
Each of the various files included as part of this package provide a series
|
25
31
|
of constants corresponding to the equivalent Windows API function and
|
@@ -131,7 +137,7 @@
|
|
131
137
|
2000 and later.
|
132
138
|
|
133
139
|
== License
|
134
|
-
|
140
|
+
Artistic 2.0
|
135
141
|
|
136
142
|
== Warranty
|
137
143
|
This package is provided "as is" and without any express or
|
data/doc/conversion_guide.txt
CHANGED
@@ -1,23 +1,25 @@
|
|
1
|
-
|
1
|
+
== Parameters
|
2
2
|
Long: 'L'
|
3
3
|
Integer: 'I'
|
4
4
|
Pointer: 'P'
|
5
5
|
Void: 'V'
|
6
|
+
String: 'S'
|
6
7
|
Callback: 'K' # win32-api only
|
7
8
|
|
8
|
-
|
9
|
+
== Windows Data Types
|
9
10
|
BOOL => 'I' (or 'B', win32-api only)
|
10
11
|
DWORD => 'L'
|
11
12
|
HANDLE => 'L'
|
12
13
|
LPDWORD => 'P' (or 'L')
|
13
14
|
LPTSTR => 'P'
|
15
|
+
LPCTSTR => 'S'
|
14
16
|
UINT => 'L'
|
15
17
|
VOID => 'V'
|
16
18
|
WORD => 'I'
|
17
19
|
LPVOID => 'L' (or 'P')
|
18
20
|
CALLBACK => 'K'
|
19
21
|
|
20
|
-
|
22
|
+
== C Data Types
|
21
23
|
void => 'V'
|
22
24
|
void* => 'P'
|
23
25
|
char* => 'P'
|
@@ -27,6 +29,7 @@ long => 'L'
|
|
27
29
|
struct => 'P'
|
28
30
|
struct* => 'P'
|
29
31
|
|
32
|
+
== Notes
|
30
33
|
In practice most LPVOID types should be designated as 'L' because this
|
31
34
|
usually means the function is looking for an address. Check the documentation
|
32
35
|
for details.
|
@@ -1,14 +1,14 @@
|
|
1
|
-
require 'windows/api'
|
2
|
-
|
3
|
-
module Windows
|
4
|
-
module COM
|
5
|
-
module Accessibility
|
6
|
-
API.auto_namespace = 'Windows::COM::Accessibility'
|
7
|
-
API.auto_constant = true
|
8
|
-
API.auto_method = true
|
9
|
-
API.auto_unicode = false
|
10
|
-
|
11
|
-
API.new('ObjectFromLresult', 'LPIP', 'L', 'oleacc')
|
12
|
-
end
|
13
|
-
end
|
1
|
+
require 'windows/api'
|
2
|
+
|
3
|
+
module Windows
|
4
|
+
module COM
|
5
|
+
module Accessibility
|
6
|
+
API.auto_namespace = 'Windows::COM::Accessibility'
|
7
|
+
API.auto_constant = true
|
8
|
+
API.auto_method = true
|
9
|
+
API.auto_unicode = false
|
10
|
+
|
11
|
+
API.new('ObjectFromLresult', 'LPIP', 'L', 'oleacc')
|
12
|
+
end
|
13
|
+
end
|
14
14
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'windows/api'
|
2
|
+
|
3
|
+
# The Windows module serves as a namespace only.
|
4
|
+
module Windows
|
5
|
+
# The Mailslot module contains functions and constants related to the
|
6
|
+
# Windows mailslot IPC mechanism.
|
7
|
+
module Mailslot
|
8
|
+
API.auto_namespace = 'Windows::Mailslot'
|
9
|
+
API.auto_constant = true
|
10
|
+
API.auto_method = true
|
11
|
+
API.auto_unicode = true
|
12
|
+
|
13
|
+
# Constants
|
14
|
+
|
15
|
+
MAILSLOT_WAIT_FOREVER = -1
|
16
|
+
MAILSLOT_NO_MESSAGE = -1
|
17
|
+
|
18
|
+
API.new('CreateMailslot', 'SLLP', 'L')
|
19
|
+
API.new('GetMailslotInfo', 'LPPPP', 'B')
|
20
|
+
API.new('SetMailslotInfo', 'LL', 'B')
|
21
|
+
end
|
22
|
+
end
|
data/lib/windows/process.rb
CHANGED
@@ -122,7 +122,6 @@ module Windows
|
|
122
122
|
API.new('GetProcessVersion', 'L', 'L')
|
123
123
|
API.new('GetProcessWorkingSetSize', 'LPP', 'B')
|
124
124
|
API.new('GetStartupInfo', 'P', 'V')
|
125
|
-
API.new('IsProcessInJob', 'LLP', 'B')
|
126
125
|
API.new('OpenJobObject', 'LIS', 'L')
|
127
126
|
API.new('OpenProcess', 'LIL', 'L')
|
128
127
|
API.new('QueryInformationJobObject', 'LLPLP', 'B')
|
@@ -141,6 +140,7 @@ module Windows
|
|
141
140
|
begin
|
142
141
|
API.new('GetProcessId', 'L', 'L')
|
143
142
|
API.new('GetProcessHandleCount', 'LP', 'B')
|
143
|
+
API.new('IsProcessInJob', 'LLP', 'B')
|
144
144
|
API.new('IsWow64Process', 'LP', 'B')
|
145
145
|
rescue Win32::API::LoadLibraryError
|
146
146
|
# Windows XP or later
|
data/test/tc_mailslot.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#####################################################################
|
2
|
+
# tc_mailslot.rb
|
3
|
+
#
|
4
|
+
# Test case for the Windows::Mailslot module.
|
5
|
+
#####################################################################
|
6
|
+
require 'windows/mailslot'
|
7
|
+
require 'test/unit'
|
8
|
+
|
9
|
+
class TC_Windows_Mailslot < Test::Unit::TestCase
|
10
|
+
include Windows::Mailslot
|
11
|
+
|
12
|
+
def test_constants
|
13
|
+
assert_equal(-1, MAILSLOT_WAIT_FOREVER)
|
14
|
+
assert_equal(-1, MAILSLOT_NO_MESSAGE)
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_methods
|
18
|
+
assert_respond_to(self, :CreateMailslot)
|
19
|
+
assert_respond_to(self, :GetMailslotInfo)
|
20
|
+
assert_respond_to(self, :SetMailslotInfo)
|
21
|
+
end
|
22
|
+
end
|
data/windows-pr.gemspec
CHANGED
@@ -1,21 +1,28 @@
|
|
1
|
-
require
|
1
|
+
require 'rubygems'
|
2
2
|
|
3
3
|
spec = Gem::Specification.new do |gem|
|
4
|
-
gem.name
|
5
|
-
gem.version
|
6
|
-
gem.license
|
7
|
-
gem.authors
|
8
|
-
gem.email
|
9
|
-
gem.homepage
|
4
|
+
gem.name = 'windows-pr'
|
5
|
+
gem.version = '1.0.7'
|
6
|
+
gem.license = 'Artistic 2.0'
|
7
|
+
gem.authors = ['Daniel J. Berger', 'Park Heesob']
|
8
|
+
gem.email = 'djberg96@gmail.com'
|
9
|
+
gem.homepage = 'http://www.rubyforge.org/projects/win32utils'
|
10
|
+
gem.platform = Gem::Platform::RUBY
|
11
|
+
gem.summary = 'Windows functions and constants bundled via Win32::API'
|
12
|
+
gem.test_files = Dir["test/tc*"]
|
13
|
+
gem.files = Dir["**/*"].reject{ |f| f.include?('CVS') }
|
14
|
+
|
10
15
|
gem.rubyforge_project = 'win32utils'
|
11
|
-
|
12
|
-
gem.
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
+
|
17
|
+
gem.extra_rdoc_files = [
|
18
|
+
'MANIFEST',
|
19
|
+
'README',
|
20
|
+
'CHANGES',
|
21
|
+
'doc/conversion_guide.txt'
|
22
|
+
]
|
16
23
|
|
17
24
|
gem.add_dependency('windows-api', '>= 0.3.0')
|
18
|
-
gem.add_dependency('win32-api', '>= 1.4.
|
25
|
+
gem.add_dependency('win32-api', '>= 1.4.4')
|
19
26
|
|
20
27
|
gem.description = <<-EOF
|
21
28
|
The windows-pr library is a collection of Windows functions and constants
|
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: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-
|
13
|
+
date: 2009-08-20 00:00:00 -06:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -31,7 +31,7 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 1.4.
|
34
|
+
version: 1.4.4
|
35
35
|
version:
|
36
36
|
description: " The windows-pr library is a collection of Windows functions and constants\n pre-defined for you using the windows-api library. It also autogenerates\n explicit ANSI and Wide character versions of those functions, as well as\n constants that can be used as methods, e.g. CloseHandle() instead of\n CloseHandle.call().\n"
|
37
37
|
email: djberg96@gmail.com
|
@@ -43,6 +43,7 @@ extra_rdoc_files:
|
|
43
43
|
- MANIFEST
|
44
44
|
- README
|
45
45
|
- CHANGES
|
46
|
+
- doc/conversion_guide.txt
|
46
47
|
files:
|
47
48
|
- CHANGES
|
48
49
|
- doc/conversion_guide.txt
|
@@ -67,6 +68,7 @@ files:
|
|
67
68
|
- lib/windows/handle.rb
|
68
69
|
- lib/windows/library.rb
|
69
70
|
- lib/windows/limits.rb
|
71
|
+
- lib/windows/mailslot.rb
|
70
72
|
- lib/windows/memory.rb
|
71
73
|
- lib/windows/msvcrt/buffer.rb
|
72
74
|
- lib/windows/msvcrt/directory.rb
|
@@ -123,6 +125,7 @@ files:
|
|
123
125
|
- test/tc_handle.rb
|
124
126
|
- test/tc_library.rb
|
125
127
|
- test/tc_limits.rb
|
128
|
+
- test/tc_mailslot.rb
|
126
129
|
- test/tc_memory.rb
|
127
130
|
- test/tc_msvcrt_buffer.rb
|
128
131
|
- test/tc_msvcrt_directory.rb
|
@@ -184,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
184
187
|
requirements: []
|
185
188
|
|
186
189
|
rubyforge_project: win32utils
|
187
|
-
rubygems_version: 1.3.
|
190
|
+
rubygems_version: 1.3.5
|
188
191
|
signing_key:
|
189
192
|
specification_version: 3
|
190
193
|
summary: Windows functions and constants bundled via Win32::API
|
@@ -206,6 +209,7 @@ test_files:
|
|
206
209
|
- test/tc_handle.rb
|
207
210
|
- test/tc_library.rb
|
208
211
|
- test/tc_limits.rb
|
212
|
+
- test/tc_mailslot.rb
|
209
213
|
- test/tc_memory.rb
|
210
214
|
- test/tc_msvcrt_buffer.rb
|
211
215
|
- test/tc_msvcrt_directory.rb
|