windows-pr 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,15 @@
1
+ = 1.0.4 - 15-May-2009
2
+ * Created the Windows::COM::Variant module.
3
+ * Created the Windows::COM::Accessibility module.
4
+ * Added some IDispatch constants to the Windows::COM module.
5
+ * Added some IDispatch error constants to the Windows::Error module.
6
+ * Added many more constants to the Windows::COM::Automation module.
7
+ * Added a couple of functions to the Windows::National module.
8
+ * Corrected the return type for various SysXXX functions in the
9
+ Windows::COM::Automation module.
10
+ * Corrected the prototype for the RegEnumKeyEx function in the
11
+ Windows::Registry module.
12
+
1
13
  = 1.0.3 - 23-Apr-2009
2
14
  * Created the Windows::GDI::MetaFile module.
3
15
  * Added GetWindowLongPtr and SetWindowLongPtr to Windows::Window::Classes.
data/lib/windows/com.rb CHANGED
@@ -93,6 +93,24 @@ module Windows
93
93
  CLSCTX_ACTIVATE_32_BIT_SERVER = 0x40000
94
94
  CLSCTX_ACTIVATE_64_BIT_SERVER = 0x80000
95
95
 
96
+ # IDispatch
97
+
98
+ DISPID_UNKNOWN = -1
99
+ DISPID_VALUE = 0
100
+ DISPID_PROPERTYPUT = -3
101
+ DISPID_NEWENUM = -4
102
+ DISPID_EVALUATE = -5
103
+ DISPID_CONSTRUCTOR = -6
104
+ DISPID_DESTRUCTOR = -7
105
+ DISPID_COLLECT = -8
106
+
107
+ # Flags for IDispatch::Invoke
108
+
109
+ DISPATCH_METHOD = 0x1
110
+ DISPATCH_PROPERTYGET = 0x2
111
+ DISPATCH_PROPERTYPUT = 0x4
112
+ DISPATCH_PROPERTYPUTREF = 0x8
113
+
96
114
  API.new('BindMoniker', 'PLPP', 'L', 'ole32')
97
115
  API.new('CLSIDFromProgID', 'PP', 'L', 'ole32')
98
116
  API.new('CLSIDFromProgIDEx', 'PP', 'L', 'ole32')
@@ -156,6 +174,7 @@ module Windows
156
174
  API.new('OleRegGetMiscStatus', 'PLP', 'L', 'ole32')
157
175
  API.new('OleRegGetUserType', 'PLP', 'L', 'ole32')
158
176
  API.new('OleSetAutoConvert', 'PP', 'L', 'ole32')
177
+ API.new('OleUninitialize', 'V', 'V', 'ole32')
159
178
  API.new('ProgIDFromCLSID', 'PP', 'L', 'ole32')
160
179
  API.new('StringFromCLSID', 'PP', 'L', 'ole32')
161
180
  API.new('StringFromGUID2', 'PPI', 'I', 'ole32')
@@ -0,0 +1,14 @@
1
+ require 'windows/api'
2
+
3
+ module Windows
4
+ module COM
5
+ module Accessibility
6
+ API.auto_namespace = 'Windows::COM::Accessibility'
7
+ API.auto_constant = true
8
+ API.auto_method = true
9
+ API.auto_unicode = false
10
+
11
+ API.new('ObjectFromLresult', 'LPIP', 'L', 'oleacc')
12
+ end
13
+ end
14
+ end
@@ -7,6 +7,95 @@ module Windows
7
7
  API.auto_constant = true
8
8
  API.auto_method = true
9
9
  API.auto_unicode = false
10
+
11
+ REGKIND_DEFAULT = 0
12
+ REGKIND_REGISTER = 1
13
+ REGKIND_NONE = 2
14
+
15
+ # VARKIND enum
16
+
17
+ VAR_PERINSTANCE = 0
18
+ VAR_STATIC = 1
19
+ VAR_CONST = 2
20
+ VAR_DISPATCH = 3
21
+
22
+ # TYPEKIND enum
23
+
24
+ TKIND_ENUM = 0
25
+ TKIND_RECORD = 1
26
+ TKIND_MODULE = 2
27
+ TKIND_INTERFACE = 3
28
+ TKIND_DISPATCH = 4
29
+ TKIND_COCLASS = 5
30
+ TKIND_ALIAS = 6
31
+ TKIND_UNION = 7
32
+ TKIND_MAX = 8
33
+
34
+ # LIBFLAGS enum
35
+
36
+ LIBFLAG_FRESTRICTED = 0x1
37
+ LIBFLAG_FCONTROL = 0x2
38
+ LIBFLAG_FHIDDEN = 0x4
39
+ LIBFLAG_FHASDISKIMAGE = 0x8
40
+
41
+ PARAMFLAG_NONE = 0
42
+ PARAMFLAG_FIN = 0x1
43
+ PARAMFLAG_FOUT = 0x2
44
+ PARAMFLAG_FLCID = 0x4
45
+ PARAMFLAG_FRETVAL = 0x8
46
+ PARAMFLAG_FOPT = 0x10
47
+ PARAMFLAG_FHASDEFAULT = 0x20
48
+ PARAMFLAG_FHASCUSTDATA = 0x40
49
+
50
+ # FUNCFLAGS enum
51
+
52
+ FUNCFLAG_FRESTRICTED = 0x1
53
+ FUNCFLAG_FSOURCE = 0x2
54
+ FUNCFLAG_FBINDABLE = 0x4
55
+ FUNCFLAG_FREQUESTEDIT = 0x8
56
+ FUNCFLAG_FDISPLAYBIND = 0x10
57
+ FUNCFLAG_FDEFAULTBIND = 0x20
58
+ FUNCFLAG_FHIDDEN = 0x40
59
+ FUNCFLAG_FUSESGETLASTERROR = 0x80
60
+ FUNCFLAG_FDEFAULTCOLLELEM = 0x100
61
+ FUNCFLAG_FUIDEFAULT = 0x200
62
+ FUNCFLAG_FNONBROWSABLE = 0x400
63
+ FUNCFLAG_FREPLACEABLE = 0x800
64
+ FUNCFLAG_FIMMEDIATEBIND = 0x1000
65
+
66
+ # TYPEFLAGS enum
67
+
68
+ TYPEFLAG_FAPPOBJECT = 0x1
69
+ TYPEFLAG_FCANCREATE = 0x2
70
+ TYPEFLAG_FLICENSED = 0x4
71
+ TYPEFLAG_FPREDECLID = 0x8
72
+ TYPEFLAG_FHIDDEN = 0x10
73
+ TYPEFLAG_FCONTROL = 0x20
74
+ TYPEFLAG_FDUAL = 0x40
75
+ TYPEFLAG_FNONEXTENSIBLE = 0x80
76
+ TYPEFLAG_FOLEAUTOMATION = 0x100
77
+ TYPEFLAG_FRESTRICTED = 0x200
78
+ TYPEFLAG_FAGGREGATABLE = 0x400
79
+ TYPEFLAG_FREPLACEABLE = 0x800
80
+ TYPEFLAG_FDISPATCHABLE = 0x1000
81
+ TYPEFLAG_FREVERSEBIND = 0x2000
82
+ TYPEFLAG_FPROXY = 0x4000
83
+
84
+ # VARFLAGS enum
85
+
86
+ VARFLAG_FREADONLY = 0x1
87
+ VARFLAG_FSOURCE = 0x2
88
+ VARFLAG_FBINDABLE = 0x4
89
+ VARFLAG_FREQUESTEDIT = 0x8
90
+ VARFLAG_FDISPLAYBIND = 0x10
91
+ VARFLAG_FDEFAULTBIND = 0x20
92
+ VARFLAG_FHIDDEN = 0x40
93
+ VARFLAG_FRESTRICTED = 0x80
94
+ VARFLAG_FDEFAULTCOLLELEM = 0x100
95
+ VARFLAG_FUIDEFAULT = 0x200
96
+ VARFLAG_FNONBROWSABLE = 0x400
97
+ VARFLAG_FREPLACEABLE = 0x800
98
+ VARFLAG_FIMMEDIATEBIND = 0x1000
10
99
 
11
100
  API.new('BstrFromVector', 'PP', 'L', 'oleaut32')
12
101
  API.new('CreateErrorInfo', 'P', 'L', 'oleaut32')
@@ -16,8 +105,8 @@ module Windows
16
105
  API.new('DispInvoke', 'PPPLPPPP', 'L', 'oleaut32')
17
106
  API.new('GetActiveObject', 'PPP', 'L', 'oleaut32')
18
107
  API.new('LoadRegTypeLib', 'PLLLP', 'L', 'oleaut32')
19
- API.new('LoadTypeLib', 'PPP', 'L', 'oleaut32')
20
- API.new('LoadTypeLibEx', 'PPP', 'L', 'oleaut32')
108
+ API.new('LoadTypeLib', 'PP', 'L', 'oleaut32')
109
+ API.new('LoadTypeLibEx', 'PLP', 'L', 'oleaut32')
21
110
  API.new('RegisterActiveObject', 'PPLP', 'L', 'oleaut32')
22
111
  API.new('RevokeActiveObject', 'LP', 'L', 'oleaut32')
23
112
  API.new('RegisterTypeLib', 'PPP', 'L', 'oleaut32')
@@ -43,11 +132,11 @@ module Windows
43
132
  API.new('SafeArrayUnaccessData', 'P', 'L', 'oleaut32')
44
133
  API.new('SafeArrayUnlock', 'P', 'L', 'oleaut32')
45
134
  API.new('SetErrorInfo', 'LP', 'L', 'oleaut32')
46
- API.new('SysAllocString', 'P', 'P', 'oleaut32')
47
- API.new('SysAllocStringByteLen', 'PI', 'P', 'oleaut32')
48
- API.new('SysFreeString', 'P', 'L', 'oleaut32')
135
+ API.new('SysAllocString', 'P', 'L', 'oleaut32')
136
+ API.new('SysAllocStringByteLen', 'PI', 'L', 'oleaut32')
137
+ API.new('SysFreeString', 'P', 'V', 'oleaut32')
49
138
  API.new('SysReAllocString', 'PP', 'L', 'oleaut32')
50
- API.new('SysReAllocStringLen', 'PPI', 'P', 'oleaut32')
139
+ API.new('SysReAllocStringLen', 'PPI', 'L', 'oleaut32')
51
140
  API.new('SysStringByteLen', 'P', 'L', 'oleaut32')
52
141
  API.new('SysStringLen', 'P', 'L', 'oleaut32')
53
142
  API.new('SystemTimeToVariantTime', 'PP', 'I', 'oleaut32')
@@ -0,0 +1,22 @@
1
+ require 'windows/api'
2
+
3
+ module Windows
4
+ module COM
5
+ module Variant
6
+ API.auto_namespace = 'Windows::COM::Variant'
7
+ API.auto_constant = true
8
+ API.auto_method = true
9
+ API.auto_unicode = false
10
+
11
+ VARIANT_TRUE = 1
12
+ VARIANT_FALSE = 0
13
+
14
+ API.new('VariantChangeType', 'PPIL', 'L', 'oleaut32')
15
+ API.new('VariantChangeTypeEx', 'PPLLL', 'L', 'oleaut32')
16
+ API.new('VariantClear', 'P', 'L', 'oleaut32')
17
+ API.new('VariantCopy', 'PP', 'L', 'oleaut32')
18
+ API.new('VariantCopyInd', 'PP', 'L', 'oleaut32')
19
+ API.new('VariantInit', 'P', 'V', 'oleaut32')
20
+ end
21
+ end
22
+ end
data/lib/windows/error.rb CHANGED
@@ -291,6 +291,7 @@ module Windows
291
291
  TC_SIGNAL = 3
292
292
 
293
293
  # From WinError.h
294
+
294
295
  ERROR_INVALID_FLAGS = 0x1004
295
296
  ERROR_NO_UNICODE_TRANSLATION = 0x1113
296
297
 
@@ -305,11 +306,18 @@ module Windows
305
306
  CO_E_NOT_SUPPORTED = 0x80004021
306
307
 
307
308
  CLASS_E_NOAGGREGATION = 0x80040110
309
+
310
+ DISP_E_BADINDEX = 0x8002000B
311
+ DISP_E_PARAMNOTFOUND = 0x80020004
312
+ DISP_E_EXCEPTION = 0x80020009
313
+ DISP_E_MEMBERNOTFOUND = 0x80020003
308
314
 
309
315
  # Registry errors
316
+
310
317
  REGDB_E_CLASSNOTREG = 0x80040154
311
318
 
312
319
  # msterr.h
320
+
313
321
  SCHED_S_TASK_READY = 0x00041300
314
322
  SCHED_S_TASK_RUNNING = 0x00041301
315
323
  SCHED_S_TASK_DISABLED = 0x00041302
@@ -332,6 +340,7 @@ module Windows
332
340
  SCHED_E_UNKNOWN_OBJECT_VERSION = 0x00041313
333
341
 
334
342
  # Socket errors
343
+
335
344
  WSA_INVALID_HANDLE = 6
336
345
  WSA_NOT_ENOUGH_MEMORY = 8
337
346
  WSA_INVALID_PARAMETER = 87
@@ -530,6 +530,8 @@ module Windows
530
530
  LOCALE_USER_DEFAULT = 1024
531
531
  LOCALE_INVARIANT = 8323072
532
532
 
533
+ API.new('EnumSystemCodePages', 'KL', 'L')
534
+ API.new('EnumSystemLocales', 'KL', 'L')
533
535
  API.new('GetACP', 'V', 'I')
534
536
  API.new('GetDateFormat', 'LLPPPI', 'I')
535
537
  API.new('GetLocaleInfo', 'LLPL', 'I')
@@ -98,7 +98,7 @@ module Windows
98
98
  API.new('RegDeleteValue', 'LP', 'L', 'advapi32')
99
99
  API.new('RegDisablePredefinedCache', 'V', 'L', 'advapi32')
100
100
  API.new('RegEnumKey', 'LLPL', 'L', 'advapi32')
101
- API.new('RegEnumKeyEx', 'LLPPPPP', 'L', 'advapi32')
101
+ API.new('RegEnumKeyEx', 'LLPPPPPP', 'L', 'advapi32')
102
102
  API.new('RegEnumValue', 'LLPPPPPP', 'L', 'advapi32')
103
103
  API.new('RegFlushKey', 'L', 'L', 'advapi32')
104
104
  API.new('RegLoadKey', 'LPP', 'L', 'advapi32')
data/windows-pr.gemspec CHANGED
@@ -1,28 +1,28 @@
1
1
  require "rubygems"
2
2
 
3
3
  spec = Gem::Specification.new do |gem|
4
- gem.name = 'windows-pr'
5
- gem.version = '1.0.3'
6
- gem.authors = ['Daniel J. Berger', 'Park Heesob']
7
- gem.email = 'djberg96@gmail.com'
8
- gem.homepage = 'http://www.rubyforge.org/projects/win32utils'
4
+ gem.name = 'windows-pr'
5
+ gem.version = '1.0.4'
6
+ gem.authors = ['Daniel J. Berger', 'Park Heesob']
7
+ gem.email = 'djberg96@gmail.com'
8
+ gem.homepage = 'http://www.rubyforge.org/projects/win32utils'
9
9
  gem.rubyforge_project = 'win32utils'
10
- gem.platform = Gem::Platform::RUBY
11
- gem.summary = 'Windows functions and constants bundled via Win32::API'
12
- gem.test_files = Dir["test/tc*"]
13
- gem.has_rdoc = true
14
- files = Dir["**/*"]
15
- files = files.reject{ |fn| fn.include?('CVS') }
16
- gem.files = files
17
- gem.require_path = "lib"
18
- gem.extra_rdoc_files = ['MANIFEST', 'README', 'CHANGES']
10
+ gem.platform = Gem::Platform::RUBY
11
+ gem.summary = 'Windows functions and constants bundled via Win32::API'
12
+ gem.test_files = Dir["test/tc*"]
13
+ gem.files = Dir["**/*"].reject{ |fn| fn.include?('CVS') }
14
+ gem.extra_rdoc_files = ['MANIFEST', 'README', 'CHANGES']
15
+
19
16
  gem.add_dependency('windows-api', '>= 0.3.0')
20
17
  gem.add_dependency('win32-api', '>= 1.4.0')
21
- gem.description = "The windows-pr library is a collection of Windows
22
- functions and constants pre-defined for you using the win32-api library.
23
- It also autogenerates explicit ANSI and Wide character versions of those
24
- functions, as well as constants that can be used as methods, e.g.
25
- CloseHandle() instead of CloseHandle.call().".gsub(/\s+/, ' ')
18
+
19
+ gem.description = <<-EOF
20
+ The windows-pr library is a collection of Windows functions and constants
21
+ pre-defined for you using the windows-api library. It also autogenerates
22
+ explicit ANSI and Wide character versions of those functions, as well as
23
+ constants that can be used as methods, e.g. CloseHandle() instead of
24
+ CloseHandle.call().
25
+ EOF
26
26
  end
27
27
 
28
28
  if $0 == __FILE__
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: windows-pr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-04-23 00:00:00 -06:00
13
+ date: 2009-05-15 00:00:00 -06:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -33,7 +33,7 @@ dependencies:
33
33
  - !ruby/object:Gem::Version
34
34
  version: 1.4.0
35
35
  version:
36
- description: The windows-pr library is a collection of Windows functions and constants pre-defined for you using the win32-api library. It also autogenerates explicit ANSI and Wide character versions of those functions, as well as constants that can be used as methods, e.g. CloseHandle() instead of CloseHandle.call().
36
+ description: " The windows-pr library is a collection of Windows functions and constants\n pre-defined for you using the windows-api library. It also autogenerates\n explicit ANSI and Wide character versions of those functions, as well as\n constants that can be used as methods, e.g. CloseHandle() instead of\n CloseHandle.call().\n"
37
37
  email: djberg96@gmail.com
38
38
  executables: []
39
39
 
@@ -47,7 +47,9 @@ files:
47
47
  - CHANGES
48
48
  - doc/conversion_guide.txt
49
49
  - lib/windows/clipboard.rb
50
+ - lib/windows/com/accessibility.rb
50
51
  - lib/windows/com/automation.rb
52
+ - lib/windows/com/variant.rb
51
53
  - lib/windows/com.rb
52
54
  - lib/windows/console.rb
53
55
  - lib/windows/debug.rb
@@ -182,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
184
  requirements: []
183
185
 
184
186
  rubyforge_project: win32utils
185
- rubygems_version: 1.3.2
187
+ rubygems_version: 1.3.3
186
188
  signing_key:
187
189
  specification_version: 3
188
190
  summary: Windows functions and constants bundled via Win32::API