windows-pr 0.8.7 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +15 -0
- data/MANIFEST +9 -1
- data/lib/windows/clipboard.rb +1 -2
- data/lib/windows/com/automation.rb +58 -0
- data/lib/windows/com.rb +0 -1
- data/lib/windows/console.rb +0 -1
- data/lib/windows/debug.rb +0 -1
- data/lib/windows/device_io.rb +0 -1
- data/lib/windows/error.rb +37 -32
- data/lib/windows/eventlog.rb +5 -6
- data/lib/windows/file.rb +10 -36
- data/lib/windows/file_mapping.rb +0 -1
- data/lib/windows/filesystem.rb +0 -1
- data/lib/windows/gdi/bitmap.rb +0 -1
- data/lib/windows/gdi/device_context.rb +0 -1
- data/lib/windows/gdi/painting_drawing.rb +0 -1
- data/lib/windows/handle.rb +0 -1
- data/lib/windows/library.rb +0 -1
- data/lib/windows/memory.rb +0 -1
- data/lib/windows/msvcrt/buffer.rb +0 -1
- data/lib/windows/msvcrt/directory.rb +8 -9
- data/lib/windows/msvcrt/file.rb +0 -1
- data/lib/windows/msvcrt/io.rb +0 -1
- data/lib/windows/msvcrt/string.rb +0 -1
- data/lib/windows/msvcrt/time.rb +0 -1
- data/lib/windows/national.rb +0 -1
- data/lib/windows/network/management.rb +523 -0
- data/lib/windows/network/snmp.rb +90 -0
- data/lib/windows/network/winsock.rb +126 -0
- data/lib/windows/nio.rb +0 -1
- data/lib/windows/ntfs/file.rb +58 -0
- data/lib/windows/path.rb +105 -38
- data/lib/windows/pipe.rb +0 -1
- data/lib/windows/security.rb +292 -6
- data/lib/windows/service.rb +0 -1
- data/lib/windows/shell.rb +4 -1
- data/lib/windows/sound.rb +0 -1
- data/lib/windows/synchronize.rb +0 -1
- data/lib/windows/system_info.rb +0 -1
- data/lib/windows/thread.rb +0 -1
- data/lib/windows/time.rb +0 -1
- data/lib/windows/unicode.rb +0 -1
- data/lib/windows/volume.rb +0 -1
- data/lib/windows/window/dialog.rb +89 -0
- data/lib/windows/window/message.rb +289 -0
- data/lib/windows/window/properties.rb +18 -0
- data/lib/windows/window/timer.rb +17 -0
- data/lib/windows/window.rb +0 -1
- data/test/tc_com.rb +17 -19
- data/test/tc_msvcrt_directory.rb +57 -27
- data/test/tc_msvcrt_string.rb +74 -18
- data/windows-pr.gemspec +4 -5
- metadata +33 -15
@@ -0,0 +1,126 @@
|
|
1
|
+
require 'windows/api'
|
2
|
+
|
3
|
+
module Windows
|
4
|
+
module Network
|
5
|
+
module Winsock
|
6
|
+
API.auto_namespace = 'Windows::Network::Winsock'
|
7
|
+
API.auto_constant = true
|
8
|
+
API.auto_method = true
|
9
|
+
API.auto_unicode = true
|
10
|
+
|
11
|
+
# Namespace constants
|
12
|
+
NS_DEFAULT = 0
|
13
|
+
NS_SAP = 1
|
14
|
+
NS_NDS = 2
|
15
|
+
NS_PEER_BROWSE = 3
|
16
|
+
NS_TCPIP_LOCAL = 10
|
17
|
+
NS_TCPIP_HOSTS = 11
|
18
|
+
NS_DNS = 12
|
19
|
+
NS_NETBT = 13
|
20
|
+
NS_WINS = 14
|
21
|
+
NS_NBP = 20
|
22
|
+
NS_MS = 30
|
23
|
+
NS_STDA = 31
|
24
|
+
NS_NTDS = 32
|
25
|
+
NS_X500 = 40
|
26
|
+
NS_NIS = 41
|
27
|
+
NS_VNS = 50
|
28
|
+
|
29
|
+
# Resolution flags
|
30
|
+
RES_SOFT_SEARCH = 0x00000001
|
31
|
+
RES_FIND_MULTIPLE = 0x00000002
|
32
|
+
RES_SERVICE = 0x00000004
|
33
|
+
|
34
|
+
API.new('accept', 'LPP', 'L', 'ws2_32')
|
35
|
+
API.new('AcceptEx', 'LLPLLLPP', 'B', 'mswsock')
|
36
|
+
API.new('bind', 'LPL', 'I', 'ws2_32')
|
37
|
+
API.new('closesocket', 'L', 'I', 'ws2_32')
|
38
|
+
API.new('connect', 'LPI', 'I', 'ws2_32')
|
39
|
+
API.new('EnumProtocols', 'PPP', 'I', 'mswsock')
|
40
|
+
API.new('freeaddrinfo', 'P', 'V', 'ws2_32')
|
41
|
+
API.new('FreeAddrInfoW', 'P', 'V', 'ws2_32')
|
42
|
+
API.new('GetAcceptExSockaddrs', 'PLLLPPPP', 'V', 'mswsock')
|
43
|
+
API.new('GetAddressByName', 'LPPPLPPPPP', 'V', 'mswsock')
|
44
|
+
API.new('getaddrinfo', 'PPPP', 'I', 'ws2_32')
|
45
|
+
API.new('gethostbyaddr', 'PII', 'L', 'ws2_32')
|
46
|
+
API.new('gethostbyname', 'P', 'L', 'ws2_32')
|
47
|
+
API.new('gethostname', 'PI', 'I', 'ws2_32')
|
48
|
+
API.new('GetNameByType', 'PPL', 'I', 'mswsock')
|
49
|
+
API.new('getnameinfo', 'PLPLPLI', 'I', 'ws2_32')
|
50
|
+
API.new('getpeername', 'LPP', 'I', 'ws2_32')
|
51
|
+
API.new('getprotobyname', 'P', 'L', 'ws2_32')
|
52
|
+
API.new('getprotobynumber', 'L', 'L', 'ws2_32')
|
53
|
+
API.new('getservbyname', 'PP', 'L', 'ws2_32')
|
54
|
+
API.new('getservbyport', 'IP', 'L', 'ws2_32')
|
55
|
+
API.new('GetService', 'LPPLPPP', 'I', 'mswsock')
|
56
|
+
API.new('getsockname', 'LPP', 'I', 'ws2_32')
|
57
|
+
API.new('getsockopt', 'LIIPP', 'I', 'ws2_32')
|
58
|
+
API.new('GetTypeByName', 'PP', 'I', 'mswsock')
|
59
|
+
API.new('htonl', 'L', 'L', 'ws2_32')
|
60
|
+
API.new('htons', 'I', 'I', 'ws2_32')
|
61
|
+
API.new('inet_addr', 'P', 'L', 'ws2_32')
|
62
|
+
API.new('inet_ntoa', 'P', 'P', 'ws2_32')
|
63
|
+
API.new('ioctlsocket', 'LLP', 'I', 'ws2_32')
|
64
|
+
API.new('listen', 'LI', 'I', 'ws2_32')
|
65
|
+
API.new('ntohl', 'L', 'L', 'ws2_32')
|
66
|
+
API.new('ntohs', 'I', 'I', 'ws2_32')
|
67
|
+
API.new('recv', 'LPII', 'I', 'ws2_32')
|
68
|
+
API.new('recvfrom', 'LPIIPP', 'I', 'ws2_32')
|
69
|
+
API.new('select', 'IPPPP', 'I', 'ws2_32')
|
70
|
+
API.new('send', 'LPII', 'I', 'ws2_32')
|
71
|
+
API.new('sendto', 'LPIIPI', 'I', 'ws2_32')
|
72
|
+
API.new('SetService', 'LLLPPP', 'I', 'mswsock')
|
73
|
+
API.new('setsockopt', 'LIIPI', 'I', 'ws2_32')
|
74
|
+
API.new('shutdown', 'LI', 'I', 'ws2_32')
|
75
|
+
API.new('socket', 'III', 'L', 'ws2_32')
|
76
|
+
API.new('TransmitFile', 'LLLLPPL', 'B', 'mswsock')
|
77
|
+
|
78
|
+
API.new('WSAAccept', 'PPPKL', 'I', 'ws2_32')
|
79
|
+
API.new('WSAAddressToString', 'PLPPP', 'I', 'ws2_32')
|
80
|
+
API.new('WSAAsyncGetHostByAddr', 'LIPIIPI', 'L', 'ws2_32')
|
81
|
+
API.new('WSAAsyncGetHostByName', 'LIPPI', 'L', 'ws2_32')
|
82
|
+
API.new('WSAAsyncGetProtoByName', 'LIPPI', 'L', 'ws2_32')
|
83
|
+
API.new('WSAAsyncGetServByName', 'LIPPPL', 'L', 'ws2_32')
|
84
|
+
API.new('WSAAsyncGetServByPort', 'LIIPPI', 'L', 'ws2_32')
|
85
|
+
API.new('WSAAsyncSelect', 'PLIL', 'I', 'ws2_32')
|
86
|
+
API.new('WSACleanup', 'V', 'I', 'ws2_32')
|
87
|
+
API.new('WSACloseEvent', 'L', 'B', 'ws2_32')
|
88
|
+
API.new('WSAConnect', 'LPIPPPP', 'I', 'ws2_32')
|
89
|
+
API.new('WSACreateEvent', 'V', 'L', 'ws2_32')
|
90
|
+
API.new('WSADuplicateSocket', 'LLP', 'I', 'ws2_32')
|
91
|
+
API.new('WSAEnumNameSpaceProviders', 'PP', 'I', 'ws2_32')
|
92
|
+
API.new('WSAEnumNetworkEvents', 'LLP', 'I', 'ws2_32')
|
93
|
+
API.new('WSAEnumProtocols', 'PPP', 'I', 'ws2_32')
|
94
|
+
API.new('WSAEventSelect', 'LLL', 'I', 'ws2_32')
|
95
|
+
API.new('WSAGetLastError', 'V', 'I', 'ws2_32')
|
96
|
+
API.new('WSAIoctl', 'LLPLPLPPP', 'I', 'ws2_32')
|
97
|
+
API.new('WSARecv', 'LPLPPPP', 'I', 'ws2_32')
|
98
|
+
API.new('WSASocket', 'IIIPIL', 'L', 'ws2_32')
|
99
|
+
API.new('WSAStartup', 'IP', 'I', 'ws2_32')
|
100
|
+
API.new('WSAStringToAddress', 'PIPPP', 'I', 'ws2_32')
|
101
|
+
API.new('WSAWaitForMultipleEvents', 'LPBLB', 'L', 'ws2_32')
|
102
|
+
|
103
|
+
# XP or later
|
104
|
+
begin
|
105
|
+
API.new('ConnectEx', 'LPIPLPP', 'B', 'mswsock')
|
106
|
+
API.new('DisconnectEx', 'LPLL', 'B', 'mswsock')
|
107
|
+
API.new('GetAddrInfoW', 'PPPP', 'I', 'mswsock')
|
108
|
+
API.new('GetNameInfoW', 'PLPLPLI', 'I', 'ws2_32')
|
109
|
+
rescue Windows::API::Error
|
110
|
+
# Do nothing, not supported on your platform.
|
111
|
+
end
|
112
|
+
|
113
|
+
# Vista or later
|
114
|
+
begin
|
115
|
+
API.new('FreeAddrInfoEx', 'P', 'V', 'ws2_32')
|
116
|
+
API.new('GetAddrInfoEx', 'PPLPPPPPPP', 'I', 'ws2_32')
|
117
|
+
API.new('WSAConnectByList', 'LPPPPPPP', 'B', 'ws2_32')
|
118
|
+
API.new('WSAConnectByName', 'LPPPPPPP', 'B', 'ws2_32')
|
119
|
+
API.new('WSADeleteSocketPeerTargetName', 'LPPPP', 'I', 'ws2_32')
|
120
|
+
API.new('WSAPoll', 'PLI', 'I', 'ws2_32')
|
121
|
+
rescue Windows::API::Error
|
122
|
+
# Do nothing, not supported on your platform.
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
data/lib/windows/nio.rb
CHANGED
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'windows/api'
|
2
|
+
|
3
|
+
module Windows
|
4
|
+
module NTFS
|
5
|
+
module File
|
6
|
+
API.auto_namespace = 'Windows::NTFS::File'
|
7
|
+
API.auto_constant = true
|
8
|
+
API.auto_method = true
|
9
|
+
API.auto_unicode = false
|
10
|
+
|
11
|
+
FileAccessInformation = 8
|
12
|
+
FileAlignmentInformation = 17
|
13
|
+
FileAllInformation = 18
|
14
|
+
FileAllocationInformation = 19
|
15
|
+
FileAlternateNameInformation = 21
|
16
|
+
FileAttributeTagInformation = 35
|
17
|
+
FileBasicInformation = 4
|
18
|
+
FileBothDirectoryInformation = 3
|
19
|
+
FileCompletionInformation = 30
|
20
|
+
FileCompressionInformation = 28
|
21
|
+
FileDirectoryInformation = 1
|
22
|
+
FileDispositionInformation = 13
|
23
|
+
FileEaInformation = 7
|
24
|
+
FileEndOfFileInformation = 20
|
25
|
+
FileFullDirectoryInformation = 2
|
26
|
+
FileFullEaInformation = 15
|
27
|
+
FileHardLinkInformation = 46
|
28
|
+
FileIdBothDirectoryInformation = 37
|
29
|
+
FileIdFullDirectoryInformation = 38
|
30
|
+
FileInternalInformation = 6
|
31
|
+
FileLinkInformation = 11
|
32
|
+
FileMailslotQueryInformation = 26
|
33
|
+
FileMailslotSetInformation = 27
|
34
|
+
FileModeInformation = 16
|
35
|
+
FileMoveClusterInformation = 31
|
36
|
+
FileNameInformation = 9
|
37
|
+
FileNamesInformation = 12
|
38
|
+
FileNetworkOpenInformation = 34
|
39
|
+
FileObjectIdInformation = 29
|
40
|
+
FilePipeInformation = 23
|
41
|
+
FilePipeLocalInformation = 24
|
42
|
+
FilePipeRemoteInformation = 25
|
43
|
+
FilePositionInformation = 14
|
44
|
+
FileQuotaInformation = 32
|
45
|
+
FileRenameInformation = 10
|
46
|
+
FileReparsePointInformation = 33
|
47
|
+
FileShortNameInformation = 40
|
48
|
+
FileStandardInformation = 5
|
49
|
+
FileStreamInformation = 22
|
50
|
+
FileTrackingInformation = 36
|
51
|
+
FileValidDataLengthInformation = 39
|
52
|
+
|
53
|
+
STATUS_SUCCESS = 0
|
54
|
+
|
55
|
+
API.new('NtQueryInformationFile', 'LPPLL', 'L', 'ntdll')
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
data/lib/windows/path.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'windows/api'
|
2
|
-
include Windows
|
3
2
|
|
4
3
|
module Windows
|
5
4
|
module Path
|
@@ -9,49 +8,84 @@ module Windows
|
|
9
8
|
API.auto_unicode = true
|
10
9
|
|
11
10
|
# These constants are for use by the PathGetCharType() function.
|
11
|
+
|
12
12
|
GCT_INVALID = 0x0000 # Character is not valid in a path.
|
13
13
|
GCT_LFNCHAR = 0x0001 # Character is valid in a long file name.
|
14
14
|
GCT_SHORTCHAR = 0x0002 # Character is valid in a short (8.3) file name.
|
15
15
|
GCT_WILD = 0x0004 # Character is a wildcard character.
|
16
16
|
GCT_SEPARATOR = 0x0008 # Character is a path separator.
|
17
17
|
|
18
|
+
URL_UNESCAPE = 0x10000000
|
19
|
+
URL_ESCAPE_UNSAFE = 0x20000000
|
20
|
+
URL_PLUGGABLE_PROTOCOL = 0x40000000
|
21
|
+
URL_WININET_COMPATIBILITY = 0x80000000
|
22
|
+
URL_DONT_ESCAPE_EXTRA_INFO = 0x02000000
|
23
|
+
URL_DONT_UNESCAPE_EXTRA_INFO = URL_DONT_ESCAPE_EXTRA_INFO
|
24
|
+
URL_BROWSER_MODE = URL_DONT_ESCAPE_EXTRA_INFO
|
25
|
+
URL_ESCAPE_SPACES_ONLY = 0x04000000
|
26
|
+
URL_DONT_SIMPLIFY = 0x08000000
|
27
|
+
URL_NO_META = URL_DONT_SIMPLIFY
|
28
|
+
URL_UNESCAPE_INPLACE = 0x00100000
|
29
|
+
URL_CONVERT_IF_DOSPATH = 0x00200000
|
30
|
+
URL_UNESCAPE_HIGH_ANSI_ONLY = 0x00400000
|
31
|
+
URL_INTERNAL_PATH = 0x00800000
|
32
|
+
URL_FILE_USE_PATHURL = 0x00010000
|
33
|
+
URL_DONT_UNESCAPE = 0x00020000
|
34
|
+
URL_ESCAPE_PERCENT = 0x00001000
|
35
|
+
URL_ESCAPE_SEGMENT_ONLY = 0x00002000
|
36
|
+
URL_PARTFLAG_KEEPSCHEME = 0x00000001
|
37
|
+
URL_APPLY_DEFAULT = 0x00000001
|
38
|
+
URL_APPLY_GUESSSCHEME = 0x00000002
|
39
|
+
URL_APPLY_GUESSFILE = 0x00000004
|
40
|
+
URL_APPLY_FORCEAPPLY = 0x00000008
|
41
|
+
|
42
|
+
# URLIS enum
|
43
|
+
|
44
|
+
URLIS_URL = 1
|
45
|
+
URLIS_OPAQUE = 2
|
46
|
+
URLIS_NOHISTORY = 3
|
47
|
+
URLIS_FILEURL = 4
|
48
|
+
URLIS_APPLIABLE = 5
|
49
|
+
URLIS_DIRECTORY = 6
|
50
|
+
URLIS_HASQUERY = 7
|
51
|
+
|
18
52
|
API.new('PathAddBackslash', 'P', 'P', 'shlwapi')
|
19
|
-
API.new('PathAddExtension', '
|
20
|
-
API.new('PathAppend', '
|
53
|
+
API.new('PathAddExtension', 'PS', 'B', 'shlwapi')
|
54
|
+
API.new('PathAppend', 'PS', 'B', 'shlwapi')
|
21
55
|
API.new('PathBuildRoot', 'PI', 'P', 'shlwapi')
|
22
|
-
API.new('PathCanonicalize', '
|
23
|
-
API.new('PathCombine', '
|
24
|
-
API.new('PathCommonPrefix', '
|
56
|
+
API.new('PathCanonicalize', 'PS', 'B', 'shlwapi')
|
57
|
+
API.new('PathCombine', 'PSS', 'P', 'shlwapi')
|
58
|
+
API.new('PathCommonPrefix', 'SSP', 'I', 'shlwapi')
|
25
59
|
API.new('PathCompactPath', 'PPI', 'B', 'shlwapi')
|
26
60
|
API.new('PathCompactPathEx', 'PPIL', 'B', 'shlwapi')
|
27
|
-
API.new('PathCreateFromUrl', '
|
28
|
-
API.new('PathFileExists', '
|
29
|
-
API.new('PathFindExtension', '
|
30
|
-
API.new('PathFindFileName', '
|
31
|
-
API.new('PathFindNextComponent', '
|
32
|
-
API.new('PathFindOnPath', '
|
33
|
-
API.new('PathFindSuffixArray', '
|
34
|
-
API.new('PathGetArgs', '
|
61
|
+
API.new('PathCreateFromUrl', 'SPPL', 'L', 'shlwapi')
|
62
|
+
API.new('PathFileExists', 'S', 'B', 'shlwapi')
|
63
|
+
API.new('PathFindExtension', 'S', 'P', 'shlwapi')
|
64
|
+
API.new('PathFindFileName', 'S', 'P', 'shlwapi')
|
65
|
+
API.new('PathFindNextComponent', 'S', 'P', 'shlwapi')
|
66
|
+
API.new('PathFindOnPath', 'PS', 'B', 'shlwapi')
|
67
|
+
API.new('PathFindSuffixArray', 'SSI', 'P', 'shlwapi')
|
68
|
+
API.new('PathGetArgs', 'S', 'P', 'shlwapi')
|
35
69
|
API.new('PathGetCharType', 'P', 'I', 'shlwapi')
|
36
|
-
API.new('PathGetDriveNumber', '
|
37
|
-
API.new('PathIsContentType', '
|
38
|
-
API.new('PathIsDirectory', '
|
39
|
-
API.new('PathIsDirectoryEmpty', '
|
40
|
-
API.new('PathIsFileSpec', '
|
41
|
-
API.new('PathIsLFNFileSpec', '
|
42
|
-
API.new('PathIsNetworkPath', '
|
43
|
-
API.new('PathIsPrefix', '
|
44
|
-
API.new('PathIsRelative', '
|
45
|
-
API.new('PathIsRoot', '
|
46
|
-
API.new('PathIsSameRoot', '
|
47
|
-
API.new('PathIsSystemFolder', '
|
48
|
-
API.new('PathIsUNC', '
|
49
|
-
API.new('PathIsUNCServer', '
|
50
|
-
API.new('PathIsUNCServerShare', '
|
51
|
-
API.new('PathIsURL', '
|
70
|
+
API.new('PathGetDriveNumber', 'S', 'I', 'shlwapi')
|
71
|
+
API.new('PathIsContentType', 'SS', 'B', 'shlwapi')
|
72
|
+
API.new('PathIsDirectory', 'S', 'B', 'shlwapi')
|
73
|
+
API.new('PathIsDirectoryEmpty', 'S', 'B', 'shlwapi')
|
74
|
+
API.new('PathIsFileSpec', 'S', 'B', 'shlwapi')
|
75
|
+
API.new('PathIsLFNFileSpec', 'S', 'B', 'shlwapi')
|
76
|
+
API.new('PathIsNetworkPath', 'S', 'B', 'shlwapi')
|
77
|
+
API.new('PathIsPrefix', 'SS', 'B', 'shlwapi')
|
78
|
+
API.new('PathIsRelative', 'S', 'B', 'shlwapi')
|
79
|
+
API.new('PathIsRoot', 'S', 'B', 'shlwapi')
|
80
|
+
API.new('PathIsSameRoot', 'SS', 'B', 'shlwapi')
|
81
|
+
API.new('PathIsSystemFolder', 'SL', 'B', 'shlwapi')
|
82
|
+
API.new('PathIsUNC', 'S', 'B', 'shlwapi')
|
83
|
+
API.new('PathIsUNCServer', 'S', 'B', 'shlwapi')
|
84
|
+
API.new('PathIsUNCServerShare', 'S', 'B', 'shlwapi')
|
85
|
+
API.new('PathIsURL', 'S', 'B', 'shlwapi')
|
52
86
|
API.new('PathMakePretty', 'P', 'B', 'shlwapi')
|
53
|
-
API.new('PathMakeSystemFolder', '
|
54
|
-
API.new('PathMatchSpec', '
|
87
|
+
API.new('PathMakeSystemFolder', 'S', 'B', 'shlwapi')
|
88
|
+
API.new('PathMatchSpec', 'SS', 'B', 'shlwapi')
|
55
89
|
API.new('PathParseIconLocation', 'P', 'I', 'shlwapi')
|
56
90
|
API.new('PathQuoteSpaces', 'P', 'V', 'shlwapi')
|
57
91
|
API.new('PathRelativePathTo', 'PPLPL', 'B', 'shlwapi')
|
@@ -60,15 +94,48 @@ module Windows
|
|
60
94
|
API.new('PathRemoveBlanks', 'P', 'V', 'shlwapi')
|
61
95
|
API.new('PathRemoveExtension', 'P','V', 'shlwapi')
|
62
96
|
API.new('PathRemoveFileSpec', 'P', 'B', 'shlwapi')
|
63
|
-
API.new('PathRenameExtension', '
|
64
|
-
API.new('PathSearchAndQualify', '
|
65
|
-
API.new('PathSetDlgItemPath', '
|
66
|
-
API.new('PathSkipRoot', '
|
97
|
+
API.new('PathRenameExtension', 'PS', 'B', 'shlwapi')
|
98
|
+
API.new('PathSearchAndQualify', 'SPI', 'B', 'shlwapi')
|
99
|
+
API.new('PathSetDlgItemPath', 'LIS', 'V', 'shlwapi')
|
100
|
+
API.new('PathSkipRoot', 'S', 'P', 'shlwapi')
|
67
101
|
API.new('PathStripPath', 'P', 'V', 'shlwapi')
|
68
102
|
API.new('PathStripToRoot', 'P', 'B', 'shlwapi')
|
69
103
|
API.new('PathUndecorate', 'P', 'V', 'shlwapi')
|
70
|
-
API.new('PathUnExpandEnvStrings', '
|
71
|
-
API.new('PathUnmakeSystemFolder', '
|
104
|
+
API.new('PathUnExpandEnvStrings', 'SPI', 'B', 'shlwapi')
|
105
|
+
API.new('PathUnmakeSystemFolder', 'S', 'B', 'shlwapi')
|
72
106
|
API.new('PathUnquoteSpaces', 'P', 'V', 'shlwapi')
|
107
|
+
|
108
|
+
API.new('UrlApplyScheme', 'SPPL', 'L', 'shlwapi')
|
109
|
+
API.new('UrlCanonicalize', 'SPPL', 'L', 'shlwapi')
|
110
|
+
API.new('UrlCombine', 'SSPPL', 'L', 'shlwapi')
|
111
|
+
API.new('UrlCompare', 'SSI', 'I', 'shlwapi')
|
112
|
+
API.new('UrlCreateFromPath', 'SPPL', 'L', 'shlwapi')
|
113
|
+
API.new('UrlEscape', 'SPPL', 'L', 'shlwapi')
|
114
|
+
API.new('UrlGetLocation', 'S', 'P', 'shlwapi')
|
115
|
+
API.new('UrlGetPart', 'SPPLL', 'L', 'shlwapi')
|
116
|
+
API.new('UrlHash', 'SPL', 'L', 'shlwapi')
|
117
|
+
API.new('UrlIs', 'SL', 'B', 'shlwapi')
|
118
|
+
API.new('UrlIsNoHistory', 'S', 'B', 'shlwapi')
|
119
|
+
API.new('UrlIsOpaque', 'S', 'B', 'shlwapi')
|
120
|
+
API.new('UrlUnescape', 'PPPL', 'L', 'shlwapi')
|
121
|
+
|
122
|
+
# Macros
|
123
|
+
|
124
|
+
def UrlEscapeSpaces(pszUrl, pszEscaped, pcchEscaped)
|
125
|
+
UrlCanonicalize.call(
|
126
|
+
pszUrl,
|
127
|
+
pszEscaped,
|
128
|
+
pcchEscaped,
|
129
|
+
URL_ESCAPE_SPACES_ONLY | URL_DONT_ESCAPE_EXTRA_INFO
|
130
|
+
)
|
131
|
+
end
|
132
|
+
|
133
|
+
def UrlIsFileUrl(pszUrl)
|
134
|
+
UrlIsA.call(pszUrl, URLIS_FILEURL)
|
135
|
+
end
|
136
|
+
|
137
|
+
def UrlUnescapeInPlace(pszUrl, dwFlags)
|
138
|
+
UrlUnescape.call(pszUrl, nil, nil, dwFlags | URL_UNESCAPE_INPLACE)
|
139
|
+
end
|
73
140
|
end
|
74
141
|
end
|