windows-pr 0.6.6 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +7 -0
- data/MANIFEST +1 -0
- data/lib/windows/clipboard.rb +17 -52
- data/lib/windows/com.rb +54 -0
- data/lib/windows/console.rb +62 -281
- data/lib/windows/debug.rb +36 -0
- data/lib/windows/device_io.rb +9 -7
- data/lib/windows/directory.rb +20 -75
- data/lib/windows/error.rb +51 -36
- data/lib/windows/eventlog.rb +20 -101
- data/lib/windows/file.rb +59 -295
- data/lib/windows/file_mapping.rb +14 -32
- data/lib/windows/filesystem.rb +8 -10
- data/lib/windows/handle.rb +15 -11
- data/lib/windows/library.rb +21 -63
- data/lib/windows/memory.rb +28 -106
- data/lib/windows/msvcrt/buffer.rb +20 -15
- data/lib/windows/msvcrt/file.rb +38 -7
- data/lib/windows/msvcrt/io.rb +180 -80
- data/lib/windows/msvcrt/string.rb +20 -15
- data/lib/windows/national.rb +16 -39
- data/lib/windows/network_management.rb +93 -92
- data/lib/windows/nio.rb +26 -0
- data/lib/windows/path.rb +68 -349
- data/lib/windows/pipe.rb +18 -56
- data/lib/windows/process.rb +28 -110
- data/lib/windows/registry.rb +27 -142
- data/lib/windows/security.rb +34 -142
- data/lib/windows/service.rb +34 -80
- data/lib/windows/shell.rb +10 -16
- data/lib/windows/sound.rb +17 -31
- data/lib/windows/synchronize.rb +24 -90
- data/lib/windows/system_info.rb +16 -47
- data/lib/windows/unicode.rb +21 -41
- data/lib/windows/volume.rb +23 -83
- data/lib/windows/window.rb +11 -17
- data/windows-pr.gemspec +3 -2
- metadata +17 -5
data/lib/windows/msvcrt/io.rb
CHANGED
@@ -1,80 +1,180 @@
|
|
1
|
-
require '
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
1
|
+
require 'windows/api'
|
2
|
+
include Windows
|
3
|
+
|
4
|
+
# This module includes stream I/O, low level I/O, etc.
|
5
|
+
module Windows
|
6
|
+
module MSVCRT
|
7
|
+
module IO
|
8
|
+
API.auto_constant = false
|
9
|
+
API.auto_method = false
|
10
|
+
API.auto_unicode = false
|
11
|
+
|
12
|
+
S_IFMT = 0170000 # file type mask
|
13
|
+
S_IFDIR = 0040000 # directory
|
14
|
+
S_IFCHR = 0020000 # character special
|
15
|
+
S_IFIFO = 0010000 # pipe
|
16
|
+
S_IFREG = 0100000 # regular
|
17
|
+
S_IREAD = 0000400 # read permission, owner
|
18
|
+
S_IWRITE = 0000200 # write permission, owner
|
19
|
+
S_IEXEC = 0000100 # execute/search permission, owner
|
20
|
+
|
21
|
+
Clearerr = API.new('clearerr', 'I', 'V', 'msvcrt')
|
22
|
+
Close = API.new('_close', 'I', 'V', 'msvcrt')
|
23
|
+
Fclose = API.new('fclose', 'I', 'I', 'msvcrt')
|
24
|
+
Fcloseall = API.new('_fcloseall', 'V', 'I', 'msvcrt')
|
25
|
+
Fdopen = API.new('_fdopen', 'IP', 'I', 'msvcrt')
|
26
|
+
Feof = API.new('feof', 'I', 'I', 'msvcrt')
|
27
|
+
Ferror = API.new('ferror', 'L', 'I', 'msvcrt')
|
28
|
+
Fflush = API.new('fflush', 'I', 'I', 'msvcrt')
|
29
|
+
Fgetc = API.new('fgetc', 'L', 'I', 'msvcrt')
|
30
|
+
Fgetpos = API.new('fgetpos', 'LP', 'I', 'msvcrt')
|
31
|
+
Fgetwc = API.new('fgetwc', 'L', 'I', 'msvcrt')
|
32
|
+
Fgets = API.new('fgets', 'PIL', 'P', 'msvcrt')
|
33
|
+
Fgetws = API.new('fgetws', 'PIL', 'P', 'msvcrt')
|
34
|
+
Fileno = API.new('_fileno', 'I', 'I', 'msvcrt')
|
35
|
+
Flushall = API.new('_flushall', 'V', 'I', 'msvcrt')
|
36
|
+
Fopen = API.new('fopen', 'PP', 'I', 'msvcrt')
|
37
|
+
Fputs = API.new('fputs', 'PL', 'I', 'msvcrt')
|
38
|
+
Fputws = API.new('fputws', 'PL', 'I', 'msvcrt')
|
39
|
+
Getc = API.new('getc', 'L', 'I', 'msvcrt')
|
40
|
+
Getwc = API.new('getwc', 'L', 'L', 'msvcrt')
|
41
|
+
Open = API.new('_open', 'PPI', 'I', 'msvcrt')
|
42
|
+
Rmtmp = API.new('_rmtmp', 'V', 'I', 'msvcrt')
|
43
|
+
Tempnam = API.new('_tempnam', 'PP', 'P', 'msvcrt')
|
44
|
+
Tmpfile = API.new('tmpfile', 'V', 'L', 'msvcrt')
|
45
|
+
Tmpnam = API.new('tmpnam', 'P', 'P', 'msvcrt')
|
46
|
+
Wopen = API.new('_wopen', 'PPI', 'I', 'msvcrt')
|
47
|
+
Wfdopen = API.new('_wfdopen', 'IP', 'I', 'msvcrt')
|
48
|
+
Wfopen = API.new('_wfopen', 'PPI', 'I', 'msvcrt')
|
49
|
+
Wtempnam = API.new('_wtempnam', 'PP', 'P', 'msvcrt')
|
50
|
+
Wtmpnam = API.new('_wtmpnam', 'P', 'P', 'msvcrt')
|
51
|
+
|
52
|
+
# VC++ 8.0 or later
|
53
|
+
begin
|
54
|
+
Tmpfile_s = API.new('_tmpfile_s', 'P', 'L', 'msvcrt')
|
55
|
+
rescue RuntimeError
|
56
|
+
# Ignore - you must check for it via 'defined?'
|
57
|
+
end
|
58
|
+
|
59
|
+
def clearerr(stream)
|
60
|
+
Clearerr.call(stream)
|
61
|
+
end
|
62
|
+
|
63
|
+
def close(fd)
|
64
|
+
Close.call(fd)
|
65
|
+
end
|
66
|
+
|
67
|
+
def fclose(stream)
|
68
|
+
Fclose.call(stream)
|
69
|
+
end
|
70
|
+
|
71
|
+
def fcloseall
|
72
|
+
Fcloseall.call
|
73
|
+
end
|
74
|
+
|
75
|
+
def fdopen(fd, mode)
|
76
|
+
Fdopen.call(fd, mode)
|
77
|
+
end
|
78
|
+
|
79
|
+
def feof(stream)
|
80
|
+
Feof.call(stream)
|
81
|
+
end
|
82
|
+
|
83
|
+
def ferror(stream)
|
84
|
+
Ferror.call(stream)
|
85
|
+
end
|
86
|
+
|
87
|
+
def fflush(stream)
|
88
|
+
Fflush.call(stream)
|
89
|
+
end
|
90
|
+
|
91
|
+
def fgetc(stream)
|
92
|
+
Fgetc.call(stream)
|
93
|
+
end
|
94
|
+
|
95
|
+
def fgetpos(stream, pos)
|
96
|
+
Fgetpos.call(stream, pos)
|
97
|
+
end
|
98
|
+
|
99
|
+
def fgets(str, n, stream)
|
100
|
+
Fgets.call(str, n, stream)
|
101
|
+
end
|
102
|
+
|
103
|
+
def fgetws(str, n, stream)
|
104
|
+
Fgetws.call(str, n, stream)
|
105
|
+
end
|
106
|
+
|
107
|
+
def fgetwc(stream)
|
108
|
+
Fgetwc.call(stream)
|
109
|
+
end
|
110
|
+
|
111
|
+
def fileno(stream)
|
112
|
+
Fileno.call(stream)
|
113
|
+
end
|
114
|
+
|
115
|
+
def flushall
|
116
|
+
Flushall.call()
|
117
|
+
end
|
118
|
+
|
119
|
+
def fopen(file, mode)
|
120
|
+
Fopen.call(file, mode)
|
121
|
+
end
|
122
|
+
|
123
|
+
def fputs(str, stream)
|
124
|
+
Fputs.call(str, stream)
|
125
|
+
end
|
126
|
+
|
127
|
+
def fputws(str, stream)
|
128
|
+
Fputws.call(str, stream)
|
129
|
+
end
|
130
|
+
|
131
|
+
def getc(stream)
|
132
|
+
Getc.call(stream)
|
133
|
+
end
|
134
|
+
|
135
|
+
def getwc(stream)
|
136
|
+
Getwc.call(stream)
|
137
|
+
end
|
138
|
+
|
139
|
+
def open(file, flag, mode)
|
140
|
+
Open.call(file, flag, mode)
|
141
|
+
end
|
142
|
+
|
143
|
+
def tmpfile()
|
144
|
+
Tmpfile.call
|
145
|
+
end
|
146
|
+
|
147
|
+
def tmpfile_s(file_ptr)
|
148
|
+
Tmpfile_s.call(file_ptr)
|
149
|
+
end
|
150
|
+
|
151
|
+
def tempnam(dir, prefix)
|
152
|
+
Tempnam.call(dir, prefix)
|
153
|
+
end
|
154
|
+
|
155
|
+
def tmpnam(template)
|
156
|
+
Tmpnam.call(template)
|
157
|
+
end
|
158
|
+
|
159
|
+
def wopen(file, flag, mode)
|
160
|
+
Wopen.call(file, flag, mode)
|
161
|
+
end
|
162
|
+
|
163
|
+
def wfdopen(fd, mode)
|
164
|
+
Wfdopen.call(fd, mode)
|
165
|
+
end
|
166
|
+
|
167
|
+
def wfopen(file, mode)
|
168
|
+
Wfopen.call(file, mode)
|
169
|
+
end
|
170
|
+
|
171
|
+
def wtempnam(dir, prefix)
|
172
|
+
Wtempnam.call(dir, prefix)
|
173
|
+
end
|
174
|
+
|
175
|
+
def wtmpnam(template)
|
176
|
+
Wtmpnam.call(template)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
@@ -1,22 +1,27 @@
|
|
1
|
-
require '
|
1
|
+
require 'windows/api'
|
2
|
+
include Windows
|
2
3
|
|
3
4
|
module Windows
|
4
5
|
module MSVCRT
|
5
6
|
module String
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
API.auto_constant = false
|
8
|
+
API.auto_method = false
|
9
|
+
API.auto_unicode = false
|
10
|
+
|
11
|
+
Strcmp = API.new('strcmp', 'PP', 'I', 'msvcrt')
|
12
|
+
Strcpy = API.new('strcpy', 'PL', 'L', 'msvcrt')
|
13
|
+
Strlen = API.new('strlen', 'P', 'L', 'msvcrt')
|
14
|
+
Strrev = API.new('_strrev', 'P', 'P', 'msvcrt')
|
15
|
+
|
16
|
+
Mbscmp = API.new('_mbscmp', 'PP', 'I', 'msvcrt')
|
17
|
+
Mbscpy = API.new('_mbscpy', 'PL', 'L', 'msvcrt')
|
18
|
+
Mbslen = API.new('_mbslen', 'P', 'L', 'msvcrt')
|
19
|
+
Mbsrev = API.new('_mbsrev', 'P', 'P', 'msvcrt')
|
15
20
|
|
16
|
-
Wcscmp =
|
17
|
-
Wcscpy =
|
18
|
-
Wcslen =
|
19
|
-
Wcsrev =
|
21
|
+
Wcscmp = API.new('wcscmp', 'PP', 'I', 'msvcrt')
|
22
|
+
Wcscpy = API.new('wcscpy', 'PL', 'L', 'msvcrt')
|
23
|
+
Wcslen = API.new('wcslen', 'P', 'L', 'msvcrt')
|
24
|
+
Wcsrev = API.new('_wcsrev', 'P', 'P', 'msvcrt')
|
20
25
|
|
21
26
|
def strcmp(str1, str2)
|
22
27
|
if str1 == 0 || str2 == 0
|
@@ -85,4 +90,4 @@ module Windows
|
|
85
90
|
end
|
86
91
|
end
|
87
92
|
end
|
88
|
-
end
|
93
|
+
end
|
data/lib/windows/national.rb
CHANGED
@@ -1,7 +1,13 @@
|
|
1
|
-
require '
|
1
|
+
require 'windows/api'
|
2
|
+
include Windows
|
2
3
|
|
3
4
|
module Windows
|
4
5
|
module National
|
6
|
+
API.auto_namespace = 'Windows::National'
|
7
|
+
API.auto_constant = true
|
8
|
+
API.auto_method = true
|
9
|
+
API.auto_unicode = true
|
10
|
+
|
5
11
|
# Code page identifiers. Used for get_acp_string method.
|
6
12
|
CODE_PAGE = {
|
7
13
|
037 => 'IBM EBCDIC = U.S./Canada',
|
@@ -525,43 +531,14 @@ module Windows
|
|
525
531
|
LOCALE_USER_DEFAULT = 1024
|
526
532
|
LOCALE_INVARIANT = 8323072
|
527
533
|
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
GetUserDefaultLCID = Win32API.new('kernel32', 'GetUserDefaultLCID', 'V', 'L')
|
536
|
-
|
537
|
-
def GetACP()
|
538
|
-
GetACP.call
|
539
|
-
end
|
540
|
-
|
541
|
-
def GetDateFormat(locale, flags, date, format, datestr, size)
|
542
|
-
GetDateFormat.call(locale, flags, date, format, datestr, size)
|
543
|
-
end
|
544
|
-
|
545
|
-
def GetLocaleInfo(locale, lctype, lcdata, size)
|
546
|
-
GetLocaleInfo.call(locale, lctype, lcdata, size)
|
547
|
-
end
|
548
|
-
|
549
|
-
def GetSystemDefaultLangID()
|
550
|
-
GetSystemDefaultLangID.call
|
551
|
-
end
|
552
|
-
|
553
|
-
def GetSystemDefaultLCID()
|
554
|
-
GetSystemDefaultLCID.call
|
555
|
-
end
|
534
|
+
API.new('GetACP', 'V', 'I')
|
535
|
+
API.new('GetDateFormat', 'LLPPPI', 'I')
|
536
|
+
API.new('GetLocaleInfo', 'LLPL', 'I')
|
537
|
+
API.new('GetSystemDefaultLangID', 'V', 'L')
|
538
|
+
API.new('GetSystemDefaultLCID', 'V', 'L')
|
539
|
+
API.new('GetUserDefaultLangID', 'V', 'L')
|
540
|
+
API.new('GetUserDefaultLCID', 'V', 'L')
|
556
541
|
|
557
|
-
def GetUserDefaultLangID()
|
558
|
-
GetUserDefaultLangID.call
|
559
|
-
end
|
560
|
-
|
561
|
-
def GetUserDefaultLCID()
|
562
|
-
GetUserDefaultLCID.call
|
563
|
-
end
|
564
|
-
|
565
542
|
# Convenience method for converting the results of the GetACP()
|
566
543
|
# function to a human readable string.
|
567
544
|
#
|
@@ -577,8 +554,8 @@ module Windows
|
|
577
554
|
|
578
555
|
# Equivalent of the MAKELANGID macro in WinNT.h
|
579
556
|
#
|
580
|
-
def MAKELANGID(
|
581
|
-
s << 10 |
|
557
|
+
def MAKELANGID(x, s)
|
558
|
+
s << 10 | x
|
582
559
|
end
|
583
560
|
end
|
584
561
|
end
|
@@ -1,7 +1,16 @@
|
|
1
|
-
require '
|
1
|
+
require 'windows/api'
|
2
|
+
include Windows
|
2
3
|
|
4
|
+
# I don't use the Boolean flag for the return types of these methods because
|
5
|
+
# they succeed, not fail, if the return value is 0.
|
6
|
+
#
|
3
7
|
module Windows
|
4
8
|
module NetworkManagement
|
9
|
+
API.auto_namespace = 'Windows::NetworkManagement'
|
10
|
+
API.auto_constant = true
|
11
|
+
API.auto_method = false
|
12
|
+
API.auto_unicode = false
|
13
|
+
|
5
14
|
NERR_Success = 0
|
6
15
|
MAX_PREFERRED_LENGTH = -1
|
7
16
|
|
@@ -40,99 +49,91 @@ module Windows
|
|
40
49
|
SV_TYPE_DOMAIN_ENUM = 0x80000000
|
41
50
|
SV_TYPE_ALL = 0xFFFFFFFF
|
42
51
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
NetWkstaSetInfo = Win32API.new('netapi32', 'NetWkstaSetInfo', 'PLPP', 'L')
|
124
|
-
NetWkstaTransportAdd = Win32API.new('netapi32', 'NetWkstaTransportAdd', 'PLPP', 'L')
|
125
|
-
NetWkstaTransportDel = Win32API.new('netapi32', 'NetWkstaTransportDel', 'PPL', 'L')
|
126
|
-
NetWkstaTransportEnum = Win32API.new('netapi32', 'NetWkstaTransportEnum', 'PLPLPPP', 'L')
|
127
|
-
NetWkstaUserEnum = Win32API.new('netapi32', 'NetWkstaUserEnum', 'PLPLPPP', 'L')
|
128
|
-
NetWkstaUserGetInfo = Win32API.new('netapi32', 'NetWkstaUserGetInfo', 'PLP', 'L')
|
129
|
-
NetWkstaUserSetInfo = Win32API.new('netapi32', 'NetWkstaUserSetInfo', 'PPLP', 'L')
|
130
|
-
|
52
|
+
API.new('NetAlertRaise', 'PPL', 'L', 'netapi32')
|
53
|
+
API.new('NetAlertRaiseEx', 'PPLP', 'L', 'netapi32')
|
54
|
+
API.new('NetApiBufferAllocate', 'LP', 'L', 'netapi32')
|
55
|
+
API.new('NetApiBufferFree', 'P', 'L', 'netapi32')
|
56
|
+
API.new('NetApiBufferReallocate', 'PLP', 'L', 'netapi32')
|
57
|
+
API.new('NetApiBufferSize', 'PP', 'L', 'netapi32')
|
58
|
+
API.new('NetGetAnyDCName', 'PPP', 'L', 'netapi32')
|
59
|
+
API.new('NetGetDCName', 'PPP', 'L', 'netapi32')
|
60
|
+
API.new('NetGetDisplayInformationIndex', 'PLPP', 'L', 'netapi32')
|
61
|
+
API.new('NetGetJoinableOUs', 'PPPPPP', 'L', 'netapi32')
|
62
|
+
API.new('NetGetJoinInformation', 'PPP', 'L', 'netapi32')
|
63
|
+
API.new('NetGroupAdd', 'PLPP', 'L', 'netapi32')
|
64
|
+
API.new('NetGroupAddUser', 'PPP', 'L', 'netapi32')
|
65
|
+
API.new('NetGroupDel', 'PP', 'L', 'netapi32')
|
66
|
+
API.new('NetGroupDelUser', 'PPP', 'L', 'netapi32')
|
67
|
+
API.new('NetGroupEnum', 'PLPLPPP', 'L', 'netapi32')
|
68
|
+
API.new('NetGroupGetInfo', 'PPLP', 'L', 'netapi32')
|
69
|
+
API.new('NetGroupGetUsers', 'PPLPLPPP', 'L', 'netapi32')
|
70
|
+
API.new('NetGroupSetInfo', 'PPLPP', 'L', 'netapi32')
|
71
|
+
API.new('NetGroupSetUsers', 'PPLPL', 'L', 'netapi32')
|
72
|
+
API.new('NetJoinDomain', 'PPPPPL', 'L', 'netapi32')
|
73
|
+
API.new('NetLocalGroupAdd', 'PLPP', 'L', 'netapi32')
|
74
|
+
API.new('NetLocalGroupAddMembers', 'PPLPL', 'L', 'netapi32')
|
75
|
+
API.new('NetLocalGroupDel', 'PP', 'L', 'netapi32')
|
76
|
+
API.new('NetLocalGroupDelMembers', 'PPLPL', 'L', 'netapi32')
|
77
|
+
API.new('NetLocalGroupEnum', 'PLPLPPP', 'L', 'netapi32')
|
78
|
+
API.new('NetLocalGroupGetInfo', 'PPLP', 'L', 'netapi32')
|
79
|
+
API.new('NetLocalGroupGetMembers', 'PPLPLPPP', 'L', 'netapi32')
|
80
|
+
API.new('NetLocalGroupSetInfo', 'PPLPP', 'L', 'netapi32')
|
81
|
+
API.new('NetLocalGroupSetMembers', 'PPLPP', 'L', 'netapi32')
|
82
|
+
API.new('NetMessageBufferSend', 'PPPPL', 'L', 'netapi32')
|
83
|
+
API.new('NetMessageNameAdd', 'PP', 'L', 'netapi32')
|
84
|
+
API.new('NetMessageNameDel', 'PP', 'L', 'netapi32')
|
85
|
+
API.new('NetMessageNameEnum', 'PLPLPPP', 'L', 'netapi32')
|
86
|
+
API.new('NetMessageNameGetInfo', 'PPLP', 'L', 'netapi32')
|
87
|
+
API.new('NetQueryDisplayInformation', 'PLLLLPP', 'L', 'netapi32')
|
88
|
+
API.new('NetRemoteComputerSupports', 'PLP', 'L', 'netapi32')
|
89
|
+
API.new('NetRemoteTOD', 'PP', 'L', 'netapi32')
|
90
|
+
API.new('NetRenameMachineInDomain', 'PPPPL', 'L', 'netapi32')
|
91
|
+
API.new('NetScheduleJobAdd', 'PPP', 'L', 'netapi32')
|
92
|
+
API.new('NetScheduleJobDel', 'PLL', 'L', 'netapi32')
|
93
|
+
API.new('NetScheduleJobEnum', 'PPLPPP', 'L', 'netapi32')
|
94
|
+
API.new('NetScheduleJobGetInfo', 'PLP', 'L', 'netapi32')
|
95
|
+
API.new('NetServerComputerNameAdd', 'PPP', 'L', 'netapi32')
|
96
|
+
API.new('NetServerComputerNameDel', 'PP', 'L', 'netapi32')
|
97
|
+
API.new('NetServerDiskEnum', 'PLPLPPP', 'L', 'netapi32')
|
98
|
+
API.new('NetServerEnum', 'PLPLPPLPP', 'L', 'netapi32')
|
99
|
+
API.new('NetServerGetInfo', 'PLP', 'L', 'netapi32')
|
100
|
+
API.new('NetServerSetInfo', 'PLPP', 'L', 'netapi32')
|
101
|
+
API.new('NetServerTransportAdd', 'PLP', 'L', 'netapi32')
|
102
|
+
API.new('NetServerTransportAddEx', 'PLP', 'L', 'netapi32')
|
103
|
+
API.new('NetServerTransportDel', 'PLP', 'L', 'netapi32')
|
104
|
+
API.new('NetServerTransportEnum', 'PLPLPPP', 'L', 'netapi32')
|
105
|
+
API.new('NetUnjoinDomain', 'PPPL', 'L', 'netapi32')
|
106
|
+
API.new('NetUseAdd', 'PLPP', 'L', 'netapi32')
|
107
|
+
API.new('NetUseDel', 'PPL', 'L', 'netapi32')
|
108
|
+
API.new('NetUseEnum', 'PLPLPPP', 'L', 'netapi32')
|
109
|
+
API.new('NetUseGetInfo', 'PPLP', 'L', 'netapi32')
|
110
|
+
API.new('NetUserAdd', 'PLPP', 'L', 'netapi32')
|
111
|
+
API.new('NetUserChangePassword', 'PPPP', 'L', 'netapi32')
|
112
|
+
API.new('NetUserDel', 'PP', 'L', 'netapi32')
|
113
|
+
API.new('NetUserEnum', 'PLLPLPPP', 'L', 'netapi32')
|
114
|
+
API.new('NetUserGetGroups', 'PPLPLPP', 'L', 'netapi32')
|
115
|
+
API.new('NetUserGetInfo', 'PPLP', 'L', 'netapi32')
|
116
|
+
API.new('NetUserGetLocalGroups', 'PPLLPLPP', 'L', 'netapi32')
|
117
|
+
API.new('NetUserModalsGet', 'PLP', 'L', 'netapi32')
|
118
|
+
API.new('NetUserModalsSet', 'PLPP', 'L', 'netapi32')
|
119
|
+
API.new('NetUserSetGroups', 'PPLPL', 'L', 'netapi32')
|
120
|
+
API.new('NetUserSetInfo', 'PPLPP', 'L', 'netapi32')
|
121
|
+
API.new('NetValidateName', 'PPPPP', 'L', 'netapi32')
|
122
|
+
API.new('NetWkstaGetInfo', 'PLP', 'L', 'netapi32')
|
123
|
+
API.new('NetWkstaSetInfo', 'PLPP', 'L', 'netapi32')
|
124
|
+
API.new('NetWkstaTransportAdd', 'PLPP', 'L', 'netapi32')
|
125
|
+
API.new('NetWkstaTransportDel', 'PPL', 'L', 'netapi32')
|
126
|
+
API.new('NetWkstaTransportEnum', 'PLPLPPP', 'L', 'netapi32')
|
127
|
+
API.new('NetWkstaUserEnum', 'PLPLPPP', 'L', 'netapi32')
|
128
|
+
API.new('NetWkstaUserGetInfo', 'PLP', 'L', 'netapi32')
|
129
|
+
API.new('NetWkstaUserSetInfo', 'PPLP', 'L', 'netapi32')
|
130
|
+
|
131
|
+
# Windows XP or later.
|
131
132
|
begin
|
132
|
-
|
133
|
-
|
133
|
+
API.new('GetNetScheduleAccountInformation', 'PLP', 'L', 'mstask')
|
134
|
+
API.new('SetNetScheduleAccountInformation', 'PPP', 'L', 'netapi32')
|
134
135
|
rescue Exception
|
135
|
-
# Do nothing. Not supported on current platform
|
136
|
+
# Do nothing. Not supported on current platform.
|
136
137
|
end
|
137
138
|
|
138
139
|
def NetAlertRaise(name, buf, bufsize)
|