windows-pr 0.7.4 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,14 @@
1
+ = 0.8.0 - 20-Jan-2008
2
+ * Added the Windows::COM::Automation module.
3
+ * Moved Windows::NetworkManagement to Windows::Network::Management.
4
+ * Added the Windows::Network::SNMP module.
5
+ * Added a MAXPATH constant to Windows::Limits, which is variable depending
6
+ on whether or not $KCODE is set to UTF8.
7
+ * Added some macro methods to Windows::Error.
8
+ * Added many more methods to Windows::COM.
9
+ * Fixed the prototype for the SetConsoleCtrlHandler in the Windows::Console
10
+ module, and added the CTRL_CLOSE_EVENT constant.
11
+
1
12
  = 0.7.4 - 11-Dec-2007
2
13
  * Added several more functions to Windows::Window.
3
14
  * Added many more constants to the Windows::NetworkManagement module.
data/README CHANGED
@@ -46,15 +46,15 @@
46
46
  for any MSVCRT module.
47
47
 
48
48
  Source files contain related functions, by topic. For example, the
49
- clipboard.rb file contains clip board related functions, such as
49
+ clipboard.rb file contains clipboard related functions, such as
50
50
  CloseClipboard(), as well as constants such as CF_TEXT, CF_BITMAP, etc.
51
51
 
52
52
  == Wide character functions
53
53
  I decided that the $KCODE handling was a bad idea, so most of the $KCODE
54
- handling has been removed. The only methods that change their behavior
54
+ handling has been removed. The only methods that change their behavior
55
55
  based on $KCODE are the multi_to_wide and wide_to_multi helper methods
56
- in the Windows::Unicode module. If $KCODE is set to UTF8, then the code
57
- point used is CP_UTF8. Otherwise, CP_ACP is used.
56
+ in the Windows::Unicode module. If $KCODE is set to UTF8, then the code
57
+ point used is CP_UTF8. Otherwise, CP_ACP is used.
58
58
 
59
59
  The modules all come with explicit ANSI and Wide (Unicode) functions,
60
60
  when available from MS Windows. By default, a function without an explicit
@@ -62,8 +62,8 @@
62
62
  to use the wide ('W') functions explicitly if you wish.
63
63
 
64
64
  == Platform specific functions
65
- Not all functions are defined on all platforms. For example, the
66
- AttachConsole() function is only defined on Windows XP and later. If you
65
+ Not all functions are defined on all platforms. For example, the
66
+ AttachConsole() function is only defined on Windows XP and later. If you
67
67
  need to conditionally test for its existence, simply use the 'defined?'
68
68
  method:
69
69
 
@@ -75,9 +75,9 @@
75
75
 
76
76
  == Where are the tests, dude?
77
77
  While I've made some effort to test these functions, there are simply too
78
- many for me to effectively test them all. We're ultimately talking about
78
+ many for me to effectively test them all. We're ultimately talking about
79
79
  hundreds, if not thousands, of functions, and I don't know what all of them
80
- actually do. That being said, I will add tests where and when I can.
80
+ actually do. That being said, I will add tests where and when I can.
81
81
 
82
82
  If you find that I've declared the function prototype wrong for a given
83
83
  function, please let me know ASAP and I'll fix it. An example program
@@ -86,27 +86,27 @@
86
86
 
87
87
  == What's the point?
88
88
  I became tired of redefining Windows functions over and over whenever I
89
- wanted to use the Win32API package. I thought it would be very handy to
89
+ wanted to use the Win32API package. I thought it would be very handy to
90
90
  have them predefined for me in a package with convenient wrapper methods
91
91
  to boot.
92
92
 
93
93
  While it's true that Moonwolf has a package on the RAA that includes many
94
- of these functions defined already, there are a few issues with it. First,
95
- it puts *every* function and constant in one or two files. That's a waste
96
- of memory, hard to organize & maintain, and impossible to test. Second,
97
- some of his function declarations are wrong. Third, some of the functions
98
- I needed for my own projects are missing. Fourth, there's no gem. Lastly,
94
+ of these functions defined already, there are a few issues with it. First,
95
+ it puts *every* function and constant in one or two files. That's a waste
96
+ of memory, hard to organize & maintain, and impossible to test. Second,
97
+ some of his function declarations are wrong. Third, some of the functions
98
+ I needed for my own projects are missing. Fourth, there's no gem. Lastly,
99
99
  I haven't seen an update in over 6 years, which leads me to believe it is
100
100
  no longer maintained.
101
101
 
102
102
  == Hey, I'm missing function X!
103
- I have only defined a small subset of the overall Windows API. It would
104
- take me years to define them *all*. I defined the ones I needed first,
105
- plus some that I thought would be useful to others. I will continue to
103
+ I have only defined a small subset of the overall Windows API. It would
104
+ take me years to define them *all*. I defined the ones I needed first,
105
+ plus some that I thought would be useful to others. I will continue to
106
106
  add functions in my spare time, or (especially) by request.
107
107
 
108
108
  == Bugs
109
- None that I'm aware of. Please report any bugs on the project page at
109
+ None that I'm aware of. Please report any bugs on the project page at
110
110
  http://www.rubyforge.org/projects/win32utils.
111
111
 
112
112
  The only real bugs you could find are either bad prototype declarations
@@ -122,14 +122,13 @@
122
122
 
123
123
  In other cases library functions are not exported by the dll. For example,
124
124
  my version of shlwapi.dll does not export the PathIsHTMLFile() function,
125
- despite being well past the minimum version for that DLL file. There is
125
+ despite being well past the minimum version for that DLL file. There is
126
126
  nothing you or I can do about it short of rebuilding the DLL file from
127
127
  scratch and/or reporting the issue to Microsoft.
128
128
 
129
129
  == Supported Platforms
130
- I only support the Windows NT family of Windows, and really only Windows
131
- 2000 and later, though I'll make an effort to support NT 4 if there are
132
- any NT 4 related issues and requests to support it.
130
+ I only support the Windows NT family of Windows, and then only Windows
131
+ 2000 and later.
133
132
 
134
133
  == License
135
134
  Ruby's
@@ -140,7 +139,7 @@
140
139
  warranties of merchantability and fitness for a particular purpose.
141
140
 
142
141
  == Copyright
143
- (C) 2006, 2007, Daniel J. Berger
142
+ (C) 2006-2008, Daniel J. Berger
144
143
  All Rights Reserved
145
144
 
146
145
  == Author
@@ -1,8 +1,9 @@
1
1
  = Parameters
2
- Long: 'N' or 'L'
3
- Integer: 'I'
4
- Pointer: 'P'
5
- Void: 'V'
2
+ Long: 'L'
3
+ Integer: 'I'
4
+ Pointer: 'P'
5
+ Void: 'V'
6
+ Callback: 'K' # win32-api only
6
7
 
7
8
  = Windows Data Types
8
9
  BOOL => 'I'
@@ -26,4 +27,5 @@ struct => 'P'
26
27
  struct* => 'P'
27
28
 
28
29
  In practice most LPVOID types should be designated as 'L' because this
29
- usually means the function is looking for an address.
30
+ usually means the function is looking for an address. Check the documentation
31
+ for details.
data/lib/windows/com.rb CHANGED
@@ -8,6 +8,69 @@ module Windows
8
8
  API.auto_method = true
9
9
  API.auto_unicode = false
10
10
 
11
+ # These constants are from wtypes.h but are only used in a COM context
12
+ # as far as I know.
13
+
14
+ VT_EMPTY = 0
15
+ VT_NULL = 1
16
+ VT_I2 = 2
17
+ VT_I4 = 3
18
+ VT_R4 = 4
19
+ VT_R8 = 5
20
+ VT_CY = 6
21
+ VT_DATE = 7
22
+ VT_BSTR = 8
23
+ VT_DISPATCH = 9
24
+ VT_ERROR = 10
25
+ VT_BOOL = 11
26
+ VT_VARIANT = 12
27
+ VT_UNKNOWN = 13
28
+ VT_DECIMAL = 14
29
+ VT_I1 = 16
30
+ VT_UI1 = 17
31
+ VT_UI2 = 18
32
+ VT_UI4 = 19
33
+ VT_I8 = 20
34
+ VT_UI8 = 21
35
+ VT_INT = 22
36
+ VT_UINT = 23
37
+ VT_VOID = 24
38
+ VT_HRESULT = 25
39
+ VT_PTR = 26
40
+ VT_SAFEARRAY = 27
41
+ VT_CARRAY = 28
42
+ VT_USERDEFINED = 29
43
+ VT_LPSTR = 30
44
+ VT_LPWSTR = 31
45
+ VT_RECORD = 36
46
+ VT_INT_PTR = 37
47
+ VT_UINT_PTR = 38
48
+ VT_FILETIME = 64
49
+ VT_BLOB = 65
50
+ VT_STREAM = 66
51
+ VT_STORAGE = 67
52
+ VT_STREAMED_OBJECT = 68
53
+ VT_STORED_OBJECT = 69
54
+ VT_BLOB_OBJECT = 70
55
+ VT_CF = 71
56
+ VT_CLSID = 72
57
+ VT_VERSIONED_STREAM = 73
58
+ VT_BSTR_BLOB = 0xfff
59
+ VT_VECTOR = 0x1000
60
+ VT_ARRAY = 0x2000
61
+ VT_BYREF = 0x4000
62
+ VT_RESERVED = 0x8000
63
+ VT_ILLEGAL = 0xffff
64
+ VT_ILLEGALMASKED = 0xfff
65
+ VT_TYPEMASK = 0xfff
66
+
67
+ # These constants are from OAldl.h
68
+
69
+ INVOKE_FUNC = 1
70
+ INVOKE_PROPERTYGET = 2
71
+ INVOKE_PROPERTYPUT = 4
72
+ INVOKE_PROPERTYPUTREF = 8
73
+
11
74
  API.new('BindMoniker', 'PLPP', 'L', 'ole32')
12
75
  API.new('CLSIDFromProgID', 'PP', 'L', 'ole32')
13
76
  API.new('CLSIDFromProgIDEx', 'PP', 'L', 'ole32')
@@ -42,7 +105,38 @@ module Windows
42
105
  API.new('CoInitialize', 'P', 'L', 'ole32')
43
106
  API.new('CoTaskMemFree', 'P', 'V', 'ole32')
44
107
  API.new('CoUninitialize', 'V', 'V', 'ole32')
108
+ API.new('CoUnmarshalHresult', 'PP', 'L', 'ole32')
109
+ API.new('CoUnmarshalInterface', 'PPP', 'L', 'ole32')
110
+ API.new('CoWaitForMultipleHandles', 'LLLPP', 'L', 'ole32')
111
+ API.new('CreateAntiMoniker', 'P', 'L', 'ole32')
112
+ API.new('CreateAsyncBindCtx', 'LKKP', 'L', 'urlmon')
113
+ API.new('CreateBindCtx', 'LP', 'L', 'ole32')
114
+ API.new('CreateClassMoniker', 'PP', 'L', 'ole32')
115
+ API.new('CreateFileMoniker', 'PP', 'L', 'ole32')
116
+ API.new('CreateGenericComposite', 'PPP', 'L', 'ole32')
117
+ API.new('CreateItemMoniker', 'PPP', 'L', 'ole32')
118
+ API.new('CreateObjrefMoniker', 'PP', 'L', 'ole32')
119
+ API.new('CreatePointerMoniker', 'PP', 'L', 'ole32')
120
+ API.new('GetClassFile', 'PP', 'L', 'ole32')
121
+ API.new('GetRunningObjectTable', 'LP', 'L', 'ole32')
122
+ API.new('IIDFromString', 'PP', 'L', 'ole32')
123
+ API.new('IsAccelerator', 'LIPP', 'B', 'ole32')
124
+ API.new('IsEqualGUID', 'PP', 'B', 'ole32')
125
+ API.new('MkParseDisplayName', 'PPPP', 'L', 'ole32')
126
+ API.new('MonikerCommonPrefixWith', 'PPP', 'L', 'ole32')
127
+ API.new('MonikerRelativePathTo', 'PPPI', 'L', 'ole32')
128
+ API.new('OleDoAutoConvert', 'PP', 'L', 'ole32')
129
+ API.new('OleGetAutoConvert', 'PP', 'L', 'ole32')
130
+ API.new('OleGetIconOfClass', 'PPI', 'L', 'ole32')
131
+ API.new('OleGetIconOfFile', 'PI', 'L', 'ole32')
132
+ API.new('OleIconToCursor', 'PL', 'L', 'olepro32')
133
+ API.new('OleRegGetMiscStatus', 'PLP', 'L', 'ole32')
134
+ API.new('OleRegGetUserType', 'PLP', 'L', 'ole32')
135
+ API.new('OleSetAutoConvert', 'PP', 'L', 'ole32')
136
+ API.new('ProgIDFromCLSID', 'PP', 'L', 'ole32')
137
+ API.new('StringFromCLSID', 'PP', 'L', 'ole32')
45
138
  API.new('StringFromGUID2', 'PPI', 'I', 'ole32')
139
+ API.new('StringFromIID', 'PP', 'L', 'ole32')
46
140
 
47
141
  # Windows Vista
48
142
  begin
@@ -10,6 +10,7 @@ module Windows
10
10
 
11
11
  CTRL_C_EVENT = 0
12
12
  CTRL_BREAK_EVENT = 1
13
+ CTRL_CLOSE_EVENT = 2
13
14
  CTRL_LOGOFF_EVENT = 5
14
15
  CTRL_SHUTDOWN_EVENT = 6
15
16
 
@@ -80,7 +81,7 @@ module Windows
80
81
  API.new('ScrollConsoleScreenBuffer', 'LPPLP', 'B')
81
82
  API.new('SetConsoleActiveScreenBuffer', 'L', 'B')
82
83
  API.new('SetConsoleCP', 'L', 'B')
83
- API.new('SetConsoleCtrlHandler', 'PI', 'B')
84
+ API.new('SetConsoleCtrlHandler', 'KI', 'B')
84
85
  API.new('SetConsoleCursorInfo', 'LP', 'B')
85
86
  API.new('SetConsoleCursorPosition', 'LP', 'B')
86
87
  API.new('SetConsoleMode', 'LL', 'B')
data/lib/windows/error.rb CHANGED
@@ -339,5 +339,51 @@ module Windows
339
339
  FormatMessage.call(flags, 0, err_num, 0, buf, buf.size, 0)
340
340
  buf.split(0.chr).first.chomp rescue 'Unknown error'
341
341
  end
342
+
343
+ # Macros from WinError.h
344
+
345
+ def IS_ERROR(status)
346
+ status >> 31 == 1
347
+ end
348
+
349
+ def MAKE_HRESULT(sev, fac, code)
350
+ sev << 31 | fac << 16 | code
351
+ end
352
+
353
+ def MAKE_SCODE(sev, fac, code)
354
+ sev << 31 | fac << 16 | code
355
+ end
356
+
357
+ def HRESULT_CODE(hr)
358
+ hr & 0xFFFF
359
+ end
360
+
361
+ def HRESULT_FACILITY(hr)
362
+ (hr >> 16) & 0x1fff
363
+ end
364
+
365
+ def HRESULT_FROM_NT(x)
366
+ x | 0x10000000 # FACILITY_NT_BIT
367
+ end
368
+
369
+ def HRESULT_FROM_WIN32(x)
370
+ if x <= 0
371
+ x
372
+ else
373
+ (x & 0x0000FFFF) | (7 << 16) | 0x80000000
374
+ end
375
+ end
376
+
377
+ def HRESULT_SEVERITY(hr)
378
+ (hr >> 31) & 0x1
379
+ end
380
+
381
+ def FAILED(status)
382
+ status < 0
383
+ end
384
+
385
+ def SUCCEEDED(status)
386
+ status >= 0
387
+ end
342
388
  end
343
389
  end
@@ -9,5 +9,15 @@ module Windows
9
9
  MAXBYTE = 0xff
10
10
  MAXWORD = 0xffff
11
11
  MAXDWORD = 0xffffffff
12
+
13
+ # For wide character functions the actual path limit is actually 32k
14
+ # for most functions that deal with paths, but in the interests of not
15
+ # wasting huge chunks of memory on buffers I limit it to 1k, which
16
+ # should be more than enough in practice.
17
+ if $KCODE == 'UTF8'
18
+ MAXPATH = 1024
19
+ else
20
+ MAXPATH = 256
21
+ end
12
22
  end
13
23
  end
@@ -8,11 +8,12 @@ module Windows
8
8
  API.auto_method = true
9
9
  API.auto_unicode = true
10
10
 
11
- INFINITE = 0xFFFFFFFF
12
- WAIT_OBJECT_0 = 0
13
- WAIT_TIMEOUT = 0x102
14
- WAIT_ABANDONED = 128
15
- WAIT_FAILED = 0xFFFFFFFF
11
+ INFINITE = 0xFFFFFFFF
12
+ WAIT_OBJECT_0 = 0
13
+ WAIT_TIMEOUT = 0x102
14
+ WAIT_ABANDONED = 128
15
+ WAIT_ABANDONED_0 = WAIT_ABANDONED
16
+ WAIT_FAILED = 0xFFFFFFFF
16
17
 
17
18
  STATUS_WAIT_0 = 0
18
19
  STATUS_ABANDONED_WAIT_0 = 128
@@ -27,8 +27,29 @@ module Windows
27
27
  SW_FORCEMINIMIZE = 11
28
28
  SW_MAX = 11
29
29
 
30
+ API.new('EnumWindows', 'KP', 'L', 'user32')
31
+ API.new('FindWindow', 'PP', 'L', 'user32')
32
+ API.new('FindWindowEx', 'LLPP', 'L', 'user32')
33
+ API.new('GetAltTabInfo', 'LIPPI', 'B', 'user32')
34
+ API.new('GetAncestor', 'LI', 'L', 'user32')
30
35
  API.new('GetClientRect', 'LP', 'B', 'user32')
36
+ API.new('GetDesktopWindow', 'V', 'L', 'user32')
31
37
  API.new('GetForegroundWindow', 'V', 'L', 'user32')
38
+ API.new('GetGUIThreadInfo', 'LP', 'B', 'user32')
39
+ API.new('GetLastActivePopup', 'L', 'L', 'user32')
40
+ API.new('GetLayeredWindowAttributes', 'LPBL', 'B', 'user32')
41
+ API.new('GetParent', 'L', 'L', 'user32')
42
+ API.new('GetProcessDefaultLayout', 'P', 'B', 'user32')
43
+ API.new('GetShellWindow', 'V', 'L', 'user32')
44
+ API.new('GetTitleBarInfo', 'LP', 'B', 'user32')
45
+ API.new('GetTopWindow', 'L', 'L', 'user32')
46
+ API.new('GetWindow', 'LI', 'L', 'user32')
47
+ API.new('GetWindowInfo', 'LP', 'B', 'user32')
48
+ API.new('GetWindowModuleFileName', 'LLI', 'I', 'user32')
49
+ API.new('GetWindowPlacement', 'LP', 'B', 'user32')
32
50
  API.new('GetWindowRect', 'LP', 'B', 'user32')
51
+ API.new('GetWindowText', 'LPI', 'I', 'user32')
52
+ API.new('GetWindowTextLength', 'L', 'I', 'user32')
53
+ API.new('GetWindowThreadProcessId', 'LP', 'L', 'user32')
33
54
  end
34
55
  end
@@ -3,14 +3,14 @@
3
3
  #
4
4
  # Test case for the Windows::NetworkManagement module.
5
5
  #####################################################################
6
- require 'windows/network_management'
6
+ require 'windows/network/management'
7
7
  require 'test/unit'
8
8
 
9
9
  class NetworkManagementFoo
10
- include Windows::NetworkManagement
10
+ include Windows::Network::Management
11
11
  end
12
12
 
13
- class TC_Windows_NetworkManagement < Test::Unit::TestCase
13
+ class TC_Windows_Network_Management < Test::Unit::TestCase
14
14
  def setup
15
15
  @foo = NetworkManagementFoo.new
16
16
  end
@@ -0,0 +1,31 @@
1
+ #####################################################################
2
+ # tc_network_snmp.rb
3
+ #
4
+ # Test case for the Windows::NetworkSNMP module.
5
+ #####################################################################
6
+ require 'windows/network/snmp'
7
+ require 'test/unit'
8
+
9
+ class NetworkSNMPFoo
10
+ include Windows::Network::SNMP
11
+ end
12
+
13
+ class TC_Windows_Network_SNMP < Test::Unit::TestCase
14
+ def setup
15
+ @foo = NetworkSNMPFoo.new
16
+ end
17
+
18
+ def test_numeric_constants
19
+ assert_equal(0, NetworkSNMPFoo::SNMPAPI_FAILURE)
20
+ assert_equal(1, NetworkSNMPFoo::SNMPAPI_SUCCESS)
21
+ end
22
+
23
+ def test_method_constants
24
+ assert_not_nil(NetworkSNMPFoo::SnmpCleanup)
25
+ assert_not_nil(NetworkSNMPFoo::SnmpClose)
26
+ end
27
+
28
+ def teardown
29
+ @foo = nil
30
+ end
31
+ 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.7.4"
5
+ gem.version = "0.8.0"
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: windows-pr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2007-12-11 00:00:00 -07:00
12
+ date: 2008-01-21 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -49,7 +49,6 @@ files:
49
49
  - lib/windows/limits.rb
50
50
  - lib/windows/memory.rb
51
51
  - lib/windows/national.rb
52
- - lib/windows/network_management.rb
53
52
  - lib/windows/nio.rb
54
53
  - lib/windows/path.rb
55
54
  - lib/windows/pipe.rb
@@ -84,6 +83,7 @@ files:
84
83
  - test/tc_msvcrt_buffer.rb
85
84
  - test/tc_national.rb
86
85
  - test/tc_network_management.rb
86
+ - test/tc_network_snmp.rb
87
87
  - test/tc_nio.rb
88
88
  - test/tc_path.rb
89
89
  - test/tc_pipe.rb
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  requirements: []
142
142
 
143
143
  rubyforge_project:
144
- rubygems_version: 0.9.5
144
+ rubygems_version: 1.0.1
145
145
  signing_key:
146
146
  specification_version: 2
147
147
  summary: Windows functions and constants bundled via Win32::API
@@ -164,6 +164,7 @@ test_files:
164
164
  - test/tc_msvcrt_buffer.rb
165
165
  - test/tc_national.rb
166
166
  - test/tc_network_management.rb
167
+ - test/tc_network_snmp.rb
167
168
  - test/tc_nio.rb
168
169
  - test/tc_path.rb
169
170
  - test/tc_pipe.rb
@@ -1,521 +0,0 @@
1
- require 'windows/api'
2
- include Windows
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
- #
7
- module Windows
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
-
14
- NERR_Success = 0
15
- NERR_BASE = 2100
16
- NERR_NetNotStarted = NERR_BASE + 2
17
- NERR_UnknownServer = NERR_BASE + 3
18
- NERR_ShareMem = NERR_BASE + 4
19
- NERR_NoNetworkResource = NERR_BASE + 5
20
- NERR_RemoteOnly = NERR_BASE + 6
21
- NERR_DevNotRedirected = NERR_BASE + 7
22
- NERR_AlreadyLoggedOn = NERR_BASE + 100
23
- NERR_NotLoggedOn = NERR_BASE + 101
24
- NERR_BadUsername = NERR_BASE + 102
25
- NERR_BadPassword = NERR_BASE + 103
26
- NERR_UnableToAddName_W = NERR_BASE + 104
27
- NERR_UnableToAddName_F = NERR_BASE + 105
28
- NERR_UnableToDelName_W = NERR_BASE + 106
29
- NERR_UnableToDelName_F = NERR_BASE + 107
30
- NERR_LogonsPaused = NERR_BASE + 109
31
- NERR_LogonServerConflict = NERR_BASE + 110
32
- NERR_LogonNoUserPath = NERR_BASE + 111
33
- NERR_LogonScriptError = NERR_BASE + 112
34
- NERR_StandaloneLogon = NERR_BASE + 114
35
- NERR_LogonServerNotFound = NERR_BASE + 115
36
- NERR_LogonDomainExists = NERR_BASE + 116
37
- NERR_NonValidatedLogon = NERR_BASE + 117
38
- NERR_ACFNotFound = NERR_BASE + 119
39
- NERR_GroupNotFound = NERR_BASE + 120
40
- NERR_UserNotFound = NERR_BASE + 121
41
- NERR_ResourceNotFound = NERR_BASE + 122
42
- NERR_GroupExists = NERR_BASE + 123
43
- NERR_UserExists = NERR_BASE + 124
44
- NERR_ResourceExists = NERR_BASE + 125
45
- NERR_NotPrimary = NERR_BASE + 126
46
- NERR_ACFNotLoaded = NERR_BASE + 127
47
- NERR_ACFNoRoom = NERR_BASE + 128
48
- NERR_ACFFileIOFail = NERR_BASE + 129
49
- NERR_ACFTooManyLists = NERR_BASE + 130
50
- NERR_UserLogon = NERR_BASE + 131
51
- NERR_ACFNoParent = NERR_BASE + 132
52
- NERR_CanNotGrowSegment = NERR_BASE + 133
53
- NERR_SpeGroupOp = NERR_BASE + 134
54
- NERR_NotInCache = NERR_BASE + 135
55
- NERR_UserInGroup = NERR_BASE + 136
56
- NERR_UserNotInGroup = NERR_BASE + 137
57
- NERR_AccountUndefined = NERR_BASE + 138
58
- NERR_AccountExpired = NERR_BASE + 139
59
- NERR_InvalidWorkstation = NERR_BASE + 140
60
- NERR_InvalidLogonHours = NERR_BASE + 141
61
- NERR_PasswordExpired = NERR_BASE + 142
62
- NERR_PasswordCantChange = NERR_BASE + 143
63
- NERR_PasswordHistConflict = NERR_BASE + 144
64
- NERR_PasswordTooShort = NERR_BASE + 145
65
- NERR_PasswordTooRecent = NERR_BASE + 146
66
- NERR_InvalidDatabase = NERR_BASE + 147
67
- NERR_DatabaseUpToDate = NERR_BASE + 148
68
- NERR_SyncRequired = NERR_BASE + 149
69
- NERR_UseNotFound = NERR_BASE + 150
70
- NERR_BadAsgType = NERR_BASE + 151
71
- NERR_DeviceIsShared = NERR_BASE + 152
72
-
73
- MAX_PREFERRED_LENGTH = -1
74
-
75
- # Taken from LMServer.h
76
- SV_TYPE_WORKSTATION = 0x00000001
77
- SV_TYPE_SERVER = 0x00000002
78
- SV_TYPE_SQLSERVER = 0x00000004
79
- SV_TYPE_DOMAIN_CTRL = 0x00000008
80
- SV_TYPE_DOMAIN_BAKCTRL = 0x00000010
81
- SV_TYPE_TIME_SOURCE = 0x00000020
82
- SV_TYPE_AFP = 0x00000040
83
- SV_TYPE_NOVELL = 0x00000080
84
- SV_TYPE_DOMAIN_MEMBER = 0x00000100
85
- SV_TYPE_PRINTQ_SERVER = 0x00000200
86
- SV_TYPE_DIALIN_SERVER = 0x00000400
87
- SV_TYPE_XENIX_SERVER = 0x00000800
88
- SV_TYPE_SERVER_UNIX = SV_TYPE_XENIX_SERVER
89
- SV_TYPE_NT = 0x00001000
90
- SV_TYPE_WFW = 0x00002000
91
- SV_TYPE_SERVER_MFPN = 0x00004000
92
- SV_TYPE_SERVER_NT = 0x00008000
93
- SV_TYPE_POTENTIAL_BROWSER = 0x00010000
94
- SV_TYPE_BACKUP_BROWSER = 0x00020000
95
- SV_TYPE_MASTER_BROWSER = 0x00040000
96
- SV_TYPE_DOMAIN_MASTER = 0x00080000
97
- SV_TYPE_SERVER_OSF = 0x00100000
98
- SV_TYPE_SERVER_VMS = 0x00200000
99
- SV_TYPE_WINDOWS = 0x00400000
100
- SV_TYPE_DFS = 0x00800000
101
- SV_TYPE_CLUSTER_NT = 0x01000000
102
- SV_TYPE_TERMINALSERVER = 0x02000000
103
- SV_TYPE_CLUSTER_VS_NT = 0x04000000
104
- SV_TYPE_DCE = 0x10000000
105
- SV_TYPE_ALTERNATE_XPORT = 0x20000000
106
- SV_TYPE_LOCAL_LIST_ONLY = 0x40000000
107
- SV_TYPE_DOMAIN_ENUM = 0x80000000
108
- SV_TYPE_ALL = 0xFFFFFFFF
109
-
110
- API.new('NetAlertRaise', 'PPL', 'L', 'netapi32')
111
- API.new('NetAlertRaiseEx', 'PPLP', 'L', 'netapi32')
112
- API.new('NetApiBufferAllocate', 'LP', 'L', 'netapi32')
113
- API.new('NetApiBufferFree', 'P', 'L', 'netapi32')
114
- API.new('NetApiBufferReallocate', 'PLP', 'L', 'netapi32')
115
- API.new('NetApiBufferSize', 'PP', 'L', 'netapi32')
116
- API.new('NetGetAnyDCName', 'PPP', 'L', 'netapi32')
117
- API.new('NetGetDCName', 'PPP', 'L', 'netapi32')
118
- API.new('NetGetDisplayInformationIndex', 'PLPP', 'L', 'netapi32')
119
- API.new('NetGetJoinableOUs', 'PPPPPP', 'L', 'netapi32')
120
- API.new('NetGetJoinInformation', 'PPP', 'L', 'netapi32')
121
- API.new('NetGroupAdd', 'PLPP', 'L', 'netapi32')
122
- API.new('NetGroupAddUser', 'PPP', 'L', 'netapi32')
123
- API.new('NetGroupDel', 'PP', 'L', 'netapi32')
124
- API.new('NetGroupDelUser', 'PPP', 'L', 'netapi32')
125
- API.new('NetGroupEnum', 'PLPLPPP', 'L', 'netapi32')
126
- API.new('NetGroupGetInfo', 'PPLP', 'L', 'netapi32')
127
- API.new('NetGroupGetUsers', 'PPLPLPPP', 'L', 'netapi32')
128
- API.new('NetGroupSetInfo', 'PPLPP', 'L', 'netapi32')
129
- API.new('NetGroupSetUsers', 'PPLPL', 'L', 'netapi32')
130
- API.new('NetJoinDomain', 'PPPPPL', 'L', 'netapi32')
131
- API.new('NetLocalGroupAdd', 'PLPP', 'L', 'netapi32')
132
- API.new('NetLocalGroupAddMembers', 'PPLPL', 'L', 'netapi32')
133
- API.new('NetLocalGroupDel', 'PP', 'L', 'netapi32')
134
- API.new('NetLocalGroupDelMembers', 'PPLPL', 'L', 'netapi32')
135
- API.new('NetLocalGroupEnum', 'PLPLPPP', 'L', 'netapi32')
136
- API.new('NetLocalGroupGetInfo', 'PPLP', 'L', 'netapi32')
137
- API.new('NetLocalGroupGetMembers', 'PPLPLPPP', 'L', 'netapi32')
138
- API.new('NetLocalGroupSetInfo', 'PPLPP', 'L', 'netapi32')
139
- API.new('NetLocalGroupSetMembers', 'PPLPP', 'L', 'netapi32')
140
- API.new('NetMessageBufferSend', 'PPPPL', 'L', 'netapi32')
141
- API.new('NetMessageNameAdd', 'PP', 'L', 'netapi32')
142
- API.new('NetMessageNameDel', 'PP', 'L', 'netapi32')
143
- API.new('NetMessageNameEnum', 'PLPLPPP', 'L', 'netapi32')
144
- API.new('NetMessageNameGetInfo', 'PPLP', 'L', 'netapi32')
145
- API.new('NetQueryDisplayInformation', 'PLLLLPP', 'L', 'netapi32')
146
- API.new('NetRemoteComputerSupports', 'PLP', 'L', 'netapi32')
147
- API.new('NetRemoteTOD', 'PP', 'L', 'netapi32')
148
- API.new('NetRenameMachineInDomain', 'PPPPL', 'L', 'netapi32')
149
- API.new('NetScheduleJobAdd', 'PPP', 'L', 'netapi32')
150
- API.new('NetScheduleJobDel', 'PLL', 'L', 'netapi32')
151
- API.new('NetScheduleJobEnum', 'PPLPPP', 'L', 'netapi32')
152
- API.new('NetScheduleJobGetInfo', 'PLP', 'L', 'netapi32')
153
- API.new('NetServerComputerNameAdd', 'PPP', 'L', 'netapi32')
154
- API.new('NetServerComputerNameDel', 'PP', 'L', 'netapi32')
155
- API.new('NetServerDiskEnum', 'PLPLPPP', 'L', 'netapi32')
156
- API.new('NetServerEnum', 'PLPLPPLPP', 'L', 'netapi32')
157
- API.new('NetServerGetInfo', 'PLP', 'L', 'netapi32')
158
- API.new('NetServerSetInfo', 'PLPP', 'L', 'netapi32')
159
- API.new('NetServerTransportAdd', 'PLP', 'L', 'netapi32')
160
- API.new('NetServerTransportAddEx', 'PLP', 'L', 'netapi32')
161
- API.new('NetServerTransportDel', 'PLP', 'L', 'netapi32')
162
- API.new('NetServerTransportEnum', 'PLPLPPP', 'L', 'netapi32')
163
- API.new('NetUnjoinDomain', 'PPPL', 'L', 'netapi32')
164
- API.new('NetUseAdd', 'PLPP', 'L', 'netapi32')
165
- API.new('NetUseDel', 'PPL', 'L', 'netapi32')
166
- API.new('NetUseEnum', 'PLPLPPP', 'L', 'netapi32')
167
- API.new('NetUseGetInfo', 'PPLP', 'L', 'netapi32')
168
- API.new('NetUserAdd', 'PLPP', 'L', 'netapi32')
169
- API.new('NetUserChangePassword', 'PPPP', 'L', 'netapi32')
170
- API.new('NetUserDel', 'PP', 'L', 'netapi32')
171
- API.new('NetUserEnum', 'PLLPLPPP', 'L', 'netapi32')
172
- API.new('NetUserGetGroups', 'PPLPLPP', 'L', 'netapi32')
173
- API.new('NetUserGetInfo', 'PPLP', 'L', 'netapi32')
174
- API.new('NetUserGetLocalGroups', 'PPLLPLPP', 'L', 'netapi32')
175
- API.new('NetUserModalsGet', 'PLP', 'L', 'netapi32')
176
- API.new('NetUserModalsSet', 'PLPP', 'L', 'netapi32')
177
- API.new('NetUserSetGroups', 'PPLPL', 'L', 'netapi32')
178
- API.new('NetUserSetInfo', 'PPLPP', 'L', 'netapi32')
179
- API.new('NetValidateName', 'PPPPP', 'L', 'netapi32')
180
- API.new('NetWkstaGetInfo', 'PLP', 'L', 'netapi32')
181
- API.new('NetWkstaSetInfo', 'PLPP', 'L', 'netapi32')
182
- API.new('NetWkstaTransportAdd', 'PLPP', 'L', 'netapi32')
183
- API.new('NetWkstaTransportDel', 'PPL', 'L', 'netapi32')
184
- API.new('NetWkstaTransportEnum', 'PLPLPPP', 'L', 'netapi32')
185
- API.new('NetWkstaUserEnum', 'PLPLPPP', 'L', 'netapi32')
186
- API.new('NetWkstaUserGetInfo', 'PLP', 'L', 'netapi32')
187
- API.new('NetWkstaUserSetInfo', 'PPLP', 'L', 'netapi32')
188
-
189
- # Windows XP or later.
190
- begin
191
- API.new('GetNetScheduleAccountInformation', 'PLP', 'L', 'mstask')
192
- API.new('SetNetScheduleAccountInformation', 'PPP', 'L', 'netapi32')
193
- rescue Exception
194
- # Do nothing. Not supported on current platform.
195
- end
196
-
197
- def NetAlertRaise(name, buf, bufsize)
198
- NetAlertRaise.call(name, buf, bufsize) == NERR_Success
199
- end
200
-
201
- def NetAlertRaiseEx(name, data, size, service)
202
- NetAlertRaiseEx.call(name, data, size, service) == NERR_Success
203
- end
204
-
205
- def NetApiBufferAllocate(num_bytes, buf)
206
- NetApiBufferAllocate.call(num_bytes, buf) == NERR_Success
207
- end
208
-
209
- def NetApiBufferFree(buf)
210
- NetApiBufferFree.call(buf) == NERR_Success
211
- end
212
-
213
- def NetApiBufferReallocate(old_buf, count, new_buf)
214
- NetApiBufferReallocate.call(old_buf, count, new_buf) == NERR_Success
215
- end
216
-
217
- def NetApiBufferSize(buf, count)
218
- NetApiBufferSize.call(buf, count) == NERR_Success
219
- end
220
-
221
- def NetGetAnyDCName(server, domain, buf)
222
- NetGetAnyDCName.call(server, domain, buf) == NERR_Success
223
- end
224
-
225
- def NetGetDCName(server, domain, buf)
226
- NetGetDCName.call(server, domain, buf) == NERR_Success
227
- end
228
-
229
- def NetGetDisplayInformationIndex(server, level, prefix, index)
230
- NetGetDisplayInformationIndex.call(server, level, prefix, index) == NERR_Success
231
- end
232
-
233
- def NetGetJoinableOUs(server, domain, account, password, count, ous)
234
- NetGetJoinableOUs.call(server, domain, account, password, count, ous) == NERR_Success
235
- end
236
-
237
- def NetGetJoinInformation(server, buf, buf_type)
238
- NetGetJoinInformation.call(server, buf, buf_type) == NERR_Success
239
- end
240
-
241
- def NetGroupAdd(server, level, buf, err)
242
- NetGroupAdd.call(server, level, buf, err).call == NERR_Success
243
- end
244
-
245
- def NetGroupAddUser(server, group, user)
246
- NetGroupAddUser.call(server, group, user) == NERR_Success
247
- end
248
-
249
- def NetGroupDel(server, group)
250
- NetGroupDel.call(server, group) == NERR_Success
251
- end
252
-
253
- def NetGroupDelUser(server, group, user)
254
- NetGroupDelUser.call(server, group, user) == NERR_Success
255
- end
256
-
257
- def NetGroupEnum(server, level, buf, max, entries, total_entries, resume)
258
- NetGroupEnum.call(server, level, buf, max, entries, total_entries, resume) == NERR_Success
259
- end
260
-
261
- def NetGroupGetInfo(server, group, level, buf)
262
- NetGroupGetInfo.call(server, group, level, buf) == NERR_Success
263
- end
264
-
265
- def NetGroupGetUsers(server, group, level, buf, max, entries, total_entries, resume)
266
- NetGroupGetUsers.call(server, group, level, buf, max, entries, total_entries, resume) == NERR_Success
267
- end
268
-
269
- def NetGroupSetInfo(server, group, level, buf, err)
270
- NetGroupSetInfo.call(server, group, level, buf, err) == NERR_Success
271
- end
272
-
273
- def NetGroupSetUsers(server, group, level, buf, total)
274
- NetGroupSetUsers.call(server, group, level, buf, total) == NERR_Success
275
- end
276
-
277
- def NetJoinDomain(server, domain, account_ou, account, password, opts)
278
- NetJoinDomain.call(server, domain, account_ou, account, password, opts) == NERR_Success
279
- end
280
-
281
- def NetLocalGroupAdd(server, level, buf, err)
282
- NetLocalGroupAdd.call(server, level, buf, err) == NERR_Success
283
- end
284
-
285
- def NetLocalGroupAddMembers(server, group, level, buf, total)
286
- NetLocalGroupAddMembers.call(server, group, level, buf, total) == NERR_Success
287
- end
288
-
289
- def NetLocalGroupDel(server, group)
290
- NetLocalGroupDel.call(server, group) == NERR_Success
291
- end
292
-
293
- def NetLocalGroupDelMembers(server, group, level, buf, total)
294
- NetLocalGroupDelMembers.call(server, group, level, buf, total) == NERR_Success
295
- end
296
-
297
- def NetLocalGroupEnum(server, level, buf, max, entries, total_entries, resume)
298
- NetLocalGroupEnum.call(server, level, buf, max, entries, total_entries, resume) == NERR_Success
299
- end
300
-
301
- def NetLocalGroupGetInfo(server, group, level, buf)
302
- NetLocalGroupGetInfo.call(server, group, level, buf) == NERR_Success
303
- end
304
-
305
- def NetLocalGroupGetMembers(server, group, level, buf, max, entries, total_entries, resume)
306
- NetLocalGroupGetMembers.call(server, group, level, buf, max, entries, total_entries, resume) == NERR_Success
307
- end
308
-
309
- def NetLocalGroupSetInfo(server, group, level, buf, err)
310
- NetLocalGroupSetInfo.call(server, group, level, buf, err) == NERR_Success
311
- end
312
-
313
- def NetLocalGroupSetMembers(server, group, level, buf, total)
314
- NetLocalGroupSetMembers.call(server, group, level, buf, total) == NERR_Success
315
- end
316
-
317
- def NetMessageBufferSend(server, msg, from, buf, bufsize)
318
- NetMessageBufferSend.call(server, msg, from, buf, bufsize) == NERR_Success
319
- end
320
-
321
- def NetMessageNameAdd(server, msg)
322
- NetMessageNameAdd.call(server, msg) == NERR_Success
323
- end
324
-
325
- def NetMessageNameDel(server, msg)
326
- NetMessageNameDel.call(server, msg) == NERR_Success
327
- end
328
-
329
- def NetMessageNameEnum(server, level, buf, max, entries, total_entries, resume)
330
- NetMessageNameEnum.call(server, level, buf, max, entries, total_entries, resume) == NERR_Success
331
- end
332
-
333
- def NetMessageNameGetInfo(server, msg, level, buf)
334
- NetMessageNameGetInfo.call(server, msg, level, buf) == NERR_Success
335
- end
336
-
337
- def NetQueryDisplayInformation(server, level, index, entries, max, count, buf)
338
- NetQueryDisplayInformation.call(server, level, index, entries, max, count, buf) == NERR_Success
339
- end
340
-
341
- def NetRemoteComputerSupports(server, level, index, entries, max, count, buf)
342
- NetRemoteComputerSupports.call(server, level, index, entries, max, count, buf) == NERR_Success
343
- end
344
-
345
- def NetRemoteTOD(server, buf)
346
- NetRemoteTOD.call(server, buf) == NERR_Success
347
- end
348
-
349
- def NetRenameMachineInDomain(server, machine, account, password, options)
350
- NetRenameMachineInDomain.call(server, machine, account, password, options) == NERR_Success
351
- end
352
-
353
- def NetScheduleJobAdd(server, buf, job)
354
- NetScheduleJobAdd.call(server, buf, job) == NERR_Success
355
- end
356
-
357
- def NetScheduleJobDel(server, min, max)
358
- NetScheduleJobDel.call(server, min, max) == NERR_Success
359
- end
360
-
361
- def NetScheduleJobEnum(server, buf, max, entries, total_entries, resume)
362
- NetScheduleJobEnum.call(server, buf, max, entries, total_entries, resume) == NERR_Success
363
- end
364
-
365
- def NetScheduleJobGetInfo(server, job, buf)
366
- NetScheduleJobGetInfo.call(server, job, buf) == NERR_Success
367
- end
368
-
369
- def NetServerComputerNameAdd(server, em_domain, em_server)
370
- NetServerComputerNameAdd.call(server, em_domain, em_server) == NERR_Success
371
- end
372
-
373
- def NetServerComputerNameDel(server, em_server)
374
- NetServerComputerNameDel.call(server, em_server) == NERR_Success
375
- end
376
-
377
- def NetServerDiskEnum(server, level, buf, maxlen, entries, total_entries, resume)
378
- NetServerDiskEnum.call(server, level, buf, maxlen, entries, total_entries, resume) == NERR_Success
379
- end
380
-
381
- def NetServerEnum(server, level, ptr, maxlen, num, total, stype, domain, handle)
382
- NetServerEnum.call(server, level, ptr, maxlen, num, total, stype, domain, handle) == NERR_Success
383
- end
384
-
385
- def NetServerGetInfo(server, level, buf)
386
- NetServerGetInfo.call(server, level, buf) == NERR_Success
387
- end
388
-
389
- def NetServerSetInfo(server, level, buf, error)
390
- NetServerSetInfo.call(server, level, buf, error) == NERR_Success
391
- end
392
-
393
- def NetServerTransportAdd(server, level, buf)
394
- NetServerTransportAdd.call(server, level, buf) == NERR_Success
395
- end
396
-
397
- def NetServerTransportAddEx(server, level, buf)
398
- NetServerTransportAddEx.call(server, level, buf) == NERR_Success
399
- end
400
-
401
- def NetServerTransportDel(server, level, buf)
402
- NetServerTransportDel.call(server, level, buf) == NERR_Success
403
- end
404
-
405
- def NetServerTransportEnum(server, level, buf, maxlen, entries, total_entries, resume)
406
- NetServerTransportEnum.call(server, level, buf, maxlen, entries, total_entries, resume) == NERR_Success
407
- end
408
-
409
- def NetUnjoinDomain(server, account, password, options)
410
- NetUnjoinDomain.call(server, account, password, options) == NERR_Success
411
- end
412
-
413
- def NetUseAdd(server, level, buf, error)
414
- NetUseAdd.call(server, level, buf, error) == NERR_Success
415
- end
416
-
417
- def NetUseDel(server, name, conn)
418
- NetUseDel.call(server, name, conn) == NERR_Success
419
- end
420
-
421
- def NetUseEnum(server, level, buf, max, entries, total_entries, resume)
422
- NetUseEnum.call(server, level, buf, max, entries, total_entries, resume) == NERR_Success
423
- end
424
-
425
- def NetUseGetInfo(server, name, level, buf)
426
- NetUseGetInfo.call(server, name, level, buf) == NERR_Success
427
- end
428
-
429
- def NetUserAdd(server, level, buf, error)
430
- NetUserAdd.call(server, level, buf, error) == NERR_Success
431
- end
432
-
433
- def NetUserChangePassword(domain, user, old, new)
434
- NetUserChangePassword.call(domain, user, old, new) == NERR_Success
435
- end
436
-
437
- def NetUserDel(server, user)
438
- NetUserDel.call(server, user) == NERR_Success
439
- end
440
-
441
- def NetUserEnum(server, level, filter, buf, max, entries, total_entries, resume)
442
- NetUserEnum.call(server, level, filter, buf, max, entries, total_entries, resume) == NERR_Success
443
- end
444
-
445
- def NetUserGetGroups(server, user, level, buf, max, entries, total_entries)
446
- NetUserGetGroups.call(server, user, level, buf, max, entries, total_entries) == NERR_Success
447
- end
448
-
449
- def NetUserGetInfo(server, user, level, buf)
450
- NetUserGetInfo.call(server, user, level, buf) == NERR_Success
451
- end
452
-
453
- def NetUserGetLocalGroups(server, user, level, flags, buf, max, entries, total_entries)
454
- NetUserGetLocalGroups.call(server, user, level, flags, buf, max, entries, total_entries) == NERR_Success
455
- end
456
-
457
- def NetUserModalsGet(server, level, buf)
458
- NetUserModalsGet.call(server, level, buf) == NERR_Success
459
- end
460
-
461
- def NetUserModalsSet(server, level, buf, error)
462
- NetUserModalsSet.call(server, level, buf, error) == NERR_Success
463
- end
464
-
465
- def NetUserSetGroups(server, user, level, buf, num)
466
- NetUserSetGroups.call(server, user, level, buf, num) == NERR_Success
467
- end
468
-
469
- def NetUserSetInfo(server, user, level, buf, error)
470
- NetUserSetInfo.call(server, user, level, buf, error) == NERR_Success
471
- end
472
-
473
- def NetValidateName(server, name, account, password, name_type)
474
- NetValidateName.call(server, name, account, password, name_type) == NERR_Success
475
- end
476
-
477
- def NetWkstaGetInfo(server, level, buf)
478
- NetWkstaGetInfo.call(server, level, buf) == NERR_Success
479
- end
480
-
481
- def NetWkstaSetInfo(server, level, buf, error)
482
- NetWkstaSetInfo.call(server, level, buf, error) == NERR_Success
483
- end
484
-
485
- def NetWkstaTransportAdd(server, level, buf, error)
486
- NetWkstaTransportAdd.call(server, level, buf, error) == NERR_Success
487
- end
488
-
489
- def NetWkstaTransportDel(server, name, cond)
490
- NetWkstaTransportDel.call(server, name, cond) == NERR_Success
491
- end
492
-
493
- def NetWkstaTransportEnum(server, level, buf, maxlen, entries, total_entries, resume)
494
- NetWkstaTransportEnum.call(server, level, buf, maxlen, entries, total_entries, resume) == NERR_Success
495
- end
496
-
497
- def NetWkstaUserEnum(server, level, buf, maxlen, entries, total_entries, resume)
498
- NetWkstaUserEnum.call(server, level, buf, maxlen, entries, total_entries, resume) == NERR_Success
499
- end
500
-
501
- def NetWkstaUserGetInfo(res, level, buf)
502
- NetWkstaUserGetInfo.call(res, level, buf) == NERR_Success
503
- end
504
-
505
- def NetWkstaUserSetInfo(res, level, buf, error)
506
- NetWkstaUserSetInfo.call(res, level, buf, error) == NERR_Success
507
- end
508
-
509
- # Windows XP or later
510
- begin
511
- def GetNetScheduleAccountInformation(server, num_chars, chars)
512
- GetNetScheduleAccountInformation.call(server, num_chars, chars) == NERR_Success
513
- end
514
-
515
- def SetNetScheduleAccountInformation(server, account, password)
516
- SetNetScheduleAccountInformation.call(server, account, password) == NERR_Success
517
- end
518
- rescue Exception
519
- end
520
- end
521
- end