windows-pr 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGES +444 -438
- data/MANIFEST +68 -65
- data/README +154 -153
- data/Rakefile +42 -37
- data/doc/conversion_guide.txt +37 -37
- data/lib/windows/clipboard.rb +61 -61
- data/lib/windows/com.rb +192 -192
- data/lib/windows/com/accessibility.rb +16 -16
- data/lib/windows/com/automation.rb +149 -149
- data/lib/windows/com/variant.rb +24 -24
- data/lib/windows/console.rb +114 -114
- data/lib/windows/debug.rb +35 -35
- data/lib/windows/device_io.rb +248 -248
- data/lib/windows/directory.rb +27 -27
- data/lib/windows/error.rb +504 -498
- data/lib/windows/eventlog.rb +80 -80
- data/lib/windows/file.rb +264 -264
- data/lib/windows/file_mapping.rb +25 -25
- data/lib/windows/filesystem.rb +15 -15
- data/lib/windows/gdi/bitmap.rb +65 -65
- data/lib/windows/gdi/device_context.rb +46 -46
- data/lib/windows/gdi/metafile.rb +40 -40
- data/lib/windows/gdi/painting_drawing.rb +115 -115
- data/lib/windows/handle.rb +23 -23
- data/lib/windows/library.rb +44 -44
- data/lib/windows/limits.rb +34 -34
- data/lib/windows/mailslot.rb +24 -24
- data/lib/windows/memory.rb +128 -128
- data/lib/windows/msvcrt/buffer.rb +75 -75
- data/lib/windows/msvcrt/directory.rb +31 -31
- data/lib/windows/msvcrt/file.rb +47 -47
- data/lib/windows/msvcrt/io.rb +73 -73
- data/lib/windows/msvcrt/string.rb +182 -182
- data/lib/windows/msvcrt/time.rb +169 -169
- data/lib/windows/national.rb +580 -580
- data/lib/windows/network/management.rb +525 -525
- data/lib/windows/network/snmp.rb +92 -92
- data/lib/windows/network/winsock.rb +128 -128
- data/lib/windows/nio.rb +50 -50
- data/lib/windows/ntfs/winternl.rb +117 -117
- data/lib/windows/path.rb +143 -143
- data/lib/windows/pipe.rb +42 -42
- data/lib/windows/process.rb +176 -176
- data/lib/windows/registry.rb +171 -171
- data/lib/windows/security.rb +479 -479
- data/lib/windows/security/authentication.rb +32 -32
- data/lib/windows/security/sspi.rb +153 -0
- data/lib/windows/service.rb +142 -142
- data/lib/windows/shell.rb +171 -171
- data/lib/windows/socket.rb +86 -86
- data/lib/windows/sound.rb +39 -39
- data/lib/windows/synchronize.rb +133 -133
- data/lib/windows/system_info.rb +229 -229
- data/lib/windows/thread.rb +64 -64
- data/lib/windows/time.rb +48 -48
- data/lib/windows/tool_helper.rb +36 -36
- data/lib/windows/unicode.rb +155 -155
- data/lib/windows/volume.rb +61 -61
- data/lib/windows/window.rb +81 -81
- data/lib/windows/window/classes.rb +59 -59
- data/lib/windows/window/dialog.rb +91 -91
- data/lib/windows/window/menu.rb +102 -102
- data/lib/windows/window/message.rb +297 -297
- data/lib/windows/window/properties.rb +20 -20
- data/lib/windows/window/timer.rb +19 -19
- data/lib/windows/wsa.rb +102 -102
- data/test/tc_clipboard.rb +41 -41
- data/test/tc_com.rb +32 -32
- data/test/tc_com_automation.rb +15 -15
- data/test/tc_console.rb +108 -108
- data/test/tc_debug.rb +48 -48
- data/test/tc_device_io.rb +29 -29
- data/test/tc_directory.rb +25 -25
- data/test/tc_error.rb +38 -38
- data/test/tc_eventlog.rb +58 -58
- data/test/tc_file.rb +67 -67
- data/test/tc_file_mapping.rb +38 -38
- data/test/tc_filesystem.rb +27 -27
- data/test/tc_gdi_bitmap.rb +25 -25
- data/test/tc_gdi_metafile.rb +23 -23
- data/test/tc_handle.rb +36 -36
- data/test/tc_library.rb +37 -37
- data/test/tc_limits.rb +34 -34
- data/test/tc_mailslot.rb +22 -22
- data/test/tc_memory.rb +44 -44
- data/test/tc_msvcrt_buffer.rb +63 -63
- data/test/tc_msvcrt_directory.rb +96 -96
- data/test/tc_msvcrt_file.rb +80 -80
- data/test/tc_msvcrt_io.rb +48 -48
- data/test/tc_msvcrt_string.rb +94 -94
- data/test/tc_msvcrt_time.rb +19 -19
- data/test/tc_national.rb +38 -38
- data/test/tc_network_management.rb +32 -32
- data/test/tc_network_snmp.rb +31 -31
- data/test/tc_network_winsock.rb +34 -34
- data/test/tc_nio.rb +32 -32
- data/test/tc_ntfs_winternl.rb +48 -48
- data/test/tc_path.rb +90 -90
- data/test/tc_pipe.rb +53 -53
- data/test/tc_process.rb +24 -24
- data/test/tc_registry.rb +29 -29
- data/test/tc_security.rb +104 -104
- data/test/tc_security_authentication.rb +34 -34
- data/test/tc_security_sspi.rb +23 -0
- data/test/tc_service.rb +57 -57
- data/test/tc_shell.rb +34 -34
- data/test/tc_socket.rb +20 -20
- data/test/tc_sound.rb +37 -37
- data/test/tc_synchronize.rb +75 -75
- data/test/tc_system_info.rb +33 -33
- data/test/tc_thread.rb +29 -29
- data/test/tc_time.rb +32 -32
- data/test/tc_tool_helper.rb +29 -29
- data/test/tc_unicode.rb +83 -83
- data/test/tc_volume.rb +47 -47
- data/test/tc_window.rb +45 -45
- data/test/tc_window_classes.rb +33 -33
- data/test/tc_window_dialog.rb +33 -33
- data/test/tc_window_menu.rb +29 -29
- data/test/tc_window_message.rb +33 -33
- data/test/tc_window_properties.rb +29 -29
- data/test/tc_window_timer.rb +29 -29
- data/test/tc_wsa.rb +19 -19
- data/windows-pr.gemspec +33 -34
- metadata +31 -32
@@ -1,20 +1,20 @@
|
|
1
|
-
require 'windows/api'
|
2
|
-
|
3
|
-
module Windows
|
4
|
-
module Window
|
5
|
-
module Properties
|
6
|
-
API.auto_namespace = 'Windows::Window::Properties'
|
7
|
-
API.auto_constant = true
|
8
|
-
API.auto_method = true
|
9
|
-
API.auto_unicode = true
|
10
|
-
|
11
|
-
private
|
12
|
-
|
13
|
-
API.new('EnumProps', 'LK', 'I', 'user32')
|
14
|
-
API.new('EnumPropsEx', 'LKL', 'I', 'user32')
|
15
|
-
API.new('GetProp', 'LP', 'L', 'user32')
|
16
|
-
API.new('RemoveProp', 'LP', 'L', 'user32')
|
17
|
-
API.new('SetProp', 'LPL', 'B', 'user32')
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
1
|
+
require 'windows/api'
|
2
|
+
|
3
|
+
module Windows
|
4
|
+
module Window
|
5
|
+
module Properties
|
6
|
+
API.auto_namespace = 'Windows::Window::Properties'
|
7
|
+
API.auto_constant = true
|
8
|
+
API.auto_method = true
|
9
|
+
API.auto_unicode = true
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
API.new('EnumProps', 'LK', 'I', 'user32')
|
14
|
+
API.new('EnumPropsEx', 'LKL', 'I', 'user32')
|
15
|
+
API.new('GetProp', 'LP', 'L', 'user32')
|
16
|
+
API.new('RemoveProp', 'LP', 'L', 'user32')
|
17
|
+
API.new('SetProp', 'LPL', 'B', 'user32')
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/windows/window/timer.rb
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
require 'windows/api'
|
2
|
-
|
3
|
-
module Windows
|
4
|
-
module Window
|
5
|
-
module Timer
|
6
|
-
API.auto_namespace = 'Windows::Window::Timer'
|
7
|
-
API.auto_constant = true
|
8
|
-
API.auto_method = true
|
9
|
-
API.auto_unicode = false
|
10
|
-
|
11
|
-
private
|
12
|
-
|
13
|
-
API.new('KillTimer', 'LP', 'B', 'user32')
|
14
|
-
API.new('QueryPerformanceCounter', 'P', 'B')
|
15
|
-
API.new('QueryPerformanceFrequency', 'P', 'B')
|
16
|
-
API.new('SetTimer', 'LIIK', 'P', 'user32')
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
1
|
+
require 'windows/api'
|
2
|
+
|
3
|
+
module Windows
|
4
|
+
module Window
|
5
|
+
module Timer
|
6
|
+
API.auto_namespace = 'Windows::Window::Timer'
|
7
|
+
API.auto_constant = true
|
8
|
+
API.auto_method = true
|
9
|
+
API.auto_unicode = false
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
API.new('KillTimer', 'LP', 'B', 'user32')
|
14
|
+
API.new('QueryPerformanceCounter', 'P', 'B')
|
15
|
+
API.new('QueryPerformanceFrequency', 'P', 'B')
|
16
|
+
API.new('SetTimer', 'LIIK', 'P', 'user32')
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/windows/wsa.rb
CHANGED
@@ -1,102 +1,102 @@
|
|
1
|
-
require 'windows/api'
|
2
|
-
|
3
|
-
module Windows
|
4
|
-
module WSA
|
5
|
-
API.auto_namespace = 'Windows::WSA'
|
6
|
-
API.auto_constant = true
|
7
|
-
API.auto_method = true
|
8
|
-
API.auto_unicode = true
|
9
|
-
|
10
|
-
private
|
11
|
-
|
12
|
-
# Constants
|
13
|
-
|
14
|
-
WSA_FLAG_OVERLAPPED = 0x01
|
15
|
-
WSA_FLAG_MULTIPOINT_C_ROOT = 0x02
|
16
|
-
WSA_FLAG_MULTIPOINT_C_LEAF = 0x04
|
17
|
-
WSA_FLAG_MULTIPOINT_D_ROOT = 0x08
|
18
|
-
WSA_FLAG_MULTIPOINT_D_LEAF = 0x10
|
19
|
-
WSA_FLAG_ACCESS_SYSTEM_SECURITY = 0x40
|
20
|
-
WSA_FLAG_NO_HANDLE_INHERIT = 0x80
|
21
|
-
|
22
|
-
RNRSERVICE_REGISTER = 0
|
23
|
-
RNRSERVICE_DEREGISTER = 1
|
24
|
-
RNRSERVICE_DELETE = 2
|
25
|
-
|
26
|
-
# Functions
|
27
|
-
|
28
|
-
API.new('WSAAccept', 'LPPKP', 'L', 'ws2_32')
|
29
|
-
API.new('WSAAddressToString', 'PLPPP', 'I', 'ws2_32')
|
30
|
-
API.new('WSAAsyncGetHostByAddr', 'LISIIPI', 'L', 'ws2_32')
|
31
|
-
API.new('WSAAsyncGetHostByName', 'LISPI', 'L', 'ws2_32')
|
32
|
-
API.new('WSAAsyncGetProtoByName', 'LISPI', 'L', 'ws2_32')
|
33
|
-
API.new('WSAAsyncGetProtoByNumber', 'LISPI', 'L', 'ws2_32')
|
34
|
-
API.new('WSAAsyncGetServByName', 'LISSPI', 'L', 'ws2_32')
|
35
|
-
API.new('WSAAsyncGetServByPort', 'LIISPI', 'L', 'ws2_32')
|
36
|
-
API.new('WSAAsyncSelect', 'LLIL', 'I', 'ws2_32')
|
37
|
-
API.new('WSACancelAsyncRequest', 'L', 'I', 'ws2_32')
|
38
|
-
API.new('WSACleanup', 'V', 'I', 'ws2_32')
|
39
|
-
API.new('WSACloseEvent', 'I', 'B', 'ws2_32')
|
40
|
-
API.new('WSAConnect', 'LPIPPPP', 'I', 'ws2_32')
|
41
|
-
API.new('WSACreateEvent', 'V', 'L', 'ws2_32')
|
42
|
-
API.new('WSADuplicateSocket', 'LLP', 'I', 'ws2_32')
|
43
|
-
API.new('WSAEnumNetworkEvents', 'LLP', 'I', 'ws2_32')
|
44
|
-
API.new('WSAEnumProtocols', 'PPP', 'I', 'ws2_32')
|
45
|
-
API.new('WSAEventSelect', 'LLL', 'I', 'ws2_32')
|
46
|
-
API.new('WSAGetLastError', 'V', 'I', 'ws2_32')
|
47
|
-
API.new('WSAGetOverlappedResult', 'LPPIP', 'B', 'ws2_32')
|
48
|
-
API.new('WSAGetQOSByName', 'LPP', 'B', 'ws2_32')
|
49
|
-
API.new('WSAGetServiceClassInfo', 'PPPP', 'I', 'ws2_32')
|
50
|
-
API.new('WSAGetServiceClassNameByClassId', 'PPP', 'I', 'ws2_32')
|
51
|
-
API.new('WSAHtonl', 'LLP', 'I', 'ws2_32')
|
52
|
-
API.new('WSAHtons', 'LIP', 'I', 'ws2_32')
|
53
|
-
API.new('WSAInstallServiceClass', 'P', 'I', 'ws2_32')
|
54
|
-
API.new('WSAIoctl', 'LLPLPLPPP', 'I', 'ws2_32')
|
55
|
-
API.new('WSAJoinLeaf', 'LPIPPPPL', 'L', 'ws2_32')
|
56
|
-
API.new('WSALookupServiceBegin', 'PLP', 'I', 'ws2_32')
|
57
|
-
API.new('WSALookupServiceEnd', 'L', 'I', 'ws2_32')
|
58
|
-
API.new('WSALookupServiceNext', 'LLPP', 'I', 'ws2_32')
|
59
|
-
API.new('WSANtohl', 'LLP', 'I', 'ws2_32')
|
60
|
-
API.new('WSANtohs', 'LIP', 'I', 'ws2_32')
|
61
|
-
API.new('WSAProviderConfigChange', 'PPP', 'I', 'ws2_32')
|
62
|
-
API.new('WSARecv', 'LPLPPPP', 'I', 'ws2_32')
|
63
|
-
API.new('WSARecvDisconnect', 'LP', 'I', 'ws2_32')
|
64
|
-
API.new('WSARecvEx', 'LPIP', 'I', 'mswsock')
|
65
|
-
API.new('WSARecvFrom', 'LPLPPPPPP', 'I', 'ws2_32')
|
66
|
-
API.new('WSARemoveServiceClass', 'P', 'I', 'ws2_32')
|
67
|
-
API.new('WSAResetEvent', 'L', 'B', 'ws2_32')
|
68
|
-
API.new('WSASend', 'LPLPLPP', 'I', 'ws2_32')
|
69
|
-
API.new('WSASendDisconnect', 'LP', 'I', 'ws2_32')
|
70
|
-
API.new('WSASendTo', 'LPLPLPIPP', 'I', 'ws2_32')
|
71
|
-
API.new('WSASetEvent', 'L', 'B', 'ws2_32')
|
72
|
-
API.new('WSASetLastError', 'I', 'V', 'ws2_32')
|
73
|
-
API.new('WSASetService', 'PIL', 'I', 'ws2_32')
|
74
|
-
API.new('WSAStartup', 'LP', 'I', 'ws2_32')
|
75
|
-
API.new('WSASocket', 'IIIPLL', 'L', 'ws2_32')
|
76
|
-
API.new('WSAStringToAddress', 'PIPPP', 'I', 'ws2_32')
|
77
|
-
API.new('WSAWaitForMultipleEvents', 'LPILI', 'L', 'ws2_32')
|
78
|
-
|
79
|
-
begin
|
80
|
-
API.new('WSAConnectByList', 'LPPPPPPP', 'B', 'ws2_32')
|
81
|
-
API.new('WSAConnectByName', 'LPPPPPPP', 'B', 'ws2_32')
|
82
|
-
API.new('WSADeleteSocketPeerTargetName', 'LPLPP', 'L', 'fwpuclnt')
|
83
|
-
API.new('WSAEnumNameSpaceProvidersEx', 'PP', 'I', 'ws2_32')
|
84
|
-
API.new('WSAPoll', 'PLI', 'I', 'ws2_32')
|
85
|
-
API.new('WSAQuerySocketSecurity', 'LPLPPPP', 'I', 'fwpuclnt')
|
86
|
-
API.new('WSARevertImpersonation', 'V', 'I', 'fwpuclnt')
|
87
|
-
API.new('WSASendMsg', 'LPLPPP', 'I', 'ws2_32')
|
88
|
-
API.new('WSASetSocketPeerTargetName', 'LPLPP', 'I', 'fwpuclnt')
|
89
|
-
API.new('WSASetSocketSecurity', 'LPLPP', 'I', 'fwpuclnt')
|
90
|
-
rescue Win32::API::LoadLibraryError
|
91
|
-
# Vista or later
|
92
|
-
end
|
93
|
-
|
94
|
-
begin
|
95
|
-
API.new('WSAEnumNameSpaceProviders', 'PP', 'I', 'ws2_32')
|
96
|
-
API.new('WSAImpersonateSocketPeer', 'LPL', 'I', 'fwpuclnt')
|
97
|
-
API.new('WSANSPIoctl', 'LLPLPLPP', 'I', 'ws2_32')
|
98
|
-
rescue Win32::API::LoadLibraryError
|
99
|
-
# XP or later
|
100
|
-
end
|
101
|
-
end
|
102
|
-
end
|
1
|
+
require 'windows/api'
|
2
|
+
|
3
|
+
module Windows
|
4
|
+
module WSA
|
5
|
+
API.auto_namespace = 'Windows::WSA'
|
6
|
+
API.auto_constant = true
|
7
|
+
API.auto_method = true
|
8
|
+
API.auto_unicode = true
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
# Constants
|
13
|
+
|
14
|
+
WSA_FLAG_OVERLAPPED = 0x01
|
15
|
+
WSA_FLAG_MULTIPOINT_C_ROOT = 0x02
|
16
|
+
WSA_FLAG_MULTIPOINT_C_LEAF = 0x04
|
17
|
+
WSA_FLAG_MULTIPOINT_D_ROOT = 0x08
|
18
|
+
WSA_FLAG_MULTIPOINT_D_LEAF = 0x10
|
19
|
+
WSA_FLAG_ACCESS_SYSTEM_SECURITY = 0x40
|
20
|
+
WSA_FLAG_NO_HANDLE_INHERIT = 0x80
|
21
|
+
|
22
|
+
RNRSERVICE_REGISTER = 0
|
23
|
+
RNRSERVICE_DEREGISTER = 1
|
24
|
+
RNRSERVICE_DELETE = 2
|
25
|
+
|
26
|
+
# Functions
|
27
|
+
|
28
|
+
API.new('WSAAccept', 'LPPKP', 'L', 'ws2_32')
|
29
|
+
API.new('WSAAddressToString', 'PLPPP', 'I', 'ws2_32')
|
30
|
+
API.new('WSAAsyncGetHostByAddr', 'LISIIPI', 'L', 'ws2_32')
|
31
|
+
API.new('WSAAsyncGetHostByName', 'LISPI', 'L', 'ws2_32')
|
32
|
+
API.new('WSAAsyncGetProtoByName', 'LISPI', 'L', 'ws2_32')
|
33
|
+
API.new('WSAAsyncGetProtoByNumber', 'LISPI', 'L', 'ws2_32')
|
34
|
+
API.new('WSAAsyncGetServByName', 'LISSPI', 'L', 'ws2_32')
|
35
|
+
API.new('WSAAsyncGetServByPort', 'LIISPI', 'L', 'ws2_32')
|
36
|
+
API.new('WSAAsyncSelect', 'LLIL', 'I', 'ws2_32')
|
37
|
+
API.new('WSACancelAsyncRequest', 'L', 'I', 'ws2_32')
|
38
|
+
API.new('WSACleanup', 'V', 'I', 'ws2_32')
|
39
|
+
API.new('WSACloseEvent', 'I', 'B', 'ws2_32')
|
40
|
+
API.new('WSAConnect', 'LPIPPPP', 'I', 'ws2_32')
|
41
|
+
API.new('WSACreateEvent', 'V', 'L', 'ws2_32')
|
42
|
+
API.new('WSADuplicateSocket', 'LLP', 'I', 'ws2_32')
|
43
|
+
API.new('WSAEnumNetworkEvents', 'LLP', 'I', 'ws2_32')
|
44
|
+
API.new('WSAEnumProtocols', 'PPP', 'I', 'ws2_32')
|
45
|
+
API.new('WSAEventSelect', 'LLL', 'I', 'ws2_32')
|
46
|
+
API.new('WSAGetLastError', 'V', 'I', 'ws2_32')
|
47
|
+
API.new('WSAGetOverlappedResult', 'LPPIP', 'B', 'ws2_32')
|
48
|
+
API.new('WSAGetQOSByName', 'LPP', 'B', 'ws2_32')
|
49
|
+
API.new('WSAGetServiceClassInfo', 'PPPP', 'I', 'ws2_32')
|
50
|
+
API.new('WSAGetServiceClassNameByClassId', 'PPP', 'I', 'ws2_32')
|
51
|
+
API.new('WSAHtonl', 'LLP', 'I', 'ws2_32')
|
52
|
+
API.new('WSAHtons', 'LIP', 'I', 'ws2_32')
|
53
|
+
API.new('WSAInstallServiceClass', 'P', 'I', 'ws2_32')
|
54
|
+
API.new('WSAIoctl', 'LLPLPLPPP', 'I', 'ws2_32')
|
55
|
+
API.new('WSAJoinLeaf', 'LPIPPPPL', 'L', 'ws2_32')
|
56
|
+
API.new('WSALookupServiceBegin', 'PLP', 'I', 'ws2_32')
|
57
|
+
API.new('WSALookupServiceEnd', 'L', 'I', 'ws2_32')
|
58
|
+
API.new('WSALookupServiceNext', 'LLPP', 'I', 'ws2_32')
|
59
|
+
API.new('WSANtohl', 'LLP', 'I', 'ws2_32')
|
60
|
+
API.new('WSANtohs', 'LIP', 'I', 'ws2_32')
|
61
|
+
API.new('WSAProviderConfigChange', 'PPP', 'I', 'ws2_32')
|
62
|
+
API.new('WSARecv', 'LPLPPPP', 'I', 'ws2_32')
|
63
|
+
API.new('WSARecvDisconnect', 'LP', 'I', 'ws2_32')
|
64
|
+
API.new('WSARecvEx', 'LPIP', 'I', 'mswsock')
|
65
|
+
API.new('WSARecvFrom', 'LPLPPPPPP', 'I', 'ws2_32')
|
66
|
+
API.new('WSARemoveServiceClass', 'P', 'I', 'ws2_32')
|
67
|
+
API.new('WSAResetEvent', 'L', 'B', 'ws2_32')
|
68
|
+
API.new('WSASend', 'LPLPLPP', 'I', 'ws2_32')
|
69
|
+
API.new('WSASendDisconnect', 'LP', 'I', 'ws2_32')
|
70
|
+
API.new('WSASendTo', 'LPLPLPIPP', 'I', 'ws2_32')
|
71
|
+
API.new('WSASetEvent', 'L', 'B', 'ws2_32')
|
72
|
+
API.new('WSASetLastError', 'I', 'V', 'ws2_32')
|
73
|
+
API.new('WSASetService', 'PIL', 'I', 'ws2_32')
|
74
|
+
API.new('WSAStartup', 'LP', 'I', 'ws2_32')
|
75
|
+
API.new('WSASocket', 'IIIPLL', 'L', 'ws2_32')
|
76
|
+
API.new('WSAStringToAddress', 'PIPPP', 'I', 'ws2_32')
|
77
|
+
API.new('WSAWaitForMultipleEvents', 'LPILI', 'L', 'ws2_32')
|
78
|
+
|
79
|
+
begin
|
80
|
+
API.new('WSAConnectByList', 'LPPPPPPP', 'B', 'ws2_32')
|
81
|
+
API.new('WSAConnectByName', 'LPPPPPPP', 'B', 'ws2_32')
|
82
|
+
API.new('WSADeleteSocketPeerTargetName', 'LPLPP', 'L', 'fwpuclnt')
|
83
|
+
API.new('WSAEnumNameSpaceProvidersEx', 'PP', 'I', 'ws2_32')
|
84
|
+
API.new('WSAPoll', 'PLI', 'I', 'ws2_32')
|
85
|
+
API.new('WSAQuerySocketSecurity', 'LPLPPPP', 'I', 'fwpuclnt')
|
86
|
+
API.new('WSARevertImpersonation', 'V', 'I', 'fwpuclnt')
|
87
|
+
API.new('WSASendMsg', 'LPLPPP', 'I', 'ws2_32')
|
88
|
+
API.new('WSASetSocketPeerTargetName', 'LPLPP', 'I', 'fwpuclnt')
|
89
|
+
API.new('WSASetSocketSecurity', 'LPLPP', 'I', 'fwpuclnt')
|
90
|
+
rescue Win32::API::LoadLibraryError
|
91
|
+
# Vista or later
|
92
|
+
end
|
93
|
+
|
94
|
+
begin
|
95
|
+
API.new('WSAEnumNameSpaceProviders', 'PP', 'I', 'ws2_32')
|
96
|
+
API.new('WSAImpersonateSocketPeer', 'LPL', 'I', 'fwpuclnt')
|
97
|
+
API.new('WSANSPIoctl', 'LLPLPLPP', 'I', 'ws2_32')
|
98
|
+
rescue Win32::API::LoadLibraryError
|
99
|
+
# XP or later
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
data/test/tc_clipboard.rb
CHANGED
@@ -1,41 +1,41 @@
|
|
1
|
-
#####################################################################
|
2
|
-
# tc_clipboard.rb
|
3
|
-
#
|
4
|
-
# Test case for the Windows::Clipboard module.
|
5
|
-
#####################################################################
|
6
|
-
require 'windows/clipboard'
|
7
|
-
require 'test/unit'
|
8
|
-
|
9
|
-
class TC_Windows_Clipboard < Test::Unit::TestCase
|
10
|
-
include Windows::Clipboard
|
11
|
-
|
12
|
-
def test_methods
|
13
|
-
assert_respond_to(self, :OpenClipboard)
|
14
|
-
assert_respond_to(self, :CloseClipboard)
|
15
|
-
assert_respond_to(self, :GetClipboardData)
|
16
|
-
assert_respond_to(self, :EmptyClipboard)
|
17
|
-
assert_respond_to(self, :SetClipboardData)
|
18
|
-
assert_respond_to(self, :CountClipboardFormats)
|
19
|
-
assert_respond_to(self, :IsClipboardFormatAvailable)
|
20
|
-
assert_respond_to(self, :GetClipboardFormatName)
|
21
|
-
assert_respond_to(self, :EnumClipboardFormats)
|
22
|
-
assert_respond_to(self, :RegisterClipboardFormat)
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_constants
|
26
|
-
assert_equal(1, CF_TEXT)
|
27
|
-
assert_equal(2, CF_BITMAP)
|
28
|
-
assert_equal(3, CF_METAFILEPICT)
|
29
|
-
assert_equal(4, CF_SYLK)
|
30
|
-
assert_equal(5, CF_DIF)
|
31
|
-
assert_equal(6, CF_TIFF)
|
32
|
-
assert_equal(7, CF_OEMTEXT)
|
33
|
-
assert_equal(8, CF_DIB)
|
34
|
-
assert_equal(9, CF_PALETTE)
|
35
|
-
assert_equal(10, CF_PENDATA)
|
36
|
-
assert_equal(11, CF_RIFF)
|
37
|
-
assert_equal(12, CF_WAVE)
|
38
|
-
assert_equal(13, CF_UNICODETEXT)
|
39
|
-
assert_equal(14, CF_ENHMETAFILE)
|
40
|
-
end
|
41
|
-
end
|
1
|
+
#####################################################################
|
2
|
+
# tc_clipboard.rb
|
3
|
+
#
|
4
|
+
# Test case for the Windows::Clipboard module.
|
5
|
+
#####################################################################
|
6
|
+
require 'windows/clipboard'
|
7
|
+
require 'test/unit'
|
8
|
+
|
9
|
+
class TC_Windows_Clipboard < Test::Unit::TestCase
|
10
|
+
include Windows::Clipboard
|
11
|
+
|
12
|
+
def test_methods
|
13
|
+
assert_respond_to(self, :OpenClipboard)
|
14
|
+
assert_respond_to(self, :CloseClipboard)
|
15
|
+
assert_respond_to(self, :GetClipboardData)
|
16
|
+
assert_respond_to(self, :EmptyClipboard)
|
17
|
+
assert_respond_to(self, :SetClipboardData)
|
18
|
+
assert_respond_to(self, :CountClipboardFormats)
|
19
|
+
assert_respond_to(self, :IsClipboardFormatAvailable)
|
20
|
+
assert_respond_to(self, :GetClipboardFormatName)
|
21
|
+
assert_respond_to(self, :EnumClipboardFormats)
|
22
|
+
assert_respond_to(self, :RegisterClipboardFormat)
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_constants
|
26
|
+
assert_equal(1, CF_TEXT)
|
27
|
+
assert_equal(2, CF_BITMAP)
|
28
|
+
assert_equal(3, CF_METAFILEPICT)
|
29
|
+
assert_equal(4, CF_SYLK)
|
30
|
+
assert_equal(5, CF_DIF)
|
31
|
+
assert_equal(6, CF_TIFF)
|
32
|
+
assert_equal(7, CF_OEMTEXT)
|
33
|
+
assert_equal(8, CF_DIB)
|
34
|
+
assert_equal(9, CF_PALETTE)
|
35
|
+
assert_equal(10, CF_PENDATA)
|
36
|
+
assert_equal(11, CF_RIFF)
|
37
|
+
assert_equal(12, CF_WAVE)
|
38
|
+
assert_equal(13, CF_UNICODETEXT)
|
39
|
+
assert_equal(14, CF_ENHMETAFILE)
|
40
|
+
end
|
41
|
+
end
|
data/test/tc_com.rb
CHANGED
@@ -1,32 +1,32 @@
|
|
1
|
-
#####################################################################
|
2
|
-
# tc_com.rb
|
3
|
-
#
|
4
|
-
# Test case for the Windows::COM module.
|
5
|
-
#####################################################################
|
6
|
-
require "windows/com"
|
7
|
-
require "test/unit"
|
8
|
-
|
9
|
-
class TC_Windows_COM < Test::Unit::TestCase
|
10
|
-
include Windows::COM
|
11
|
-
|
12
|
-
def test_method_constants
|
13
|
-
assert_respond_to(self, :BindMoniker)
|
14
|
-
assert_respond_to(self, :CLSIDFromProgID)
|
15
|
-
assert_respond_to(self, :CLSIDFromProgIDEx)
|
16
|
-
assert_respond_to(self, :CoAddRefServerProcess)
|
17
|
-
assert_respond_to(self, :CoAllowSetForegroundWindow)
|
18
|
-
assert_respond_to(self, :CoCancelCall)
|
19
|
-
assert_respond_to(self, :CoCopyProxy)
|
20
|
-
assert_respond_to(self, :CoCreateFreeThreadedMarshaler)
|
21
|
-
assert_respond_to(self, :CoCreateGuid)
|
22
|
-
assert_respond_to(self, :CoCreateInstance)
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_numeric_constants
|
26
|
-
assert_equal(0, VT_EMPTY)
|
27
|
-
assert_equal(1, VT_NULL)
|
28
|
-
assert_equal(2, VT_I2)
|
29
|
-
assert_equal(3, VT_I4)
|
30
|
-
assert_equal(4, VT_R4)
|
31
|
-
end
|
32
|
-
end
|
1
|
+
#####################################################################
|
2
|
+
# tc_com.rb
|
3
|
+
#
|
4
|
+
# Test case for the Windows::COM module.
|
5
|
+
#####################################################################
|
6
|
+
require "windows/com"
|
7
|
+
require "test/unit"
|
8
|
+
|
9
|
+
class TC_Windows_COM < Test::Unit::TestCase
|
10
|
+
include Windows::COM
|
11
|
+
|
12
|
+
def test_method_constants
|
13
|
+
assert_respond_to(self, :BindMoniker)
|
14
|
+
assert_respond_to(self, :CLSIDFromProgID)
|
15
|
+
assert_respond_to(self, :CLSIDFromProgIDEx)
|
16
|
+
assert_respond_to(self, :CoAddRefServerProcess)
|
17
|
+
assert_respond_to(self, :CoAllowSetForegroundWindow)
|
18
|
+
assert_respond_to(self, :CoCancelCall)
|
19
|
+
assert_respond_to(self, :CoCopyProxy)
|
20
|
+
assert_respond_to(self, :CoCreateFreeThreadedMarshaler)
|
21
|
+
assert_respond_to(self, :CoCreateGuid)
|
22
|
+
assert_respond_to(self, :CoCreateInstance)
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_numeric_constants
|
26
|
+
assert_equal(0, VT_EMPTY)
|
27
|
+
assert_equal(1, VT_NULL)
|
28
|
+
assert_equal(2, VT_I2)
|
29
|
+
assert_equal(3, VT_I4)
|
30
|
+
assert_equal(4, VT_R4)
|
31
|
+
end
|
32
|
+
end
|
data/test/tc_com_automation.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
#####################################################################
|
2
|
-
# tc_com_automation.rb
|
3
|
-
#
|
4
|
-
# Test case for the Windows::COM::Automation module.
|
5
|
-
#####################################################################
|
6
|
-
require 'windows/com/automation'
|
7
|
-
require 'test/unit'
|
8
|
-
|
9
|
-
class TC_Windows_COM_Automation < Test::Unit::TestCase
|
10
|
-
include Windows::COM::Automation
|
11
|
-
|
12
|
-
def test_method_constants
|
13
|
-
assert_respond_to(self, :BstrFromVector)
|
14
|
-
end
|
15
|
-
end
|
1
|
+
#####################################################################
|
2
|
+
# tc_com_automation.rb
|
3
|
+
#
|
4
|
+
# Test case for the Windows::COM::Automation module.
|
5
|
+
#####################################################################
|
6
|
+
require 'windows/com/automation'
|
7
|
+
require 'test/unit'
|
8
|
+
|
9
|
+
class TC_Windows_COM_Automation < Test::Unit::TestCase
|
10
|
+
include Windows::COM::Automation
|
11
|
+
|
12
|
+
def test_method_constants
|
13
|
+
assert_respond_to(self, :BstrFromVector)
|
14
|
+
end
|
15
|
+
end
|