summaryrefslogtreecommitdiff
path: root/ext/win32ole
diff options
context:
space:
mode:
Diffstat (limited to 'ext/win32ole')
-rw-r--r--ext/win32ole/.document1
-rw-r--r--ext/win32ole/lib/win32ole.rb3
-rw-r--r--ext/win32ole/lib/win32ole/property.rb18
-rw-r--r--ext/win32ole/sample/excel1.rb37
-rw-r--r--ext/win32ole/sample/excel2.rb31
-rw-r--r--ext/win32ole/sample/excel3.rb21
-rw-r--r--ext/win32ole/sample/ie.rb12
-rw-r--r--ext/win32ole/sample/ieconst.rb33
-rw-r--r--ext/win32ole/sample/ienavi.rb41
-rw-r--r--ext/win32ole/sample/ienavi2.rb41
-rw-r--r--ext/win32ole/sample/oledirs.rb24
-rw-r--r--ext/win32ole/sample/olegen.rb348
-rw-r--r--ext/win32ole/sample/xml.rb7307
-rw-r--r--ext/win32ole/win32ole.c268
-rw-r--r--ext/win32ole/win32ole.gemspec20
-rw-r--r--ext/win32ole/win32ole_error.c17
-rw-r--r--ext/win32ole/win32ole_event.c72
-rw-r--r--ext/win32ole/win32ole_method.c130
-rw-r--r--ext/win32ole/win32ole_param.c116
-rw-r--r--ext/win32ole/win32ole_record.c54
-rw-r--r--ext/win32ole/win32ole_type.c145
-rw-r--r--ext/win32ole/win32ole_typelib.c92
-rw-r--r--ext/win32ole/win32ole_variable.c41
-rw-r--r--ext/win32ole/win32ole_variant.c70
-rw-r--r--ext/win32ole/win32ole_variant_m.c12
25 files changed, 557 insertions, 8397 deletions
diff --git a/ext/win32ole/.document b/ext/win32ole/.document
new file mode 100644
index 0000000000..decba0135a
--- /dev/null
+++ b/ext/win32ole/.document
@@ -0,0 +1 @@
+*.[ch]
diff --git a/ext/win32ole/lib/win32ole.rb b/ext/win32ole/lib/win32ole.rb
index d7034f7845..f5c8a52c4a 100644
--- a/ext/win32ole/lib/win32ole.rb
+++ b/ext/win32ole/lib/win32ole.rb
@@ -5,7 +5,6 @@ rescue LoadError
end
if defined?(WIN32OLE)
- # WIN32OLE
class WIN32OLE
#
@@ -26,7 +25,7 @@ if defined?(WIN32OLE)
def ole_methods_safely
ole_methods
- rescue WIN32OLEQueryInterfaceError
+ rescue WIN32OLE::QueryInterfaceError
[]
end
end
diff --git a/ext/win32ole/lib/win32ole/property.rb b/ext/win32ole/lib/win32ole/property.rb
index fea047cd19..558056b32b 100644
--- a/ext/win32ole/lib/win32ole/property.rb
+++ b/ext/win32ole/lib/win32ole/property.rb
@@ -1,7 +1,12 @@
# frozen_string_literal: false
-# OLEProperty
-# helper class of Property with arguments.
-class OLEProperty
+
+class WIN32OLE
+end
+
+# OLEProperty is a helper class of Property with arguments, used by
+# `olegen.rb`-generated files.
+class WIN32OLE::Property
+ # :stopdoc:
def initialize(obj, dispid, gettypes, settypes)
@obj = obj
@dispid = dispid
@@ -14,4 +19,11 @@ class OLEProperty
def []=(*args)
@obj._setproperty(@dispid, args, @settypes)
end
+ # :stopdoc:
+end
+
+module WIN32OLE::VariantType
+ # Alias for `olegen.rb`-generated files, that should include
+ # WIN32OLE::VARIANT.
+ OLEProperty = WIN32OLE::Property
end
diff --git a/ext/win32ole/sample/excel1.rb b/ext/win32ole/sample/excel1.rb
deleted file mode 100644
index 4fe1d0c2a9..0000000000
--- a/ext/win32ole/sample/excel1.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# frozen_string_literal: false
-require 'win32ole'
-
-application = WIN32OLE.new('Excel.Application')
-
-application.visible = true
-workbook = application.Workbooks.Add();
-worksheet = workbook.Worksheets(1);
-
-=begin
-worksheet.Range("A1:D1").value = ["North","South","East","West"];
-worksheet.Range("A2:B2").value = [5.2, 10];
-
-worksheet.Range("C2").value = 8;
-worksheet.Range("D2").value = 20;
-=end
-
-worksheet.Range("A1:B2").value = [["North","South"],
- [5.2, 10]];
-
-vals = WIN32OLE_VARIANT.new([["East","West"],
- [8, 20]],
- WIN32OLE::VARIANT::VT_ARRAY)
-worksheet.Range("C1:D2").value = vals
-
-range = worksheet.Range("A1:D2");
-range.Select
-chart = workbook.Charts.Add;
-
-workbook.saved = true;
-
-print "Now quit Excel... Please enter."
-gets
-
-application.ActiveWorkbook.Close(0);
-application.Quit();
-
diff --git a/ext/win32ole/sample/excel2.rb b/ext/win32ole/sample/excel2.rb
deleted file mode 100644
index 47a5715f84..0000000000
--- a/ext/win32ole/sample/excel2.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: false
-require 'win32ole'
-
-# -4100 is the value for the Excel constant xl3DColumn.
-ChartTypeVal = -4100;
-
-# Creates OLE object to Excel
-excel = WIN32OLE.new("excel.application")
-
-# Create and rotate the chart
-excel.visible = true;
-excel.Workbooks.Add();
-excel.Range("a1").value = 3;
-excel.Range("a2").value = 2;
-excel.Range("a3").value = 1;
-excel.Range("a1:a3").Select();
-excelchart = excel.Charts.Add();
-excelchart.type = ChartTypeVal;
-
-i = 0
-i.step(180, 10) do |rot|
- excelchart.rotation=rot;
- sleep 0.1
-end
-# Done, bye
-
-print "Now quit Excel... Please enter."
-gets
-
-excel.ActiveWorkbook.Close(0);
-excel.Quit();
diff --git a/ext/win32ole/sample/excel3.rb b/ext/win32ole/sample/excel3.rb
deleted file mode 100644
index 72aee2a929..0000000000
--- a/ext/win32ole/sample/excel3.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: false
-require 'win32ole'
-
-#application = WIN32OLE.new('Excel.Application.5')
-application = WIN32OLE.new('Excel.Application')
-
-application.visible = true
-workbook = application.Workbooks.Add();
-sheet = workbook.Worksheets(1);
-sheetS = workbook.Worksheets
-puts "The number of sheets is #{sheetS.count}"
-puts "Now add 2 sheets after of `#{sheet.name}`"
-sheetS.add({'count'=>2, 'after'=>sheet})
-puts "The number of sheets is #{sheetS.count}"
-
-print "Now quit Excel... Please enter."
-gets
-
-application.ActiveWorkbook.Close(0);
-application.Quit();
-
diff --git a/ext/win32ole/sample/ie.rb b/ext/win32ole/sample/ie.rb
deleted file mode 100644
index 4db64eed30..0000000000
--- a/ext/win32ole/sample/ie.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-# frozen_string_literal: false
-require 'win32ole'
-url = 'http://www.ruby-lang.org/'
-ie = WIN32OLE.new('InternetExplorer.Application')
-ie.visible = true
-ie.gohome
-print "Now navigate Ruby home page... Please enter."
-gets
-ie.navigate(url)
-print "Now quit Internet Explorer... Please enter."
-gets
-ie.Quit()
diff --git a/ext/win32ole/sample/ieconst.rb b/ext/win32ole/sample/ieconst.rb
deleted file mode 100644
index 363a4f8153..0000000000
--- a/ext/win32ole/sample/ieconst.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: false
-require 'win32ole'
-
-ie = WIN32OLE.new('InternetExplorer.Application')
-=begin
-WIN32OLE.const_load(ie)
-WIN32OLE.constants.sort.each do |c|
- puts "#{c} = #{WIN32OLE.const_get(c)}"
-end
-=end
-
-module IE_CONST
-end
-
-WIN32OLE.const_load(ie, IE_CONST)
-IE_CONST.constants.sort.each do |c|
- puts "#{c} = #{IE_CONST.const_get(c)}"
-end
-
-#------------------------------------------------------------
-# Remark!!! CONSTANTS has not tested enoughly!!!
-# CONSTANTS is alpha release.
-# If there are constants which first letter is not [a-zA-Z],
-# like a '_Foo', then maybe you can access the value by
-# using CONSTANTS['_Foo']
-#------------------------------------------------------------
-IE_CONST::CONSTANTS.each do |k, v|
- puts "#{k} = #{v}"
-end
-
-puts WIN32OLE::VERSION
-ie.quit
-
diff --git a/ext/win32ole/sample/ienavi.rb b/ext/win32ole/sample/ienavi.rb
deleted file mode 100644
index 5d0536028b..0000000000
--- a/ext/win32ole/sample/ienavi.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-# frozen_string_literal: false
-require 'win32ole'
-
-$urls = []
-
-def navigate(url)
- $urls << url
-end
-
-def stop_msg_loop
- puts "Now Stop IE..."
- $LOOP = false;
-end
-
-def default_handler(event, *args)
- case event
- when "BeforeNavigate"
- puts "Now Navigate #{args[0]}..."
- end
-end
-
-ie = WIN32OLE.new('InternetExplorer.Application')
-ie.visible = true
-ie.gohome
-
-ev = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents')
-
-ev.on_event {|*args| default_handler(*args)}
-ev.on_event("NavigateComplete") {|url| navigate(url)}
-ev.on_event("Quit") {|*args| stop_msg_loop}
-
-$LOOP = true
-while ($LOOP)
- WIN32OLE_EVENT.message_loop
-end
-
-puts "You Navigated the URLs ..."
-$urls.each_with_index do |url, i|
- puts "(#{i+1}) #{url}"
-end
-
diff --git a/ext/win32ole/sample/ienavi2.rb b/ext/win32ole/sample/ienavi2.rb
deleted file mode 100644
index 3248393077..0000000000
--- a/ext/win32ole/sample/ienavi2.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-# frozen_string_literal: false
-require 'win32ole'
-
-class IEHandler
- attr_reader :loop
- def initialize
- @urls = []
- @loop = true
- end
- def method_missing(event, *args)
- case event
- when "BeforeNavigate2"
- puts "Now Navigate #{args[1]}..."
- end
- end
- def onNavigateComplete2(pdisp, url)
- @urls << url
- end
- def onOnQuit
- puts "Now Stop IE..."
- @loop = false
- end
- def put_urls
- puts "You Navigated the URLs ..."
- @urls.each_with_index do |url, i|
- puts "(#{i+1}) #{url}"
- end
- end
-end
-
-ie = WIN32OLE.new('InternetExplorer.Application')
-ie.visible = true
-ie.gohome
-
-ev = WIN32OLE_EVENT.new(ie)
-ev.handler = IEHandler.new
-
-while (ev.handler.loop)
- WIN32OLE_EVENT.message_loop
-end
-ev.handler.put_urls
diff --git a/ext/win32ole/sample/oledirs.rb b/ext/win32ole/sample/oledirs.rb
deleted file mode 100644
index e52a0fd7ac..0000000000
--- a/ext/win32ole/sample/oledirs.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: false
-#
-# You need WSH(Windows Scripting Host) to run this script.
-#
-
-require "win32ole"
-
-def listup(items)
-# items.each do |i|
- for i in items
- puts i.name
- end
-end
-
-fs = WIN32OLE.new("Scripting.FileSystemObject")
-
-folder = fs.GetFolder(".")
-
-puts "--- folder of #{folder.path} ---"
-listup(folder.SubFolders)
-
-puts "--- files of #{folder.path} ---"
-listup(folder.Files)
-
diff --git a/ext/win32ole/sample/olegen.rb b/ext/win32ole/sample/olegen.rb
deleted file mode 100644
index 4b088a774f..0000000000
--- a/ext/win32ole/sample/olegen.rb
+++ /dev/null
@@ -1,348 +0,0 @@
-# frozen_string_literal: false
-#-----------------------------
-# olegen.rb
-# $Revision$
-#-----------------------------
-
-require 'win32ole'
-
-class WIN32COMGen
- def initialize(typelib)
- @typelib = typelib
- @receiver = ""
- end
- attr_reader :typelib
-
- def ole_classes(typelib)
- begin
- @ole = WIN32OLE.new(typelib)
- [@ole.ole_obj_help]
- rescue
- WIN32OLE_TYPE.ole_classes(typelib)
- end
- end
-
- def generate_args(method)
- args = []
- if method.size_opt_params >= 0
- size_required_params = method.size_params - method.size_opt_params
- else
- size_required_params = method.size_params - 1
- end
- size_required_params.times do |i|
- if method.params[i] && method.params[i].optional?
- args.push "arg#{i}=nil"
- else
- args.push "arg#{i}"
- end
- end
- if method.size_opt_params >= 0
- method.size_opt_params.times do |i|
- args.push "arg#{i + size_required_params}=nil"
- end
- else
- args.push "*arg"
- end
- args.join(", ")
- end
-
- def generate_argtype(typedetails)
- ts = ''
- typedetails.each do |t|
- case t
- when 'CARRAY', 'VOID', 'UINT', 'RESULT', 'DECIMAL', 'I8', 'UI8'
-# raise "Sorry type\"" + t + "\" not supported"
- ts << "\"??? NOT SUPPORTED TYPE:`#{t}'\""
- when 'USERDEFINED', 'Unknown Type 9'
- ts << 'VT_DISPATCH'
- break;
- when 'SAFEARRAY'
- ts << 'VT_ARRAY|'
- when 'PTR'
- ts << 'VT_BYREF|'
- when 'INT'
- ts << 'VT_I4'
- else
- if String === t
- ts << 'VT_' + t
- end
- end
- end
- if ts.empty?
- ts = 'VT_VARIANT'
- elsif ts[-1] == ?|
- ts += 'VT_VARIANT'
- end
- ts
- end
-
- def generate_argtypes(method, proptypes)
- types = method.params.collect{|param|
- generate_argtype(param.ole_type_detail)
- }.join(", ")
- if proptypes
- types += ", " if types.size > 0
- types += generate_argtype(proptypes)
- end
- types
- end
-
- def generate_method_body(method, disptype, types=nil)
- " ret = #{@receiver}#{disptype}(#{method.dispid}, [" +
- generate_args(method).gsub("=nil", "") +
- "], [" +
- generate_argtypes(method, types) +
- "])\n" +
- " @lastargs = WIN32OLE::ARGV\n" +
- " ret"
- end
-
- def generate_method_help(method, type = nil)
- str = " # "
- if type
- str += type
- else
- str += method.return_type
- end
- str += " #{method.name}"
- if method.event?
- str += " EVENT"
- str += " in #{method.event_interface}"
- end
- if method.helpstring && method.helpstring != ""
- str += "\n # "
- str += method.helpstring
- end
- args_help = generate_method_args_help(method)
- if args_help
- str += "\n"
- str += args_help
- end
- str
- end
-
- def generate_method_args_help(method)
- args = []
- method.params.each_with_index {|param, i|
- h = " # #{param.ole_type} arg#{i} --- #{param.name}"
- inout = []
- inout.push "IN" if param.input?
- inout.push "OUT" if param.output?
- h += " [#{inout.join('/')}]"
- h += " ( = #{param.default})" if param.default
- args.push h
- }
- if args.size > 0
- args.join("\n")
- else
- nil
- end
- end
-
- def generate_method(method, disptype, io = STDOUT, types = nil)
- io.puts "\n"
- io.puts generate_method_help(method)
- if method.invoke_kind == 'PROPERTYPUT'
- io.print " def #{method.name}=("
- else
- io.print " def #{method.name}("
- end
- io.print generate_args(method)
- io.puts ")"
- io.puts generate_method_body(method, disptype, types)
- io.puts " end"
- end
-
- def generate_propputref_methods(klass, io = STDOUT)
- klass.ole_methods.select {|method|
- method.invoke_kind == 'PROPERTYPUTREF' && method.visible?
- }.each do |method|
- generate_method(method, io)
- end
- end
-
- def generate_properties_with_args(klass, io = STDOUT)
- klass.ole_methods.select {|method|
- method.invoke_kind == 'PROPERTYGET' &&
- method.visible? &&
- method.size_params > 0
- }.each do |method|
- types = method.return_type_detail
- io.puts "\n"
- io.puts generate_method_help(method, types[0])
- io.puts " def #{method.name}"
- if klass.ole_type == "Class"
- io.print " OLEProperty.new(@dispatch, #{method.dispid}, ["
- else
- io.print " OLEProperty.new(self, #{method.dispid}, ["
- end
- io.print generate_argtypes(method, nil)
- io.print "], ["
- io.print generate_argtypes(method, types)
- io.puts "])"
- io.puts " end"
- end
- end
-
- def generate_propput_methods(klass, io = STDOUT)
- klass.ole_methods.select {|method|
- method.invoke_kind == 'PROPERTYPUT' && method.visible? &&
- method.size_params == 1
- }.each do |method|
- ms = klass.ole_methods.select {|m|
- m.invoke_kind == 'PROPERTYGET' &&
- m.dispid == method.dispid
- }
- types = []
- if ms.size == 1
- types = ms[0].return_type_detail
- end
- generate_method(method, '_setproperty', io, types)
- end
- end
-
- def generate_propget_methods(klass, io = STDOUT)
- klass.ole_methods.select {|method|
- method.invoke_kind == 'PROPERTYGET' && method.visible? &&
- method.size_params == 0
- }.each do |method|
- generate_method(method, '_getproperty', io)
- end
- end
-
- def generate_func_methods(klass, io = STDOUT)
- klass.ole_methods.select {|method|
- method.invoke_kind == "FUNC" && method.visible?
- }.each do |method|
- generate_method(method, '_invoke', io)
- end
- end
-
- def generate_methods(klass, io = STDOUT)
- generate_propget_methods(klass, io)
- generate_propput_methods(klass, io)
- generate_properties_with_args(klass, io)
- generate_func_methods(klass, io)
-# generate_propputref_methods(klass, io)
- end
-
- def generate_constants(klass, io = STDOUT)
- klass.variables.select {|v|
- v.visible? && v.variable_kind == 'CONSTANT'
- }.each do |v|
- io.print " "
- io.print v.name.sub(/^./){$&.upcase}
- io.print " = "
- io.puts v.value
- end
- end
-
- def class_name(klass)
- klass_name = klass.name
- if klass.ole_type == "Class" &&
- klass.guid &&
- klass.progid
- klass_name = klass.progid.gsub(/\./, '_')
- end
- if /^[A-Z]/ !~ klass_name || Module.constants.include?(klass_name)
- klass_name = 'OLE' + klass_name
- end
- klass_name
- end
-
- def define_initialize(klass)
- <<STR
-
- def initialize(obj = nil)
- @clsid = "#{klass.guid}"
- @progid = "#{klass.progid}"
- if obj.nil?
- @dispatch = WIN32OLE.new @progid
- else
- @dispatch = obj
- end
- end
-STR
- end
-
- def define_include
- " include WIN32OLE::VARIANT"
- end
-
- def define_instance_variables
- " attr_reader :lastargs"
- end
-
- def define_method_missing
- <<STR
-
- def method_missing(cmd, *arg)
- @dispatch.method_missing(cmd, *arg)
- end
-STR
- end
-
- def define_class(klass, io = STDOUT)
- io.puts "class #{class_name(klass)} # #{klass.name}"
- io.puts define_include
- io.puts define_instance_variables
- io.puts " attr_reader :dispatch"
- io.puts " attr_reader :clsid"
- io.puts " attr_reader :progid"
- io.puts define_initialize(klass)
- io.puts define_method_missing
- end
-
- def define_module(klass, io = STDOUT)
- io.puts "module #{class_name(klass)}"
- io.puts define_include
- io.puts define_instance_variables
- end
-
- def generate_class(klass, io = STDOUT)
- io.puts "\n# #{klass.helpstring}"
- if klass.ole_type == "Class" &&
- klass.guid &&
- klass.progid
- @receiver = "@dispatch."
- define_class(klass, io)
- else
- @receiver = ""
- define_module(klass, io)
- end
- generate_constants(klass, io)
- generate_methods(klass, io)
- io.puts "end"
- end
-
- def generate(io = STDOUT)
- io.puts "require 'win32ole'"
- io.puts "require 'win32ole/property'"
-
- ole_classes(typelib).select{|klass|
- klass.visible? &&
- (klass.ole_type == "Class" ||
- klass.ole_type == "Interface" ||
- klass.ole_type == "Dispatch" ||
- klass.ole_type == "Enum")
- }.each do |klass|
- generate_class(klass, io)
- end
- begin
- @ole.quit if @ole
- rescue
- end
- end
-end
-
-require 'win32ole'
-if __FILE__ == $0
- if ARGV.size == 0
- $stderr.puts "usage: #{$0} Type Library [...]"
- exit 1
- end
- ARGV.each do |typelib|
- comgen = WIN32COMGen.new(typelib)
- comgen.generate
- end
-end
diff --git a/ext/win32ole/sample/xml.rb b/ext/win32ole/sample/xml.rb
deleted file mode 100644
index 5a239c9336..0000000000
--- a/ext/win32ole/sample/xml.rb
+++ /dev/null
@@ -1,7307 +0,0 @@
-# frozen_string_literal: false
-#
-# This file created by olegen.rb as following.
-# ruby olegen.rb 'Microsoft XML, version 2.0' > xml.rb
-#
-require 'win32ole'
-require 'win32ole/property'
-
-#
-module IXMLDOMImplementation
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # BOOL hasFeature
- # BSTR arg0 --- feature [IN]
- # BSTR arg1 --- version [IN]
- def hasFeature(arg0, arg1)
- ret = _invoke(145, [arg0, arg1], [VT_BSTR, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-# Core DOM node interface
-module IXMLDOMNode
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = _getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = _getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = _getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = _getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = _getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = _getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = _getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = _getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = _getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = _getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = _getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = _getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = _getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = _getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = _getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = _getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = _getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = _getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = _getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = _getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = _getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = _getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = _setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = _setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = _setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = _setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = _invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = _invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = _invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = _invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = _invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = _invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = _invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = _invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = _invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = _invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-# Constants that define a node's type
-module OLEtagDOMNodeType
- include WIN32OLE::VARIANT
- attr_reader :lastargs
- NODE_INVALID = 0
- NODE_ELEMENT = 1
- NODE_ATTRIBUTE = 2
- NODE_TEXT = 3
- NODE_CDATA_SECTION = 4
- NODE_ENTITY_REFERENCE = 5
- NODE_ENTITY = 6
- NODE_PROCESSING_INSTRUCTION = 7
- NODE_COMMENT = 8
- NODE_DOCUMENT = 9
- NODE_DOCUMENT_TYPE = 10
- NODE_DOCUMENT_FRAGMENT = 11
- NODE_NOTATION = 12
-end
-
-#
-module IXMLDOMNodeList
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # I4 length
- # number of nodes in the collection
- def length()
- ret = _getproperty(74, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # PTR item
- # collection of nodes
- # I4 arg0 --- index [IN]
- def item
- OLEProperty.new(self, 0, [VT_I4], [VT_I4, VT_BYREF|VT_DISPATCH])
- end
-
- # IXMLDOMNode nextNode
- # get next node from iterator
- def nextNode()
- ret = _invoke(76, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID reset
- # reset the position of iterator
- def reset()
- ret = _invoke(77, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-#
-module IXMLDOMNamedNodeMap
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # I4 length
- # number of nodes in the collection
- def length()
- ret = _getproperty(74, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # PTR item
- # collection of nodes
- # I4 arg0 --- index [IN]
- def item
- OLEProperty.new(self, 0, [VT_I4], [VT_I4, VT_BYREF|VT_DISPATCH])
- end
-
- # IXMLDOMNode getNamedItem
- # lookup item by name
- # BSTR arg0 --- name [IN]
- def getNamedItem(arg0)
- ret = _invoke(83, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode setNamedItem
- # set item by name
- # IXMLDOMNode arg0 --- newItem [IN]
- def setNamedItem(arg0)
- ret = _invoke(84, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeNamedItem
- # remove item by name
- # BSTR arg0 --- name [IN]
- def removeNamedItem(arg0)
- ret = _invoke(85, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode getQualifiedItem
- # lookup the item by name and namespace
- # BSTR arg0 --- baseName [IN]
- # BSTR arg1 --- namespaceURI [IN]
- def getQualifiedItem(arg0, arg1)
- ret = _invoke(87, [arg0, arg1], [VT_BSTR, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeQualifiedItem
- # remove the item by name and namespace
- # BSTR arg0 --- baseName [IN]
- # BSTR arg1 --- namespaceURI [IN]
- def removeQualifiedItem(arg0, arg1)
- ret = _invoke(88, [arg0, arg1], [VT_BSTR, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextNode
- # get next node from iterator
- def nextNode()
- ret = _invoke(89, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID reset
- # reset the position of iterator
- def reset()
- ret = _invoke(90, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-#
-module IXMLDOMDocument
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = _getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = _getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = _getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = _getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = _getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = _getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = _getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = _getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = _getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = _getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = _getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = _getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = _getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = _getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = _getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = _getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = _getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = _getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = _getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = _getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = _getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = _getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocumentType doctype
- # node corresponding to the DOCTYPE
- def doctype()
- ret = _getproperty(38, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMImplementation implementation
- # info on this DOM implementation
- def implementation()
- ret = _getproperty(39, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMElement documentElement
- # the root of the tree
- def documentElement()
- ret = _getproperty(40, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 readyState
- # get the state of the XML document
- def readyState()
- ret = _getproperty(-525, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMParseError parseError
- # get the last parser error
- def parseError()
- ret = _getproperty(59, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR url
- # get the URL for the loaded XML document
- def url()
- ret = _getproperty(60, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL async
- # flag for asynchronous download
- def async()
- ret = _getproperty(61, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL validateOnParse
- # indicates whether the parser performs validation
- def validateOnParse()
- ret = _getproperty(65, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL resolveExternals
- # indicates whether the parser resolves references to external DTD/Entities/Schema
- def resolveExternals()
- ret = _getproperty(66, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL preserveWhiteSpace
- # indicates whether the parser preserves whitespace
- def preserveWhiteSpace()
- ret = _getproperty(67, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = _setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = _setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = _setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = _setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID async
- # flag for asynchronous download
- def async=(arg0)
- ret = _setproperty(61, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID validateOnParse
- # indicates whether the parser performs validation
- def validateOnParse=(arg0)
- ret = _setproperty(65, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID resolveExternals
- # indicates whether the parser resolves references to external DTD/Entities/Schema
- def resolveExternals=(arg0)
- ret = _setproperty(66, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID preserveWhiteSpace
- # indicates whether the parser preserves whitespace
- def preserveWhiteSpace=(arg0)
- ret = _setproperty(67, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID onreadystatechange
- # register a readystatechange event handler
- def onreadystatechange=(arg0)
- ret = _setproperty(68, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID ondataavailable
- # register an ondataavailable event handler
- def ondataavailable=(arg0)
- ret = _setproperty(69, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID ontransformnode
- # register an ontransformnode event handler
- def ontransformnode=(arg0)
- ret = _setproperty(70, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = _invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = _invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = _invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = _invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = _invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = _invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = _invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = _invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = _invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = _invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMElement createElement
- # create an Element node
- # BSTR arg0 --- tagName [IN]
- def createElement(arg0)
- ret = _invoke(41, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocumentFragment createDocumentFragment
- # create a DocumentFragment node
- def createDocumentFragment()
- ret = _invoke(42, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMText createTextNode
- # create a text node
- # BSTR arg0 --- data [IN]
- def createTextNode(arg0)
- ret = _invoke(43, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMComment createComment
- # create a comment node
- # BSTR arg0 --- data [IN]
- def createComment(arg0)
- ret = _invoke(44, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMCDATASection createCDATASection
- # create a CDATA section node
- # BSTR arg0 --- data [IN]
- def createCDATASection(arg0)
- ret = _invoke(45, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMProcessingInstruction createProcessingInstruction
- # create a processing instruction node
- # BSTR arg0 --- target [IN]
- # BSTR arg1 --- data [IN]
- def createProcessingInstruction(arg0, arg1)
- ret = _invoke(46, [arg0, arg1], [VT_BSTR, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMAttribute createAttribute
- # create an attribute node
- # BSTR arg0 --- name [IN]
- def createAttribute(arg0)
- ret = _invoke(47, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMEntityReference createEntityReference
- # create an entity reference node
- # BSTR arg0 --- name [IN]
- def createEntityReference(arg0)
- ret = _invoke(49, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList getElementsByTagName
- # build a list of elements by name
- # BSTR arg0 --- tagName [IN]
- def getElementsByTagName(arg0)
- ret = _invoke(50, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode createNode
- # create a node of the specified node type and name
- # VARIANT arg0 --- type [IN]
- # BSTR arg1 --- name [IN]
- # BSTR arg2 --- namespaceURI [IN]
- def createNode(arg0, arg1, arg2)
- ret = _invoke(54, [arg0, arg1, arg2], [VT_VARIANT, VT_BSTR, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nodeFromID
- # retrieve node from it's ID
- # BSTR arg0 --- idString [IN]
- def nodeFromID(arg0)
- ret = _invoke(56, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL load
- # load document from the specified XML source
- # VARIANT arg0 --- xmlSource [IN]
- def load(arg0)
- ret = _invoke(58, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID abort
- # abort an asynchronous download
- def abort()
- ret = _invoke(62, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL loadXML
- # load the document from a string
- # BSTR arg0 --- bstrXML [IN]
- def loadXML(arg0)
- ret = _invoke(63, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID save
- # save the document to a specified destination
- # VARIANT arg0 --- destination [IN]
- def save(arg0)
- ret = _invoke(64, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-#
-module IXMLDOMDocumentType
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = _getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = _getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = _getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = _getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = _getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = _getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = _getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = _getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = _getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = _getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = _getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = _getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = _getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = _getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = _getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = _getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = _getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = _getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = _getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = _getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = _getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = _getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR name
- # name of the document type (root of the tree)
- def name()
- ret = _getproperty(131, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap entities
- # a list of entities in the document
- def entities()
- ret = _getproperty(132, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap notations
- # a list of notations in the document
- def notations()
- ret = _getproperty(133, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = _setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = _setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = _setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = _setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = _invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = _invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = _invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = _invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = _invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = _invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = _invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = _invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = _invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = _invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-#
-module IXMLDOMElement
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = _getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = _getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = _getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = _getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = _getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = _getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = _getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = _getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = _getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = _getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = _getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = _getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = _getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = _getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = _getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = _getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = _getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = _getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = _getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = _getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = _getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = _getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR tagName
- # get the tagName of the element
- def tagName()
- ret = _getproperty(97, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = _setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = _setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = _setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = _setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = _invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = _invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = _invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = _invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = _invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = _invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = _invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = _invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = _invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = _invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT getAttribute
- # look up the string value of an attribute by name
- # BSTR arg0 --- name [IN]
- def getAttribute(arg0)
- ret = _invoke(99, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID setAttribute
- # set the string value of an attribute by name
- # BSTR arg0 --- name [IN]
- # VARIANT arg1 --- value [IN]
- def setAttribute(arg0, arg1)
- ret = _invoke(100, [arg0, arg1], [VT_BSTR, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID removeAttribute
- # remove an attribute by name
- # BSTR arg0 --- name [IN]
- def removeAttribute(arg0)
- ret = _invoke(101, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMAttribute getAttributeNode
- # look up the attribute node by name
- # BSTR arg0 --- name [IN]
- def getAttributeNode(arg0)
- ret = _invoke(102, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMAttribute setAttributeNode
- # set the specified attribute on the element
- # IXMLDOMAttribute arg0 --- DOMAttribute [IN]
- def setAttributeNode(arg0)
- ret = _invoke(103, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMAttribute removeAttributeNode
- # remove the specified attribute
- # IXMLDOMAttribute arg0 --- DOMAttribute [IN]
- def removeAttributeNode(arg0)
- ret = _invoke(104, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList getElementsByTagName
- # build a list of elements by name
- # BSTR arg0 --- tagName [IN]
- def getElementsByTagName(arg0)
- ret = _invoke(105, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID normalize
- # collapse all adjacent text nodes in sub-tree
- def normalize()
- ret = _invoke(106, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-#
-module IXMLDOMAttribute
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = _getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = _getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = _getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = _getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = _getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = _getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = _getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = _getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = _getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = _getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = _getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = _getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = _getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = _getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = _getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = _getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = _getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = _getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = _getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = _getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = _getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = _getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR name
- # get name of the attribute
- def name()
- ret = _getproperty(118, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT value
- # string value of the attribute
- def value()
- ret = _getproperty(120, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = _setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = _setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = _setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = _setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID value
- # string value of the attribute
- def value=(arg0)
- ret = _setproperty(120, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = _invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = _invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = _invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = _invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = _invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = _invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = _invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = _invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = _invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = _invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-#
-module IXMLDOMDocumentFragment
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = _getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = _getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = _getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = _getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = _getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = _getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = _getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = _getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = _getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = _getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = _getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = _getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = _getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = _getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = _getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = _getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = _getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = _getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = _getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = _getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = _getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = _getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = _setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = _setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = _setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = _setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = _invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = _invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = _invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = _invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = _invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = _invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = _invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = _invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = _invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = _invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-#
-module IXMLDOMText
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = _getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = _getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = _getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = _getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = _getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = _getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = _getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = _getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = _getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = _getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = _getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = _getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = _getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = _getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = _getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = _getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = _getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = _getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = _getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = _getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = _getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = _getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR data
- # value of the node
- def data()
- ret = _getproperty(109, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 length
- # number of characters in value
- def length()
- ret = _getproperty(110, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = _setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = _setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = _setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = _setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID data
- # value of the node
- def data=(arg0)
- ret = _setproperty(109, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = _invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = _invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = _invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = _invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = _invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = _invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = _invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = _invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = _invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = _invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR substringData
- # retrieve substring of value
- # I4 arg0 --- offset [IN]
- # I4 arg1 --- count [IN]
- def substringData(arg0, arg1)
- ret = _invoke(111, [arg0, arg1], [VT_I4, VT_I4])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID appendData
- # append string to value
- # BSTR arg0 --- data [IN]
- def appendData(arg0)
- ret = _invoke(112, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID insertData
- # insert string into value
- # I4 arg0 --- offset [IN]
- # BSTR arg1 --- data [IN]
- def insertData(arg0, arg1)
- ret = _invoke(113, [arg0, arg1], [VT_I4, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID deleteData
- # delete string within the value
- # I4 arg0 --- offset [IN]
- # I4 arg1 --- count [IN]
- def deleteData(arg0, arg1)
- ret = _invoke(114, [arg0, arg1], [VT_I4, VT_I4])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID replaceData
- # replace string within the value
- # I4 arg0 --- offset [IN]
- # I4 arg1 --- count [IN]
- # BSTR arg2 --- data [IN]
- def replaceData(arg0, arg1, arg2)
- ret = _invoke(115, [arg0, arg1, arg2], [VT_I4, VT_I4, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMText splitText
- # split the text node into two text nodes at the position specified
- # I4 arg0 --- offset [IN]
- def splitText(arg0)
- ret = _invoke(123, [arg0], [VT_I4])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-#
-module IXMLDOMCharacterData
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = _getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = _getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = _getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = _getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = _getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = _getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = _getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = _getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = _getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = _getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = _getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = _getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = _getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = _getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = _getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = _getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = _getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = _getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = _getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = _getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = _getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = _getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR data
- # value of the node
- def data()
- ret = _getproperty(109, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 length
- # number of characters in value
- def length()
- ret = _getproperty(110, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = _setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = _setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = _setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = _setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID data
- # value of the node
- def data=(arg0)
- ret = _setproperty(109, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = _invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = _invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = _invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = _invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = _invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = _invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = _invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = _invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = _invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = _invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR substringData
- # retrieve substring of value
- # I4 arg0 --- offset [IN]
- # I4 arg1 --- count [IN]
- def substringData(arg0, arg1)
- ret = _invoke(111, [arg0, arg1], [VT_I4, VT_I4])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID appendData
- # append string to value
- # BSTR arg0 --- data [IN]
- def appendData(arg0)
- ret = _invoke(112, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID insertData
- # insert string into value
- # I4 arg0 --- offset [IN]
- # BSTR arg1 --- data [IN]
- def insertData(arg0, arg1)
- ret = _invoke(113, [arg0, arg1], [VT_I4, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID deleteData
- # delete string within the value
- # I4 arg0 --- offset [IN]
- # I4 arg1 --- count [IN]
- def deleteData(arg0, arg1)
- ret = _invoke(114, [arg0, arg1], [VT_I4, VT_I4])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID replaceData
- # replace string within the value
- # I4 arg0 --- offset [IN]
- # I4 arg1 --- count [IN]
- # BSTR arg2 --- data [IN]
- def replaceData(arg0, arg1, arg2)
- ret = _invoke(115, [arg0, arg1, arg2], [VT_I4, VT_I4, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-#
-module IXMLDOMComment
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = _getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = _getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = _getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = _getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = _getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = _getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = _getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = _getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = _getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = _getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = _getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = _getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = _getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = _getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = _getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = _getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = _getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = _getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = _getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = _getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = _getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = _getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR data
- # value of the node
- def data()
- ret = _getproperty(109, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 length
- # number of characters in value
- def length()
- ret = _getproperty(110, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = _setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = _setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = _setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = _setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID data
- # value of the node
- def data=(arg0)
- ret = _setproperty(109, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = _invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = _invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = _invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = _invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = _invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = _invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = _invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = _invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = _invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = _invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR substringData
- # retrieve substring of value
- # I4 arg0 --- offset [IN]
- # I4 arg1 --- count [IN]
- def substringData(arg0, arg1)
- ret = _invoke(111, [arg0, arg1], [VT_I4, VT_I4])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID appendData
- # append string to value
- # BSTR arg0 --- data [IN]
- def appendData(arg0)
- ret = _invoke(112, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID insertData
- # insert string into value
- # I4 arg0 --- offset [IN]
- # BSTR arg1 --- data [IN]
- def insertData(arg0, arg1)
- ret = _invoke(113, [arg0, arg1], [VT_I4, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID deleteData
- # delete string within the value
- # I4 arg0 --- offset [IN]
- # I4 arg1 --- count [IN]
- def deleteData(arg0, arg1)
- ret = _invoke(114, [arg0, arg1], [VT_I4, VT_I4])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID replaceData
- # replace string within the value
- # I4 arg0 --- offset [IN]
- # I4 arg1 --- count [IN]
- # BSTR arg2 --- data [IN]
- def replaceData(arg0, arg1, arg2)
- ret = _invoke(115, [arg0, arg1, arg2], [VT_I4, VT_I4, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-#
-module IXMLDOMCDATASection
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = _getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = _getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = _getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = _getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = _getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = _getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = _getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = _getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = _getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = _getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = _getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = _getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = _getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = _getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = _getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = _getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = _getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = _getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = _getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = _getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = _getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = _getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR data
- # value of the node
- def data()
- ret = _getproperty(109, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 length
- # number of characters in value
- def length()
- ret = _getproperty(110, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = _setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = _setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = _setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = _setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID data
- # value of the node
- def data=(arg0)
- ret = _setproperty(109, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = _invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = _invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = _invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = _invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = _invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = _invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = _invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = _invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = _invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = _invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR substringData
- # retrieve substring of value
- # I4 arg0 --- offset [IN]
- # I4 arg1 --- count [IN]
- def substringData(arg0, arg1)
- ret = _invoke(111, [arg0, arg1], [VT_I4, VT_I4])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID appendData
- # append string to value
- # BSTR arg0 --- data [IN]
- def appendData(arg0)
- ret = _invoke(112, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID insertData
- # insert string into value
- # I4 arg0 --- offset [IN]
- # BSTR arg1 --- data [IN]
- def insertData(arg0, arg1)
- ret = _invoke(113, [arg0, arg1], [VT_I4, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID deleteData
- # delete string within the value
- # I4 arg0 --- offset [IN]
- # I4 arg1 --- count [IN]
- def deleteData(arg0, arg1)
- ret = _invoke(114, [arg0, arg1], [VT_I4, VT_I4])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID replaceData
- # replace string within the value
- # I4 arg0 --- offset [IN]
- # I4 arg1 --- count [IN]
- # BSTR arg2 --- data [IN]
- def replaceData(arg0, arg1, arg2)
- ret = _invoke(115, [arg0, arg1, arg2], [VT_I4, VT_I4, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMText splitText
- # split the text node into two text nodes at the position specified
- # I4 arg0 --- offset [IN]
- def splitText(arg0)
- ret = _invoke(123, [arg0], [VT_I4])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-#
-module IXMLDOMProcessingInstruction
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = _getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = _getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = _getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = _getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = _getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = _getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = _getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = _getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = _getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = _getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = _getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = _getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = _getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = _getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = _getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = _getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = _getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = _getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = _getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = _getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = _getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = _getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR target
- # the target
- def target()
- ret = _getproperty(127, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR data
- # the data
- def data()
- ret = _getproperty(128, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = _setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = _setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = _setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = _setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID data
- # the data
- def data=(arg0)
- ret = _setproperty(128, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = _invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = _invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = _invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = _invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = _invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = _invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = _invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = _invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = _invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = _invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-#
-module IXMLDOMEntityReference
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = _getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = _getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = _getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = _getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = _getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = _getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = _getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = _getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = _getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = _getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = _getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = _getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = _getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = _getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = _getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = _getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = _getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = _getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = _getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = _getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = _getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = _getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = _setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = _setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = _setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = _setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = _invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = _invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = _invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = _invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = _invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = _invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = _invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = _invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = _invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = _invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-# structure for reporting parser errors
-module IXMLDOMParseError
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # I4 errorCode
- # the error code
- def errorCode()
- ret = _getproperty(0, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR url
- # the URL of the XML document containing the error
- def url()
- ret = _getproperty(179, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR reason
- # the cause of the error
- def reason()
- ret = _getproperty(180, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR srcText
- # the data where the error occurred
- def srcText()
- ret = _getproperty(181, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 line
- # the line number in the XML document where the error occurred
- def line()
- ret = _getproperty(182, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 linepos
- # the character position in the line containing the error
- def linepos()
- ret = _getproperty(183, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 filepos
- # the absolute file position in the XML document containing the error
- def filepos()
- ret = _getproperty(184, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-#
-module IXMLDOMNotation
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = _getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = _getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = _getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = _getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = _getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = _getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = _getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = _getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = _getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = _getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = _getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = _getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = _getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = _getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = _getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = _getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = _getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = _getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = _getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = _getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = _getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = _getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT publicId
- # the public ID
- def publicId()
- ret = _getproperty(136, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT systemId
- # the system ID
- def systemId()
- ret = _getproperty(137, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = _setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = _setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = _setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = _setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = _invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = _invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = _invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = _invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = _invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = _invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = _invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = _invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = _invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = _invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-#
-module IXMLDOMEntity
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = _getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = _getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = _getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = _getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = _getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = _getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = _getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = _getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = _getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = _getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = _getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = _getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = _getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = _getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = _getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = _getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = _getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = _getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = _getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = _getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = _getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = _getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT publicId
- # the public ID
- def publicId()
- ret = _getproperty(140, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT systemId
- # the system ID
- def systemId()
- ret = _getproperty(141, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR notationName
- # the name of the notation
- def notationName()
- ret = _getproperty(142, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = _setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = _setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = _setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = _setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = _invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = _invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = _invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = _invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = _invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = _invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = _invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = _invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = _invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = _invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-# XTL runtime object
-module IXTLRuntime
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = _getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = _getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = _getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = _getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = _getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = _getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = _getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = _getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = _getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = _getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = _getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = _getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = _getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = _getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = _getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = _getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = _getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = _getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = _getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = _getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = _getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = _getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = _setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = _setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = _setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = _setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = _invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = _invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = _invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = _invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = _invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = _invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = _invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = _invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = _invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = _invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 uniqueID
- # IXMLDOMNode arg0 --- pNode [IN]
- def uniqueID(arg0)
- ret = _invoke(187, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 depth
- # IXMLDOMNode arg0 --- pNode [IN]
- def depth(arg0)
- ret = _invoke(188, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 childNumber
- # IXMLDOMNode arg0 --- pNode [IN]
- def childNumber(arg0)
- ret = _invoke(189, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 ancestorChildNumber
- # BSTR arg0 --- bstrNodeName [IN]
- # IXMLDOMNode arg1 --- pNode [IN]
- def ancestorChildNumber(arg0, arg1)
- ret = _invoke(190, [arg0, arg1], [VT_BSTR, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 absoluteChildNumber
- # IXMLDOMNode arg0 --- pNode [IN]
- def absoluteChildNumber(arg0)
- ret = _invoke(191, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR formatIndex
- # I4 arg0 --- lIndex [IN]
- # BSTR arg1 --- bstrFormat [IN]
- def formatIndex(arg0, arg1)
- ret = _invoke(192, [arg0, arg1], [VT_I4, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR formatNumber
- # R8 arg0 --- dblNumber [IN]
- # BSTR arg1 --- bstrFormat [IN]
- def formatNumber(arg0, arg1)
- ret = _invoke(193, [arg0, arg1], [VT_R8, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR formatDate
- # VARIANT arg0 --- varDate [IN]
- # BSTR arg1 --- bstrFormat [IN]
- # VARIANT arg2 --- varDestLocale [IN]
- def formatDate(arg0, arg1, arg2=nil)
- ret = _invoke(194, [arg0, arg1, arg2], [VT_VARIANT, VT_BSTR, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR formatTime
- # VARIANT arg0 --- varTime [IN]
- # BSTR arg1 --- bstrFormat [IN]
- # VARIANT arg2 --- varDestLocale [IN]
- def formatTime(arg0, arg1, arg2=nil)
- ret = _invoke(195, [arg0, arg1, arg2], [VT_VARIANT, VT_BSTR, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-# W3C-DOM XML Document
-class Microsoft_XMLDOM_1_0 # DOMDocument
- include WIN32OLE::VARIANT
- attr_reader :lastargs
- attr_reader :dispatch
- attr_reader :clsid
- attr_reader :progid
-
- def initialize(obj = nil)
- @clsid = "{2933BF90-7B36-11D2-B20E-00C04F983E60}"
- @progid = "Microsoft.XMLDOM.1.0"
- if obj.nil?
- @dispatch = WIN32OLE.new(@progid)
- else
- @dispatch = obj
- end
- end
-
- def method_missing(cmd, *arg)
- @dispatch.method_missing(cmd, *arg)
- end
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = @dispatch._getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = @dispatch._getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = @dispatch._getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = @dispatch._getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = @dispatch._getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = @dispatch._getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = @dispatch._getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = @dispatch._getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = @dispatch._getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = @dispatch._getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = @dispatch._getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = @dispatch._getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = @dispatch._getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = @dispatch._getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = @dispatch._getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = @dispatch._getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = @dispatch._getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = @dispatch._getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = @dispatch._getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = @dispatch._getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = @dispatch._getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = @dispatch._getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocumentType doctype
- # node corresponding to the DOCTYPE
- def doctype()
- ret = @dispatch._getproperty(38, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMImplementation implementation
- # info on this DOM implementation
- def implementation()
- ret = @dispatch._getproperty(39, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMElement documentElement
- # the root of the tree
- def documentElement()
- ret = @dispatch._getproperty(40, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 readyState
- # get the state of the XML document
- def readyState()
- ret = @dispatch._getproperty(-525, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMParseError parseError
- # get the last parser error
- def parseError()
- ret = @dispatch._getproperty(59, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR url
- # get the URL for the loaded XML document
- def url()
- ret = @dispatch._getproperty(60, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL async
- # flag for asynchronous download
- def async()
- ret = @dispatch._getproperty(61, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL validateOnParse
- # indicates whether the parser performs validation
- def validateOnParse()
- ret = @dispatch._getproperty(65, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL resolveExternals
- # indicates whether the parser resolves references to external DTD/Entities/Schema
- def resolveExternals()
- ret = @dispatch._getproperty(66, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL preserveWhiteSpace
- # indicates whether the parser preserves whitespace
- def preserveWhiteSpace()
- ret = @dispatch._getproperty(67, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = @dispatch._setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = @dispatch._setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = @dispatch._setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = @dispatch._setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID async
- # flag for asynchronous download
- def async=(arg0)
- ret = @dispatch._setproperty(61, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID validateOnParse
- # indicates whether the parser performs validation
- def validateOnParse=(arg0)
- ret = @dispatch._setproperty(65, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID resolveExternals
- # indicates whether the parser resolves references to external DTD/Entities/Schema
- def resolveExternals=(arg0)
- ret = @dispatch._setproperty(66, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID preserveWhiteSpace
- # indicates whether the parser preserves whitespace
- def preserveWhiteSpace=(arg0)
- ret = @dispatch._setproperty(67, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID onreadystatechange
- # register a readystatechange event handler
- def onreadystatechange=(arg0)
- ret = @dispatch._setproperty(68, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID ondataavailable
- # register an ondataavailable event handler
- def ondataavailable=(arg0)
- ret = @dispatch._setproperty(69, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID ontransformnode
- # register an ontransformnode event handler
- def ontransformnode=(arg0)
- ret = @dispatch._setproperty(70, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = @dispatch._invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = @dispatch._invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = @dispatch._invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = @dispatch._invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = @dispatch._invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = @dispatch._invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = @dispatch._invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = @dispatch._invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = @dispatch._invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = @dispatch._invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMElement createElement
- # create an Element node
- # BSTR arg0 --- tagName [IN]
- def createElement(arg0)
- ret = @dispatch._invoke(41, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocumentFragment createDocumentFragment
- # create a DocumentFragment node
- def createDocumentFragment()
- ret = @dispatch._invoke(42, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMText createTextNode
- # create a text node
- # BSTR arg0 --- data [IN]
- def createTextNode(arg0)
- ret = @dispatch._invoke(43, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMComment createComment
- # create a comment node
- # BSTR arg0 --- data [IN]
- def createComment(arg0)
- ret = @dispatch._invoke(44, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMCDATASection createCDATASection
- # create a CDATA section node
- # BSTR arg0 --- data [IN]
- def createCDATASection(arg0)
- ret = @dispatch._invoke(45, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMProcessingInstruction createProcessingInstruction
- # create a processing instruction node
- # BSTR arg0 --- target [IN]
- # BSTR arg1 --- data [IN]
- def createProcessingInstruction(arg0, arg1)
- ret = @dispatch._invoke(46, [arg0, arg1], [VT_BSTR, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMAttribute createAttribute
- # create an attribute node
- # BSTR arg0 --- name [IN]
- def createAttribute(arg0)
- ret = @dispatch._invoke(47, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMEntityReference createEntityReference
- # create an entity reference node
- # BSTR arg0 --- name [IN]
- def createEntityReference(arg0)
- ret = @dispatch._invoke(49, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList getElementsByTagName
- # build a list of elements by name
- # BSTR arg0 --- tagName [IN]
- def getElementsByTagName(arg0)
- ret = @dispatch._invoke(50, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode createNode
- # create a node of the specified node type and name
- # VARIANT arg0 --- type [IN]
- # BSTR arg1 --- name [IN]
- # BSTR arg2 --- namespaceURI [IN]
- def createNode(arg0, arg1, arg2)
- ret = @dispatch._invoke(54, [arg0, arg1, arg2], [VT_VARIANT, VT_BSTR, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nodeFromID
- # retrieve node from it's ID
- # BSTR arg0 --- idString [IN]
- def nodeFromID(arg0)
- ret = @dispatch._invoke(56, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL load
- # load document from the specified XML source
- # VARIANT arg0 --- xmlSource [IN]
- def load(arg0)
- ret = @dispatch._invoke(58, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID abort
- # abort an asynchronous download
- def abort()
- ret = @dispatch._invoke(62, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL loadXML
- # load the document from a string
- # BSTR arg0 --- bstrXML [IN]
- def loadXML(arg0)
- ret = @dispatch._invoke(63, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID save
- # save the document to a specified destination
- # VARIANT arg0 --- destination [IN]
- def save(arg0)
- ret = @dispatch._invoke(64, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # HRESULT ondataavailable EVENT in XMLDOMDocumentEvents
- def ondataavailable()
- ret = @dispatch._invoke(198, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # HRESULT onreadystatechange EVENT in XMLDOMDocumentEvents
- def onreadystatechange()
- ret = @dispatch._invoke(-609, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-# W3C-DOM XML Document (Apartment)
-class Microsoft_FreeThreadedXMLDOM_1_0 # DOMFreeThreadedDocument
- include WIN32OLE::VARIANT
- attr_reader :lastargs
- attr_reader :dispatch
- attr_reader :clsid
- attr_reader :progid
-
- def initialize(obj = nil)
- @clsid = "{2933BF91-7B36-11D2-B20E-00C04F983E60}"
- @progid = "Microsoft.FreeThreadedXMLDOM.1.0"
- if obj.nil?
- @dispatch = WIN32OLE.new(@progid)
- else
- @dispatch = obj
- end
- end
-
- def method_missing(cmd, *arg)
- @dispatch.method_missing(cmd, *arg)
- end
-
- # BSTR nodeName
- # name of the node
- def nodeName()
- ret = @dispatch._getproperty(2, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeValue
- # value stored in the node
- def nodeValue()
- ret = @dispatch._getproperty(3, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DOMNodeType nodeType
- # the node's type
- def nodeType()
- ret = @dispatch._getproperty(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode parentNode
- # parent of the node
- def parentNode()
- ret = @dispatch._getproperty(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList childNodes
- # the collection of the node's children
- def childNodes()
- ret = @dispatch._getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode firstChild
- # first child of the node
- def firstChild()
- ret = @dispatch._getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode lastChild
- # first child of the node
- def lastChild()
- ret = @dispatch._getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode previousSibling
- # left sibling of the node
- def previousSibling()
- ret = @dispatch._getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nextSibling
- # right sibling of the node
- def nextSibling()
- ret = @dispatch._getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNamedNodeMap attributes
- # the collection of the node's attributes
- def attributes()
- ret = @dispatch._getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocument ownerDocument
- # document that contains the node
- def ownerDocument()
- ret = @dispatch._getproperty(18, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR nodeTypeString
- # the type of node in string form
- def nodeTypeString()
- ret = @dispatch._getproperty(21, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR text
- # text content of the node and subtree
- def text()
- ret = @dispatch._getproperty(24, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL specified
- # indicates whether node is a default value
- def specified()
- ret = @dispatch._getproperty(22, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode definition
- # pointer to the definition of the node in the DTD or schema
- def definition()
- ret = @dispatch._getproperty(23, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue()
- ret = @dispatch._getproperty(25, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT dataType
- # the data type of the node
- def dataType()
- ret = @dispatch._getproperty(26, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR xml
- # return the XML source for the node and each of its descendants
- def xml()
- ret = @dispatch._getproperty(27, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL parsed
- # has sub-tree been completely parsed
- def parsed()
- ret = @dispatch._getproperty(31, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR namespaceURI
- # the URI for the namespace applying to the node
- def namespaceURI()
- ret = @dispatch._getproperty(32, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR prefix
- # the prefix for the namespace applying to the node
- def prefix()
- ret = @dispatch._getproperty(33, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR baseName
- # the base name of the node (nodename with the prefix stripped off)
- def baseName()
- ret = @dispatch._getproperty(34, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocumentType doctype
- # node corresponding to the DOCTYPE
- def doctype()
- ret = @dispatch._getproperty(38, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMImplementation implementation
- # info on this DOM implementation
- def implementation()
- ret = @dispatch._getproperty(39, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMElement documentElement
- # the root of the tree
- def documentElement()
- ret = @dispatch._getproperty(40, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 readyState
- # get the state of the XML document
- def readyState()
- ret = @dispatch._getproperty(-525, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMParseError parseError
- # get the last parser error
- def parseError()
- ret = @dispatch._getproperty(59, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR url
- # get the URL for the loaded XML document
- def url()
- ret = @dispatch._getproperty(60, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL async
- # flag for asynchronous download
- def async()
- ret = @dispatch._getproperty(61, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL validateOnParse
- # indicates whether the parser performs validation
- def validateOnParse()
- ret = @dispatch._getproperty(65, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL resolveExternals
- # indicates whether the parser resolves references to external DTD/Entities/Schema
- def resolveExternals()
- ret = @dispatch._getproperty(66, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL preserveWhiteSpace
- # indicates whether the parser preserves whitespace
- def preserveWhiteSpace()
- ret = @dispatch._getproperty(67, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeValue
- # value stored in the node
- def nodeValue=(arg0)
- ret = @dispatch._setproperty(3, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID text
- # text content of the node and subtree
- def text=(arg0)
- ret = @dispatch._setproperty(24, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID nodeTypedValue
- # get the strongly typed value of the node
- def nodeTypedValue=(arg0)
- ret = @dispatch._setproperty(25, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID dataType
- # the data type of the node
- def dataType=(arg0)
- ret = @dispatch._setproperty(26, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID async
- # flag for asynchronous download
- def async=(arg0)
- ret = @dispatch._setproperty(61, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID validateOnParse
- # indicates whether the parser performs validation
- def validateOnParse=(arg0)
- ret = @dispatch._setproperty(65, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID resolveExternals
- # indicates whether the parser resolves references to external DTD/Entities/Schema
- def resolveExternals=(arg0)
- ret = @dispatch._setproperty(66, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID preserveWhiteSpace
- # indicates whether the parser preserves whitespace
- def preserveWhiteSpace=(arg0)
- ret = @dispatch._setproperty(67, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID onreadystatechange
- # register a readystatechange event handler
- def onreadystatechange=(arg0)
- ret = @dispatch._setproperty(68, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID ondataavailable
- # register an ondataavailable event handler
- def ondataavailable=(arg0)
- ret = @dispatch._setproperty(69, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID ontransformnode
- # register an ontransformnode event handler
- def ontransformnode=(arg0)
- ret = @dispatch._setproperty(70, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode insertBefore
- # insert a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # VARIANT arg1 --- refChild [IN]
- def insertBefore(arg0, arg1)
- ret = @dispatch._invoke(13, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode replaceChild
- # replace a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- # IXMLDOMNode arg1 --- oldChild [IN]
- def replaceChild(arg0, arg1)
- ret = @dispatch._invoke(14, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode removeChild
- # remove a child node
- # IXMLDOMNode arg0 --- childNode [IN]
- def removeChild(arg0)
- ret = @dispatch._invoke(15, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode appendChild
- # append a child node
- # IXMLDOMNode arg0 --- newChild [IN]
- def appendChild(arg0)
- ret = @dispatch._invoke(16, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL hasChildNodes
- def hasChildNodes()
- ret = @dispatch._invoke(17, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode cloneNode
- # BOOL arg0 --- deep [IN]
- def cloneNode(arg0)
- ret = @dispatch._invoke(19, [arg0], [VT_BOOL])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR transformNode
- # apply the stylesheet to the subtree
- # IXMLDOMNode arg0 --- stylesheet [IN]
- def transformNode(arg0)
- ret = @dispatch._invoke(28, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList selectNodes
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectNodes(arg0)
- ret = @dispatch._invoke(29, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode selectSingleNode
- # execute query on the subtree
- # BSTR arg0 --- queryString [IN]
- def selectSingleNode(arg0)
- ret = @dispatch._invoke(30, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID transformNodeToObject
- # apply the stylesheet to the subtree, returning the result through a document or a stream
- # IXMLDOMNode arg0 --- stylesheet [IN]
- # VARIANT arg1 --- outputObject [IN]
- def transformNodeToObject(arg0, arg1)
- ret = @dispatch._invoke(35, [arg0, arg1], [VT_BYREF|VT_DISPATCH, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMElement createElement
- # create an Element node
- # BSTR arg0 --- tagName [IN]
- def createElement(arg0)
- ret = @dispatch._invoke(41, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMDocumentFragment createDocumentFragment
- # create a DocumentFragment node
- def createDocumentFragment()
- ret = @dispatch._invoke(42, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMText createTextNode
- # create a text node
- # BSTR arg0 --- data [IN]
- def createTextNode(arg0)
- ret = @dispatch._invoke(43, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMComment createComment
- # create a comment node
- # BSTR arg0 --- data [IN]
- def createComment(arg0)
- ret = @dispatch._invoke(44, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMCDATASection createCDATASection
- # create a CDATA section node
- # BSTR arg0 --- data [IN]
- def createCDATASection(arg0)
- ret = @dispatch._invoke(45, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMProcessingInstruction createProcessingInstruction
- # create a processing instruction node
- # BSTR arg0 --- target [IN]
- # BSTR arg1 --- data [IN]
- def createProcessingInstruction(arg0, arg1)
- ret = @dispatch._invoke(46, [arg0, arg1], [VT_BSTR, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMAttribute createAttribute
- # create an attribute node
- # BSTR arg0 --- name [IN]
- def createAttribute(arg0)
- ret = @dispatch._invoke(47, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMEntityReference createEntityReference
- # create an entity reference node
- # BSTR arg0 --- name [IN]
- def createEntityReference(arg0)
- ret = @dispatch._invoke(49, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNodeList getElementsByTagName
- # build a list of elements by name
- # BSTR arg0 --- tagName [IN]
- def getElementsByTagName(arg0)
- ret = @dispatch._invoke(50, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode createNode
- # create a node of the specified node type and name
- # VARIANT arg0 --- type [IN]
- # BSTR arg1 --- name [IN]
- # BSTR arg2 --- namespaceURI [IN]
- def createNode(arg0, arg1, arg2)
- ret = @dispatch._invoke(54, [arg0, arg1, arg2], [VT_VARIANT, VT_BSTR, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # IXMLDOMNode nodeFromID
- # retrieve node from it's ID
- # BSTR arg0 --- idString [IN]
- def nodeFromID(arg0)
- ret = @dispatch._invoke(56, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL load
- # load document from the specified XML source
- # VARIANT arg0 --- xmlSource [IN]
- def load(arg0)
- ret = @dispatch._invoke(58, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID abort
- # abort an asynchronous download
- def abort()
- ret = @dispatch._invoke(62, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BOOL loadXML
- # load the document from a string
- # BSTR arg0 --- bstrXML [IN]
- def loadXML(arg0)
- ret = @dispatch._invoke(63, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID save
- # save the document to a specified destination
- # VARIANT arg0 --- destination [IN]
- def save(arg0)
- ret = @dispatch._invoke(64, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # HRESULT ondataavailable EVENT in XMLDOMDocumentEvents
- def ondataavailable()
- ret = @dispatch._invoke(198, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # HRESULT onreadystatechange EVENT in XMLDOMDocumentEvents
- def onreadystatechange()
- ret = @dispatch._invoke(-609, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-# IXMLHttpRequest Interface
-module IXMLHttpRequest
- include WIN32OLE::VARIANT
- attr_reader :lastargs
-
- # I4 status
- # Get HTTP status code
- def status()
- ret = _getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR statusText
- # Get HTTP status text
- def statusText()
- ret = _getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DISPATCH responseXML
- # Get response body
- def responseXML()
- ret = _getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR responseText
- # Get response body
- def responseText()
- ret = _getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT responseBody
- # Get response body
- def responseBody()
- ret = _getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT responseStream
- # Get response body
- def responseStream()
- ret = _getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 readyState
- # Get ready state
- def readyState()
- ret = _getproperty(13, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID onreadystatechange
- # Register a complete event handler
- def onreadystatechange=(arg0)
- ret = _setproperty(14, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID open
- # Open HTTP connection
- # BSTR arg0 --- bstrMethod [IN]
- # BSTR arg1 --- bstrUrl [IN]
- # VARIANT arg2 --- varAsync [IN]
- # VARIANT arg3 --- bstrUser [IN]
- # VARIANT arg4 --- bstrPassword [IN]
- def open(arg0, arg1, arg2=nil, arg3=nil, arg4=nil)
- ret = _invoke(1, [arg0, arg1, arg2, arg3, arg4], [VT_BSTR, VT_BSTR, VT_VARIANT, VT_VARIANT, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID setRequestHeader
- # Add HTTP request header
- # BSTR arg0 --- bstrHeader [IN]
- # BSTR arg1 --- bstrValue [IN]
- def setRequestHeader(arg0, arg1)
- ret = _invoke(2, [arg0, arg1], [VT_BSTR, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR getResponseHeader
- # Get HTTP response header
- # BSTR arg0 --- bstrHeader [IN]
- def getResponseHeader(arg0)
- ret = _invoke(3, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR getAllResponseHeaders
- # Get all HTTP response headers
- def getAllResponseHeaders()
- ret = _invoke(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID send
- # Send HTTP request
- # VARIANT arg0 --- varBody [IN]
- def send(arg0=nil)
- ret = _invoke(5, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID abort
- # Abort HTTP request
- def abort()
- ret = _invoke(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-# XML HTTP Request class.
-class Microsoft_XMLHTTP_1 # XMLHTTPRequest
- include WIN32OLE::VARIANT
- attr_reader :lastargs
- attr_reader :dispatch
- attr_reader :clsid
- attr_reader :progid
-
- def initialize(obj = nil)
- @clsid = "{ED8C108E-4349-11D2-91A4-00C04F7969E8}"
- @progid = "Microsoft.XMLHTTP.1"
- if obj.nil?
- @dispatch = WIN32OLE.new(@progid)
- else
- @dispatch = obj
- end
- end
-
- def method_missing(cmd, *arg)
- @dispatch.method_missing(cmd, *arg)
- end
-
- # I4 status
- # Get HTTP status code
- def status()
- ret = @dispatch._getproperty(7, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR statusText
- # Get HTTP status text
- def statusText()
- ret = @dispatch._getproperty(8, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # DISPATCH responseXML
- # Get response body
- def responseXML()
- ret = @dispatch._getproperty(9, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR responseText
- # Get response body
- def responseText()
- ret = @dispatch._getproperty(10, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT responseBody
- # Get response body
- def responseBody()
- ret = @dispatch._getproperty(11, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VARIANT responseStream
- # Get response body
- def responseStream()
- ret = @dispatch._getproperty(12, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 readyState
- # Get ready state
- def readyState()
- ret = @dispatch._getproperty(13, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID onreadystatechange
- # Register a complete event handler
- def onreadystatechange=(arg0)
- ret = @dispatch._setproperty(14, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID open
- # Open HTTP connection
- # BSTR arg0 --- bstrMethod [IN]
- # BSTR arg1 --- bstrUrl [IN]
- # VARIANT arg2 --- varAsync [IN]
- # VARIANT arg3 --- bstrUser [IN]
- # VARIANT arg4 --- bstrPassword [IN]
- def open(arg0, arg1, arg2=nil, arg3=nil, arg4=nil)
- ret = @dispatch._invoke(1, [arg0, arg1, arg2, arg3, arg4], [VT_BSTR, VT_BSTR, VT_VARIANT, VT_VARIANT, VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID setRequestHeader
- # Add HTTP request header
- # BSTR arg0 --- bstrHeader [IN]
- # BSTR arg1 --- bstrValue [IN]
- def setRequestHeader(arg0, arg1)
- ret = @dispatch._invoke(2, [arg0, arg1], [VT_BSTR, VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR getResponseHeader
- # Get HTTP response header
- # BSTR arg0 --- bstrHeader [IN]
- def getResponseHeader(arg0)
- ret = @dispatch._invoke(3, [arg0], [VT_BSTR])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # BSTR getAllResponseHeaders
- # Get all HTTP response headers
- def getAllResponseHeaders()
- ret = @dispatch._invoke(4, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID send
- # Send HTTP request
- # VARIANT arg0 --- varBody [IN]
- def send(arg0=nil)
- ret = @dispatch._invoke(5, [arg0], [VT_VARIANT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID abort
- # Abort HTTP request
- def abort()
- ret = @dispatch._invoke(6, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-# XML Data Source Object
-class Microsoft_XMLDSO_1_0 # XMLDSOControl
- include WIN32OLE::VARIANT
- attr_reader :lastargs
- attr_reader :dispatch
- attr_reader :clsid
- attr_reader :progid
-
- def initialize(obj = nil)
- @clsid = "{550DDA30-0541-11D2-9CA9-0060B0EC3D39}"
- @progid = "Microsoft.XMLDSO.1.0"
- if obj.nil?
- @dispatch = WIN32OLE.new(@progid)
- else
- @dispatch = obj
- end
- end
-
- def method_missing(cmd, *arg)
- @dispatch.method_missing(cmd, *arg)
- end
-
- # IXMLDOMDocument XMLDocument
- def XMLDocument()
- ret = @dispatch._getproperty(65537, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 JavaDSOCompatible
- def JavaDSOCompatible()
- ret = @dispatch._getproperty(65538, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # I4 readyState
- def readyState()
- ret = @dispatch._getproperty(-525, [], [])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID XMLDocument
- def XMLDocument=(arg0)
- ret = @dispatch._setproperty(65537, [arg0], [VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # VOID JavaDSOCompatible
- def JavaDSOCompatible=(arg0)
- ret = @dispatch._setproperty(65538, [arg0], [VT_I4])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
-
-# Constants that define types for IXMLElement.
-module OLEtagXMLEMEM_TYPE
- include WIN32OLE::VARIANT
- attr_reader :lastargs
- XMLELEMTYPE_ELEMENT = 0
- XMLELEMTYPE_TEXT = 1
- XMLELEMTYPE_COMMENT = 2
- XMLELEMTYPE_DOCUMENT = 3
- XMLELEMTYPE_DTD = 4
- XMLELEMTYPE_PI = 5
- XMLELEMTYPE_OTHER = 6
-end
-
-# XMLDocument extends IXML Document. It is obsolete. You should use DOMDocument. This object should not be confused with the XMLDocument property on the XML data island.
-class Msxml # XMLDocument
- include WIN32OLE::VARIANT
- attr_reader :lastargs
- attr_reader :dispatch
- attr_reader :clsid
- attr_reader :progid
-
- def initialize(obj = nil)
- @clsid = "{CFC399AF-D876-11D0-9C10-00C04FC99C8E}"
- @progid = "Msxml"
- if obj.nil?
- @dispatch = WIN32OLE.new(@progid)
- else
- @dispatch = obj
- end
- end
-
- def method_missing(cmd, *arg)
- @dispatch.method_missing(cmd, *arg)
- end
-
- # HRESULT url
- # set URL to load an XML document from the URL.
- # BSTR arg0 --- p [IN]
- def url=(arg0)
- ret = @dispatch._setproperty(65641, [arg0], [VT_BSTR, VT_HRESULT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # HRESULT charset
- # get encoding.
- # BSTR arg0 --- p [IN]
- def charset=(arg0)
- ret = @dispatch._setproperty(65645, [arg0], [VT_BSTR, VT_HRESULT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # HRESULT async
- # get asynchronous loading flag.
- # BOOL arg0 --- pf [IN]
- def async=(arg0)
- ret = @dispatch._setproperty(65649, [arg0], [VT_BOOL, VT_HRESULT])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-
- # HRESULT root
- # get root IXMLElement of the XML document.
- # IXMLElement2,IXMLElement2 arg0 --- p [OUT]
- def root
- OLEProperty.new(@dispatch, 65637, [VT_BYREF|VT_BYREF|VT_DISPATCH], [VT_BYREF|VT_BYREF|VT_DISPATCH, VT_HRESULT])
- end
-
- # HRESULT url
- # set URL to load an XML document from the URL.
- # BSTR arg0 --- p [OUT]
- def url
- OLEProperty.new(@dispatch, 65641, [VT_BYREF|VT_BSTR], [VT_BYREF|VT_BSTR, VT_HRESULT])
- end
-
- # HRESULT readyState
- # get ready state.
- # I4 arg0 --- pl [OUT]
- def readyState
- OLEProperty.new(@dispatch, 65643, [VT_BYREF|VT_I4], [VT_BYREF|VT_I4, VT_HRESULT])
- end
-
- # HRESULT charset
- # get encoding.
- # BSTR arg0 --- p [OUT]
- def charset
- OLEProperty.new(@dispatch, 65645, [VT_BYREF|VT_BSTR], [VT_BYREF|VT_BSTR, VT_HRESULT])
- end
-
- # HRESULT version
- # get XML version number.
- # BSTR arg0 --- p [OUT]
- def version
- OLEProperty.new(@dispatch, 65646, [VT_BYREF|VT_BSTR], [VT_BYREF|VT_BSTR, VT_HRESULT])
- end
-
- # HRESULT doctype
- # get document type.
- # BSTR arg0 --- p [OUT]
- def doctype
- OLEProperty.new(@dispatch, 65647, [VT_BYREF|VT_BSTR], [VT_BYREF|VT_BSTR, VT_HRESULT])
- end
-
- # HRESULT async
- # get asynchronous loading flag.
- # BOOL arg0 --- pf [OUT]
- def async
- OLEProperty.new(@dispatch, 65649, [VT_BYREF|VT_BOOL], [VT_BYREF|VT_BOOL, VT_HRESULT])
- end
-
- # HRESULT createElement
- # create different types of IXMLElements.
- # VARIANT arg0 --- vType [IN]
- # VARIANT arg1 --- var1 [IN]
- # IXMLElement2,IXMLElement2 arg2 --- ppElem [OUT]
- def createElement(arg0, arg1=nil, arg2=nil)
- ret = @dispatch._invoke(65644, [arg0, arg1, arg2], [VT_VARIANT, VT_VARIANT, VT_BYREF|VT_BYREF|VT_DISPATCH])
- @lastargs = WIN32OLE::ARGV
- ret
- end
-end
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 5ad6a80eb9..e0342d1e9d 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -27,7 +27,7 @@
const IID IID_IMultiLanguage2 = {0xDCCFC164, 0x2B38, 0x11d2, {0xB7, 0xEC, 0x00, 0xC0, 0x4F, 0x8F, 0x5D, 0x9A}};
#endif
-#define WIN32OLE_VERSION "1.8.8"
+#define WIN32OLE_VERSION "1.8.10"
typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
@@ -454,12 +454,12 @@ vtdate2rbtime(double date)
double sec;
VariantTimeToSystemTime(date, &st);
v = rb_funcall(rb_cTime, rb_intern("new"), 6,
- RB_INT2FIX(st.wYear),
- RB_INT2FIX(st.wMonth),
- RB_INT2FIX(st.wDay),
- RB_INT2FIX(st.wHour),
- RB_INT2FIX(st.wMinute),
- RB_INT2FIX(st.wSecond));
+ RB_INT2FIX(st.wYear),
+ RB_INT2FIX(st.wMonth),
+ RB_INT2FIX(st.wDay),
+ RB_INT2FIX(st.wHour),
+ RB_INT2FIX(st.wMinute),
+ RB_INT2FIX(st.wSecond));
st.wYear = RB_FIX2INT(rb_funcall(v, rb_intern("year"), 0));
st.wMonth = RB_FIX2INT(rb_funcall(v, rb_intern("month"), 0));
st.wDay = RB_FIX2INT(rb_funcall(v, rb_intern("mday"), 0));
@@ -568,16 +568,16 @@ load_conv_function51932(void)
void *p;
if (!pIMultiLanguage) {
#if defined(HAVE_TYPE_IMULTILANGUAGE2)
- hr = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER,
- &IID_IMultiLanguage2, &p);
+ hr = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER,
+ &IID_IMultiLanguage2, &p);
#elif defined(HAVE_TYPE_IMULTILANGUAGE)
- hr = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER,
- &IID_IMultiLanguage, &p);
+ hr = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER,
+ &IID_IMultiLanguage, &p);
#endif
- if (FAILED(hr)) {
- failed_load_conv51932();
- }
- pIMultiLanguage = p;
+ if (FAILED(hr)) {
+ failed_load_conv51932();
+ }
+ pIMultiLanguage = p;
}
}
#define need_conv_function51932() (load_conv_function51932(), 1)
@@ -624,7 +624,7 @@ ole_init_cp(void)
rb_encoding *encdef;
encdef = rb_default_internal_encoding();
if (!encdef) {
- encdef = rb_default_external_encoding();
+ encdef = rb_default_external_encoding();
}
cp = ole_encoding2cp(encdef);
set_ole_codepage(cp);
@@ -650,38 +650,38 @@ ole_cp2encoding(UINT cp)
int idx;
if (!code_page_installed(cp)) {
- switch(cp) {
- case CP_ACP:
- cp = GetACP();
- break;
- case CP_OEMCP:
- cp = GetOEMCP();
- break;
- case CP_MACCP:
- case CP_THREAD_ACP:
- if (!pGetCPInfoEx) {
- pGetCPInfoEx = (BOOL (*)(UINT, DWORD, struct myCPINFOEX *))
- GetProcAddress(GetModuleHandle("kernel32"), "GetCPInfoEx");
- if (!pGetCPInfoEx) {
- pGetCPInfoEx = (void*)-1;
- }
- }
- buf = ALLOCA_N(struct myCPINFOEX, 1);
- ZeroMemory(buf, sizeof(struct myCPINFOEX));
- if (pGetCPInfoEx == (void*)-1 || !pGetCPInfoEx(cp, 0, buf)) {
- rb_raise(eWIN32OLERuntimeError, "cannot map codepage to encoding.");
- break; /* never reach here */
- }
- cp = buf->CodePage;
- break;
- case CP_SYMBOL:
- case CP_UTF7:
- case CP_UTF8:
- break;
- case 51932:
- load_conv_function51932();
- break;
- default:
+ switch(cp) {
+ case CP_ACP:
+ cp = GetACP();
+ break;
+ case CP_OEMCP:
+ cp = GetOEMCP();
+ break;
+ case CP_MACCP:
+ case CP_THREAD_ACP:
+ if (!pGetCPInfoEx) {
+ pGetCPInfoEx = (BOOL (*)(UINT, DWORD, struct myCPINFOEX *))
+ GetProcAddress(GetModuleHandle("kernel32"), "GetCPInfoEx");
+ if (!pGetCPInfoEx) {
+ pGetCPInfoEx = (void*)-1;
+ }
+ }
+ buf = ALLOCA_N(struct myCPINFOEX, 1);
+ ZeroMemory(buf, sizeof(struct myCPINFOEX));
+ if (pGetCPInfoEx == (void*)-1 || !pGetCPInfoEx(cp, 0, buf)) {
+ rb_raise(eWIN32OLERuntimeError, "cannot map codepage to encoding.");
+ break; /* never reach here */
+ }
+ cp = buf->CodePage;
+ break;
+ case CP_SYMBOL:
+ case CP_UTF7:
+ case CP_UTF8:
+ break;
+ case 51932:
+ load_conv_function51932();
+ break;
+ default:
rb_raise(eWIN32OLERuntimeError, "codepage should be WIN32OLE::CP_ACP, WIN32OLE::CP_OEMCP, WIN32OLE::CP_MACCP, WIN32OLE::CP_THREAD_ACP, WIN32OLE::CP_SYMBOL, WIN32OLE::CP_UTF7, WIN32OLE::CP_UTF8, or installed codepage.");
break;
}
@@ -690,7 +690,7 @@ ole_cp2encoding(UINT cp)
enc_name = rb_sprintf("CP%d", cp);
idx = rb_enc_find_index(enc_cstr = StringValueCStr(enc_name));
if (idx < 0)
- idx = rb_define_dummy_encoding(enc_cstr);
+ idx = rb_define_dummy_encoding(enc_cstr);
return rb_enc_from_index(idx);
}
@@ -700,14 +700,14 @@ ole_ml_wc2mb_conv0(LPWSTR pw, LPSTR pm, UINT *size)
{
DWORD dw = 0;
return pIMultiLanguage->lpVtbl->ConvertStringFromUnicode(pIMultiLanguage,
- &dw, cWIN32OLE_cp, pw, NULL, pm, size);
+ &dw, cWIN32OLE_cp, pw, NULL, pm, size);
}
#define ole_ml_wc2mb_conv(pw, pm, size, onfailure) do { \
- HRESULT hr = ole_ml_wc2mb_conv0(pw, pm, &size); \
- if (FAILED(hr)) { \
- onfailure; \
- ole_raise(hr, eWIN32OLERuntimeError, "fail to convert Unicode to CP%d", cWIN32OLE_cp); \
- } \
+ HRESULT hr = ole_ml_wc2mb_conv0(pw, pm, &size); \
+ if (FAILED(hr)) { \
+ onfailure; \
+ ole_raise(hr, eWIN32OLERuntimeError, "fail to convert Unicode to CP%d", cWIN32OLE_cp); \
+ } \
} while (0)
#endif
@@ -720,11 +720,11 @@ ole_wc2mb_alloc(LPWSTR pw, char *(alloc)(UINT size, void *arg), void *arg)
UINT size = 0;
if (conv_51932(cWIN32OLE_cp)) {
#ifndef pIMultiLanguage
- ole_ml_wc2mb_conv(pw, NULL, size, {});
- pm = alloc(size, arg);
- if (size) ole_ml_wc2mb_conv(pw, pm, size, xfree(pm));
- pm[size] = '\0';
- return pm;
+ ole_ml_wc2mb_conv(pw, NULL, size, {});
+ pm = alloc(size, arg);
+ if (size) ole_ml_wc2mb_conv(pw, pm, size, xfree(pm));
+ pm[size] = '\0';
+ return pm;
#endif
}
size = ole_wc2mb_conv(pw, NULL, 0);
@@ -816,8 +816,8 @@ ole_initialize(void)
HRESULT hr;
if(!g_uninitialize_hooked) {
- rb_add_event_hook(ole_uninitialize_hook, RUBY_EVENT_THREAD_END, Qnil);
- g_uninitialize_hooked = TRUE;
+ rb_add_event_hook(ole_uninitialize_hook, RUBY_EVENT_THREAD_END, Qnil);
+ g_uninitialize_hooked = TRUE;
}
if(g_ole_initialized == FALSE) {
@@ -911,21 +911,21 @@ ole_mb2wc(char *pm, int len, UINT cp)
if (conv_51932(cp)) {
#ifndef pIMultiLanguage
- DWORD dw = 0;
- UINT n = len;
- HRESULT hr = pIMultiLanguage->lpVtbl->ConvertStringToUnicode(pIMultiLanguage,
- &dw, cp, pm, &n, NULL, &size);
- if (FAILED(hr)) {
+ DWORD dw = 0;
+ UINT n = len;
+ HRESULT hr = pIMultiLanguage->lpVtbl->ConvertStringToUnicode(pIMultiLanguage,
+ &dw, cp, pm, &n, NULL, &size);
+ if (FAILED(hr)) {
ole_raise(hr, eWIN32OLERuntimeError, "fail to convert CP%d to Unicode", cp);
- }
- pw = SysAllocStringLen(NULL, size);
- n = len;
- hr = pIMultiLanguage->lpVtbl->ConvertStringToUnicode(pIMultiLanguage,
- &dw, cp, pm, &n, pw, &size);
- if (FAILED(hr)) {
+ }
+ pw = SysAllocStringLen(NULL, size);
+ n = len;
+ hr = pIMultiLanguage->lpVtbl->ConvertStringToUnicode(pIMultiLanguage,
+ &dw, cp, pm, &n, pw, &size);
+ if (FAILED(hr)) {
ole_raise(hr, eWIN32OLERuntimeError, "fail to convert CP%d to Unicode", cp);
- }
- return pw;
+ }
+ return pw;
#endif
}
size = MultiByteToWideChar(cp, 0, pm, len, NULL, 0);
@@ -1737,11 +1737,11 @@ reg_get_val(HKEY hkey, const char *subkey)
if (err == ERROR_SUCCESS) {
pbuf[size] = '\0';
if (dwtype == REG_EXPAND_SZ) {
- char* pbuf2 = (char *)pbuf;
- DWORD len = ExpandEnvironmentStrings(pbuf2, NULL, 0);
- pbuf = ALLOC_N(char, len + 1);
- ExpandEnvironmentStrings(pbuf2, pbuf, len + 1);
- free(pbuf2);
+ char* pbuf2 = (char *)pbuf;
+ DWORD len = ExpandEnvironmentStrings(pbuf2, NULL, 0);
+ pbuf = ALLOC_N(char, len + 1);
+ ExpandEnvironmentStrings(pbuf2, pbuf, len + 1);
+ free(pbuf2);
}
val = rb_str_new2((char *)pbuf);
}
@@ -1962,7 +1962,7 @@ ole_bind_obj(VALUE moniker, int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * WIN32OLE.connect( ole ) --> aWIN32OLE
+ * connect(ole) --> aWIN32OLE
*
* Returns running OLE Automation object or WIN32OLE object from moniker.
* 1st argument should be OLE program id or class id or moniker.
@@ -2019,7 +2019,7 @@ fole_s_connect(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * WIN32OLE.const_load( ole, mod = WIN32OLE)
+ * const_load(ole, mod = WIN32OLE)
*
* Defines the constants of OLE Automation server as mod's constants.
* The first argument is WIN32OLE object or type library name.
@@ -2124,7 +2124,7 @@ reference_count(struct oledata * pole)
/*
* call-seq:
- * WIN32OLE.ole_reference_count(aWIN32OLE) --> number
+ * ole_reference_count(aWIN32OLE) --> number
*
* Returns reference counter of Dispatch interface of WIN32OLE object.
* You should not use this method because this method
@@ -2140,7 +2140,7 @@ fole_s_reference_count(VALUE self, VALUE obj)
/*
* call-seq:
- * WIN32OLE.ole_free(aWIN32OLE) --> number
+ * ole_free(aWIN32OLE) --> number
*
* Invokes Release method of Dispatch interface of WIN32OLE object.
* You should not use this method because this method
@@ -2184,10 +2184,10 @@ ole_show_help(VALUE helpfile, VALUE helpcontext)
/*
* call-seq:
- * WIN32OLE.ole_show_help(obj [,helpcontext])
+ * ole_show_help(obj [,helpcontext])
*
- * Displays helpfile. The 1st argument specifies WIN32OLE_TYPE
- * object or WIN32OLE_METHOD object or helpfile.
+ * Displays helpfile. The 1st argument specifies WIN32OLE::Type
+ * object or WIN32OLE::Method object or helpfile.
*
* excel = WIN32OLE.new('Excel.Application')
* typeobj = excel.ole_type
@@ -2215,7 +2215,7 @@ fole_s_show_help(int argc, VALUE *argv, VALUE self)
helpfile = target;
}
if (!RB_TYPE_P(helpfile, T_STRING)) {
- rb_raise(rb_eTypeError, "1st parameter must be (String|WIN32OLE_TYPE|WIN32OLE_METHOD)");
+ rb_raise(rb_eTypeError, "1st parameter must be (String|WIN32OLE::Type|WIN32OLE::Method)");
}
hwnd = ole_show_help(helpfile, helpcontext);
if(hwnd == 0) {
@@ -2227,7 +2227,7 @@ fole_s_show_help(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * WIN32OLE.codepage
+ * codepage
*
* Returns current codepage.
* WIN32OLE.codepage # => WIN32OLE::CP_ACP
@@ -2258,7 +2258,7 @@ code_page_installed(UINT cp)
/*
* call-seq:
- * WIN32OLE.codepage = CP
+ * codepage = CP
*
* Sets current codepage.
* The WIN32OLE.codepage is initialized according to
@@ -2282,7 +2282,7 @@ fole_s_set_code_page(VALUE self, VALUE vcp)
/*
* call-seq:
- * WIN32OLE.locale -> locale id.
+ * locale -> locale id.
*
* Returns current locale id (lcid). The default locale is
* WIN32OLE::LOCALE_SYSTEM_DEFAULT.
@@ -2316,12 +2316,12 @@ lcid_installed(LCID lcid)
/*
* call-seq:
- * WIN32OLE.locale = lcid
+ * locale = lcid
*
* Sets current locale id (lcid).
*
* WIN32OLE.locale = 1033 # set locale English(U.S)
- * obj = WIN32OLE_VARIANT.new("$100,000", WIN32OLE::VARIANT::VT_CY)
+ * obj = WIN32OLE::Variant.new("$100,000", WIN32OLE::VARIANT::VT_CY)
*
*/
static VALUE
@@ -2345,7 +2345,7 @@ fole_s_set_locale(VALUE self, VALUE vlcid)
/*
* call-seq:
- * WIN32OLE.create_guid
+ * create_guid
*
* Creates GUID.
* WIN32OLE.create_guid # => {1CB530F1-F6B1-404D-BCE6-1959BF91F4A8}
@@ -2393,9 +2393,9 @@ fole_s_ole_uninitialize(VALUE self)
/*
* Document-class: WIN32OLE
*
- * <code>WIN32OLE</code> objects represent OLE Automation object in Ruby.
+ * +WIN32OLE+ objects represent OLE Automation object in Ruby.
*
- * By using WIN32OLE, you can access OLE server like VBScript.
+ * By using +WIN32OLE+, you can access OLE server like VBScript.
*
* Here is sample script.
*
@@ -2419,18 +2419,18 @@ fole_s_ole_uninitialize(VALUE self)
* excel.ActiveWorkbook.Close(0);
* excel.Quit();
*
- * Unfortunately, Win32OLE doesn't support the argument passed by
+ * Unfortunately, +WIN32OLE+ doesn't support the argument passed by
* reference directly.
- * Instead, Win32OLE provides WIN32OLE::ARGV or WIN32OLE_VARIANT object.
+ * Instead, +WIN32OLE+ provides WIN32OLE::ARGV or WIN32OLE::Variant object.
* If you want to get the result value of argument passed by reference,
- * you can use WIN32OLE::ARGV or WIN32OLE_VARIANT.
+ * you can use WIN32OLE::ARGV or WIN32OLE::Variant.
*
* oleobj.method(arg1, arg2, refargv3)
* puts WIN32OLE::ARGV[2] # the value of refargv3 after called oleobj.method
*
* or
*
- * refargv3 = WIN32OLE_VARIANT.new(XXX,
+ * refargv3 = WIN32OLE::Variant.new(XXX,
* WIN32OLE::VARIANT::VT_BYREF|WIN32OLE::VARIANT::VT_XXX)
* oleobj.method(arg1, arg2, refargv3)
* p refargv3.value # the value of refargv3 after called oleobj.method.
@@ -2439,7 +2439,7 @@ fole_s_ole_uninitialize(VALUE self)
/*
* call-seq:
- * WIN32OLE.new(server, [host]) -> WIN32OLE object
+ * new(server, [host]) -> WIN32OLE object
* WIN32OLE.new(server, license: 'key') -> WIN32OLE object
*
* Returns a new WIN32OLE object(OLE Automation object).
@@ -2522,12 +2522,12 @@ fole_initialize(int argc, VALUE *argv, VALUE self)
OLE_RELEASE(pIClassFactory2);
}
}
- pDispatch = p;
if(FAILED(hr)) {
ole_raise(hr, eWIN32OLERuntimeError,
"failed to create WIN32OLE object from `%s'",
StringValuePtr(svr_name));
}
+ pDispatch = p;
ole_set_member(self, pDispatch);
return self;
@@ -2555,7 +2555,7 @@ hash2named_arg(VALUE key, VALUE val, VALUE pop)
rb_raise(rb_eTypeError, "wrong argument type (expected String or Symbol)");
}
if (RB_TYPE_P(key, T_SYMBOL)) {
- key = rb_sym2str(key);
+ key = rb_sym2str(key);
}
/* pNamedArgs[0] is <method name>, so "index + 1" */
@@ -2619,10 +2619,10 @@ ole_invoke(int argc, VALUE *argv, VALUE self, USHORT wFlags, BOOL is_bracket)
rb_scan_args(argc, argv, "1*", &cmd, &paramS);
if(!RB_TYPE_P(cmd, T_STRING) && !RB_TYPE_P(cmd, T_SYMBOL) && !is_bracket) {
- rb_raise(rb_eTypeError, "method is wrong type (expected String or Symbol)");
+ rb_raise(rb_eTypeError, "method is wrong type (expected String or Symbol)");
}
if (RB_TYPE_P(cmd, T_SYMBOL)) {
- cmd = rb_sym2str(cmd);
+ cmd = rb_sym2str(cmd);
}
pole = oledata_get_struct(self);
if(!pole->pDispatch) {
@@ -2631,7 +2631,7 @@ ole_invoke(int argc, VALUE *argv, VALUE self, USHORT wFlags, BOOL is_bracket)
if (is_bracket) {
DispID = DISPID_VALUE;
argc += 1;
- rb_ary_unshift(paramS, cmd);
+ rb_ary_unshift(paramS, cmd);
} else {
wcmdname = ole_vstr2wc(cmd);
hr = pole->pDispatch->lpVtbl->GetIDsOfNames( pole->pDispatch, &IID_NULL,
@@ -2826,7 +2826,7 @@ ole_invoke(int argc, VALUE *argv, VALUE self, USHORT wFlags, BOOL is_bracket)
/*
* call-seq:
- * WIN32OLE#invoke(method, [arg1,...]) => return value of method.
+ * invoke(method, [arg1,...]) => return value of method.
*
* Runs OLE method.
* The first argument specifies the method name of OLE Automation object.
@@ -3038,7 +3038,7 @@ ole_invoke2(VALUE self, VALUE dispid, VALUE args, VALUE types, USHORT dispkind)
/*
* call-seq:
- * WIN32OLE#_invoke(dispid, args, types)
+ * _invoke(dispid, args, types)
*
* Runs the early binding method.
* The 1st argument specifies dispatch ID,
@@ -3056,7 +3056,7 @@ fole_invoke2(VALUE self, VALUE dispid, VALUE args, VALUE types)
/*
* call-seq:
- * WIN32OLE#_getproperty(dispid, args, types)
+ * _getproperty(dispid, args, types)
*
* Runs the early binding method to get property.
* The 1st argument specifies dispatch ID,
@@ -3074,7 +3074,7 @@ fole_getproperty2(VALUE self, VALUE dispid, VALUE args, VALUE types)
/*
* call-seq:
- * WIN32OLE#_setproperty(dispid, args, types)
+ * _setproperty(dispid, args, types)
*
* Runs the early binding method to set property.
* The 1st argument specifies dispatch ID,
@@ -3120,7 +3120,7 @@ fole_setproperty_with_bracket(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * WIN32OLE.setproperty('property', [arg1, arg2,...] val)
+ * setproperty('property', [arg1, arg2,...] val)
*
* Sets property of OLE object.
* When you want to set property with argument, you can use this method.
@@ -3226,7 +3226,7 @@ ole_propertyput(VALUE self, VALUE property, VALUE value)
/*
* call-seq:
- * WIN32OLE#ole_free
+ * ole_free
*
* invokes Release method of Dispatch interface of WIN32OLE object.
* Usually, you do not need to call this method because Release method
@@ -3269,7 +3269,7 @@ ole_ienum_free(VALUE pEnumV)
/*
* call-seq:
- * WIN32OLE#each {|i|...}
+ * each {|i|...}
*
* Iterates over each item of OLE collection which has IEnumVARIANT interface.
*
@@ -3340,7 +3340,7 @@ fole_each(VALUE self)
/*
* call-seq:
- * WIN32OLE#method_missing(id [,arg1, arg2, ...])
+ * method_missing(id [,arg1, arg2, ...])
*
* Calls WIN32OLE#invoke method.
*/
@@ -3438,9 +3438,9 @@ ole_methods(VALUE self, int mask)
/*
* call-seq:
- * WIN32OLE#ole_methods
+ * ole_methods
*
- * Returns the array of WIN32OLE_METHOD object.
+ * Returns the array of WIN32OLE::Method object.
* The element is OLE method of WIN32OLE object.
*
* excel = WIN32OLE.new('Excel.Application')
@@ -3455,9 +3455,9 @@ fole_methods(VALUE self)
/*
* call-seq:
- * WIN32OLE#ole_get_methods
+ * ole_get_methods
*
- * Returns the array of WIN32OLE_METHOD object .
+ * Returns the array of WIN32OLE::Method object .
* The element of the array is property (gettable) of WIN32OLE object.
*
* excel = WIN32OLE.new('Excel.Application')
@@ -3471,9 +3471,9 @@ fole_get_methods(VALUE self)
/*
* call-seq:
- * WIN32OLE#ole_put_methods
+ * ole_put_methods
*
- * Returns the array of WIN32OLE_METHOD object .
+ * Returns the array of WIN32OLE::Method object .
* The element of the array is property (settable) of WIN32OLE object.
*
* excel = WIN32OLE.new('Excel.Application')
@@ -3487,9 +3487,9 @@ fole_put_methods(VALUE self)
/*
* call-seq:
- * WIN32OLE#ole_func_methods
+ * ole_func_methods
*
- * Returns the array of WIN32OLE_METHOD object .
+ * Returns the array of WIN32OLE::Method object .
* The element of the array is property (settable) of WIN32OLE object.
*
* excel = WIN32OLE.new('Excel.Application')
@@ -3504,9 +3504,9 @@ fole_func_methods(VALUE self)
/*
* call-seq:
- * WIN32OLE#ole_type
+ * ole_type
*
- * Returns WIN32OLE_TYPE object.
+ * Returns WIN32OLE::Type object.
*
* excel = WIN32OLE.new('Excel.Application')
* tobj = excel.ole_type
@@ -3529,16 +3529,16 @@ fole_type(VALUE self)
type = ole_type_from_itypeinfo(pTypeInfo);
OLE_RELEASE(pTypeInfo);
if (type == Qnil) {
- rb_raise(rb_eRuntimeError, "failed to create WIN32OLE_TYPE obj from ITypeInfo");
+ rb_raise(rb_eRuntimeError, "failed to create WIN32OLE::Type obj from ITypeInfo");
}
return type;
}
/*
* call-seq:
- * WIN32OLE#ole_typelib -> The WIN32OLE_TYPELIB object
+ * ole_typelib -> The WIN32OLE_TYPELIB object
*
- * Returns the WIN32OLE_TYPELIB object. The object represents the
+ * Returns the WIN32OLE::TypeLib object. The object represents the
* type library which contains the WIN32OLE object.
*
* excel = WIN32OLE.new('Excel.Application')
@@ -3570,7 +3570,7 @@ fole_typelib(VALUE self)
/*
* call-seq:
- * WIN32OLE#ole_query_interface(iid) -> WIN32OLE object
+ * ole_query_interface(iid) -> WIN32OLE object
*
* Returns WIN32OLE object for a specific dispatch or dual
* interface specified by iid.
@@ -3616,7 +3616,7 @@ fole_query_interface(VALUE self, VALUE str_iid)
/*
* call-seq:
- * WIN32OLE#ole_respond_to?(method) -> true or false
+ * ole_respond_to?(method) -> true or false
*
* Returns true when OLE object has OLE method, otherwise returns false.
*
@@ -3639,7 +3639,7 @@ fole_respond_to(VALUE self, VALUE method)
pole = oledata_get_struct(self);
wcmdname = ole_vstr2wc(method);
hr = pole->pDispatch->lpVtbl->GetIDsOfNames( pole->pDispatch, &IID_NULL,
- &wcmdname, 1, cWIN32OLE_lcid, &DispID);
+ &wcmdname, 1, cWIN32OLE_lcid, &DispID);
SysFreeString(wcmdname);
return SUCCEEDED(hr) ? Qtrue : Qfalse;
}
@@ -3825,9 +3825,9 @@ ole_typedesc2val(ITypeInfo *pTypeInfo, TYPEDESC *pTypeDesc, VALUE typedetails)
/*
* call-seq:
- * WIN32OLE#ole_method_help(method)
+ * ole_method_help(method)
*
- * Returns WIN32OLE_METHOD object corresponding with method
+ * Returns WIN32OLE::Method object corresponding with method
* specified by 1st argument.
*
* excel = WIN32OLE.new('Excel.Application')
@@ -3859,7 +3859,7 @@ fole_method_help(VALUE self, VALUE cmdname)
/*
* call-seq:
- * WIN32OLE#ole_activex_initialize() -> Qnil
+ * ole_activex_initialize() -> Qnil
*
* Initialize WIN32OLE object(ActiveX Control) by calling
* IPersistMemory::InitNew.
@@ -4073,7 +4073,7 @@ Init_win32ole(void)
* p c # => 0
* p WIN32OLE::ARGV # => [10, 20, 30]
*
- * You can use WIN32OLE_VARIANT object to retrieve the value of reference
+ * You can use WIN32OLE::Variant object to retrieve the value of reference
* arguments instead of referring WIN32OLE::ARGV.
*
*/
diff --git a/ext/win32ole/win32ole.gemspec b/ext/win32ole/win32ole.gemspec
index 977555c98d..625916ae17 100644
--- a/ext/win32ole/win32ole.gemspec
+++ b/ext/win32ole/win32ole.gemspec
@@ -1,6 +1,16 @@
+source_version = ["", "ext/win32ole/"].find do |dir|
+ begin
+ break File.open(File.join(__dir__, "#{dir}win32ole.c")) {|f|
+ f.gets("\n#define WIN32OLE_VERSION ")
+ f.gets[/\s*"(.+)"/, 1]
+ }
+ rescue Errno::ENOENT
+ end
+end
+
Gem::Specification.new do |spec|
spec.name = "win32ole"
- spec.version = "1.8.8"
+ spec.version = source_version
spec.authors = ["Masaki Suketa"]
spec.email = ["suke@ruby-lang.org"]
@@ -13,9 +23,11 @@ Gem::Specification.new do |spec|
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
- end
+ pathspecs = %W[
+ :(exclude,literal)#{File.basename(__FILE__)}
+ :^/bin/ :^/test/ :^/rakelib/ :^/.git* :^/Gemfile* :^/Rakefile*
+ ]
+ spec.files = IO.popen(%w[git ls-files -z --] + pathspecs, chdir: __dir__, err: IO::NULL, exception: false, &:read).split("\x0")
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
diff --git a/ext/win32ole/win32ole_error.c b/ext/win32ole/win32ole_error.c
index 2bb5156263..66b5136dee 100644
--- a/ext/win32ole/win32ole_error.c
+++ b/ext/win32ole/win32ole_error.c
@@ -67,7 +67,7 @@ void
Init_win32ole_error(void)
{
/*
- * Document-class: WIN32OLERuntimeError
+ * Document-class: WIN32OLE::RuntimeError
*
* Raised when OLE processing failed.
*
@@ -77,11 +77,20 @@ Init_win32ole_error(void)
*
* raises the exception:
*
- * WIN32OLERuntimeError: unknown OLE server: `NonExistProgID'
+ * WIN32OLE::RuntimeError: unknown OLE server: `NonExistProgID'
* HRESULT error code:0x800401f3
* Invalid class string
*
*/
- eWIN32OLERuntimeError = rb_define_class("WIN32OLERuntimeError", rb_eRuntimeError);
- eWIN32OLEQueryInterfaceError = rb_define_class("WIN32OLEQueryInterfaceError", eWIN32OLERuntimeError);
+ eWIN32OLERuntimeError = rb_define_class_under(cWIN32OLE, "RuntimeError", rb_eRuntimeError);
+ /* Alias of WIN32OLE::RuntimeError, for the backward compatibility */
+ rb_define_const(rb_cObject, "WIN32OLERuntimeError", eWIN32OLERuntimeError);
+ /*
+ * Document-class: WIN32OLE::QueryInterfaceError
+ *
+ * Raised when OLE query failed.
+ */
+ eWIN32OLEQueryInterfaceError = rb_define_class_under(cWIN32OLE, "QueryInterfaceError", eWIN32OLERuntimeError);
+ /* Alias of WIN32OLE::QueryInterfaceError, for the backward compatibility */
+ rb_define_const(rb_cObject, "WIN32OLEQueryInterfaceError", eWIN32OLEQueryInterfaceError);
}
diff --git a/ext/win32ole/win32ole_event.c b/ext/win32ole/win32ole_event.c
index 041639af6c..ff6835e3e4 100644
--- a/ext/win32ole/win32ole_event.c
+++ b/ext/win32ole/win32ole_event.c
@@ -1,9 +1,9 @@
#include "win32ole.h"
/*
- * Document-class: WIN32OLE_EVENT
+ * Document-class: WIN32OLE::Event
*
- * <code>WIN32OLE_EVENT</code> objects controls OLE event.
+ * +WIN32OLE::Event+ objects controls OLE event.
*/
RUBY_EXTERN void rb_write_error_str(VALUE mesg);
@@ -200,7 +200,7 @@ STDMETHODIMP EVENTSINK_Invoke(
}
outargv = Qnil;
if (is_outarg == Qtrue) {
- outargv = rb_ary_new();
+ outargv = rb_ary_new();
rb_ary_push(args, outargv);
}
@@ -413,15 +413,15 @@ hash2ptr_dispparams(VALUE hash, ITypeInfo *pTypeInfo, DISPID dispid, DISPPARAMS
bstrs, pdispparams->cArgs + 1,
&len);
if (FAILED(hr))
- return;
+ return;
for (i = 0; i < len - 1; i++) {
- key = WC2VSTR(bstrs[i + 1]);
+ key = WC2VSTR(bstrs[i + 1]);
val = rb_hash_aref(hash, RB_UINT2NUM(i));
- if (val == Qnil)
- val = rb_hash_aref(hash, key);
- if (val == Qnil)
- val = rb_hash_aref(hash, rb_str_intern(key));
+ if (val == Qnil)
+ val = rb_hash_aref(hash, key);
+ if (val == Qnil)
+ val = rb_hash_aref(hash, rb_str_intern(key));
pvar = &pdispparams->rgvarg[pdispparams->cArgs-i-1];
ole_val2ptr_variant(val, pvar);
}
@@ -433,7 +433,7 @@ hash2result(VALUE hash)
VALUE ret = Qnil;
ret = rb_hash_aref(hash, rb_str_new2("return"));
if (ret == Qnil)
- ret = rb_hash_aref(hash, rb_str_intern(rb_str_new2("return")));
+ ret = rb_hash_aref(hash, rb_str_intern(rb_str_new2("return")));
return ret;
}
@@ -610,7 +610,7 @@ find_coclass(
hr = pTypeInfo->lpVtbl->GetContainingTypeLib(pTypeInfo, &pTypeLib, NULL);
if (FAILED(hr)) {
- return hr;
+ return hr;
}
count = pTypeLib->lpVtbl->GetTypeInfoCount(pTypeLib);
for (i = 0; i < count && !found; i++) {
@@ -974,13 +974,13 @@ ev_advise(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * WIN32OLE_EVENT.new(ole, event) #=> WIN32OLE_EVENT object.
+ * new(ole, event) #=> WIN32OLE::Event object.
*
* Returns OLE event object.
* The first argument specifies WIN32OLE object.
* The second argument specifies OLE event name.
* ie = WIN32OLE.new('InternetExplorer.Application')
- * ev = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents')
+ * ev = WIN32OLE::Event.new(ie, 'DWebBrowserEvents')
*/
static VALUE
fev_initialize(int argc, VALUE *argv, VALUE self)
@@ -1004,7 +1004,7 @@ ole_msg_loop(void)
/*
* call-seq:
- * WIN32OLE_EVENT.message_loop
+ * message_loop
*
* Translates and dispatches Windows message.
*/
@@ -1052,7 +1052,7 @@ ev_on_event(int argc, VALUE *argv, VALUE self, VALUE is_ary_arg)
/*
* call-seq:
- * WIN32OLE_EVENT#on_event([event]){...}
+ * on_event([event]){...}
*
* Defines the callback event.
* If argument is omitted, this method defines the callback of all events.
@@ -1061,12 +1061,12 @@ ev_on_event(int argc, VALUE *argv, VALUE self, VALUE is_ary_arg)
* use `return' or :return.
*
* ie = WIN32OLE.new('InternetExplorer.Application')
- * ev = WIN32OLE_EVENT.new(ie)
+ * ev = WIN32OLE::Event.new(ie)
* ev.on_event("NavigateComplete") {|url| puts url}
* ev.on_event() {|ev, *args| puts "#{ev} fired"}
*
* ev.on_event("BeforeNavigate2") {|*args|
- * ...
+ * # ...
* # set true to BeforeNavigate reference argument `Cancel'.
* # Cancel is 7-th argument of BeforeNavigate,
* # so you can use 6 as key of hash instead of 'Cancel'.
@@ -1075,7 +1075,7 @@ ev_on_event(int argc, VALUE *argv, VALUE self, VALUE is_ary_arg)
* {:Cancel => true} # or {'Cancel' => true} or {6 => true}
* }
*
- * ev.on_event(...) {|*args|
+ * ev.on_event(event_name) {|*args|
* {:return => 1, :xxx => yyy}
* }
*/
@@ -1087,14 +1087,14 @@ fev_on_event(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * WIN32OLE_EVENT#on_event_with_outargs([event]){...}
+ * on_event_with_outargs([event]){...}
*
* Defines the callback of event.
* If you want modify argument in callback,
- * you could use this method instead of WIN32OLE_EVENT#on_event.
+ * you could use this method instead of WIN32OLE::Event#on_event.
*
* ie = WIN32OLE.new('InternetExplorer.Application')
- * ev = WIN32OLE_EVENT.new(ie)
+ * ev = WIN32OLE::Event.new(ie)
* ev.on_event_with_outargs('BeforeNavigate2') {|*args|
* args.last[6] = true
* }
@@ -1107,18 +1107,18 @@ fev_on_event_with_outargs(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * WIN32OLE_EVENT#off_event([event])
+ * off_event([event])
*
* removes the callback of event.
*
* ie = WIN32OLE.new('InternetExplorer.Application')
- * ev = WIN32OLE_EVENT.new(ie)
+ * ev = WIN32OLE::Event.new(ie)
* ev.on_event('BeforeNavigate2') {|*args|
* args.last[6] = true
* }
- * ...
+ * # ...
* ev.off_event('BeforeNavigate2')
- * ...
+ * # ...
*/
static VALUE
fev_off_event(int argc, VALUE *argv, VALUE self)
@@ -1145,16 +1145,16 @@ fev_off_event(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * WIN32OLE_EVENT#unadvise -> nil
+ * unadvise -> nil
*
- * disconnects OLE server. If this method called, then the WIN32OLE_EVENT object
+ * disconnects OLE server. If this method called, then the WIN32OLE::Event object
* does not receive the OLE server event any more.
* This method is trial implementation.
*
* ie = WIN32OLE.new('InternetExplorer.Application')
- * ev = WIN32OLE_EVENT.new(ie)
- * ev.on_event() {...}
- * ...
+ * ev = WIN32OLE::Event.new(ie)
+ * ev.on_event() { something }
+ * # ...
* ev.unadvise
*
*/
@@ -1201,7 +1201,7 @@ evs_length(void)
/*
* call-seq:
- * WIN32OLE_EVENT#handler=
+ * handler=
*
* sets event handler object. If handler object has onXXX
* method according to XXX event, then onXXX method is called
@@ -1212,7 +1212,7 @@ evs_length(void)
* called and 1-st argument is event name.
*
* If handler object has onXXX method and there is block
- * defined by WIN32OLE_EVENT#on_event('XXX'){},
+ * defined by <code>on_event('XXX'){}</code>,
* then block is executed but handler object method is not called
* when XXX event occurs.
*
@@ -1230,7 +1230,7 @@ evs_length(void)
*
* handler = Handler.new
* ie = WIN32OLE.new('InternetExplorer.Application')
- * ev = WIN32OLE_EVENT.new(ie)
+ * ev = WIN32OLE::Event.new(ie)
* ev.on_event("StatusTextChange") {|*args|
* puts "this block executed."
* puts "handler.onStatusTextChange method is not called."
@@ -1246,7 +1246,7 @@ fev_set_handler(VALUE self, VALUE val)
/*
* call-seq:
- * WIN32OLE_EVENT#handler
+ * handler
*
* returns handler object.
*
@@ -1264,7 +1264,9 @@ Init_win32ole_event(void)
ary_ole_event = rb_ary_new();
rb_gc_register_mark_object(ary_ole_event);
id_events = rb_intern("events");
- cWIN32OLE_EVENT = rb_define_class("WIN32OLE_EVENT", rb_cObject);
+ cWIN32OLE_EVENT = rb_define_class_under(cWIN32OLE, "Event", rb_cObject);
+ /* Alias of WIN32OLE::Event, for the backward compatibility */
+ rb_define_const(rb_cObject, "WIN32OLE_EVENT", cWIN32OLE_EVENT);
rb_define_singleton_method(cWIN32OLE_EVENT, "message_loop", fev_s_msg_loop, 0);
rb_define_alloc_func(cWIN32OLE_EVENT, fev_s_allocate);
rb_define_method(cWIN32OLE_EVENT, "initialize", fev_initialize, -1);
diff --git a/ext/win32ole/win32ole_method.c b/ext/win32ole/win32ole_method.c
index 6ed5def6d7..a0278729f0 100644
--- a/ext/win32ole/win32ole_method.c
+++ b/ext/win32ole/win32ole_method.c
@@ -216,9 +216,9 @@ create_win32ole_method(ITypeInfo *pTypeInfo, VALUE name)
}
/*
- * Document-class: WIN32OLE_METHOD
+ * Document-class: WIN32OLE::Method
*
- * <code>WIN32OLE_METHOD</code> objects represent OLE method information.
+ * +WIN32OLE::Method+ objects represent OLE method information.
*/
static VALUE
@@ -251,16 +251,16 @@ folemethod_s_allocate(VALUE klass)
/*
* call-seq:
- * WIN32OLE_METHOD.new(ole_type, method) -> WIN32OLE_METHOD object
+ * WIN32OLE::Method.new(ole_type, method) -> WIN32OLE::Method object
*
- * Returns a new WIN32OLE_METHOD object which represents the information
+ * Returns a new WIN32OLE::Method object which represents the information
* about OLE method.
- * The first argument <i>ole_type</i> specifies WIN32OLE_TYPE object.
+ * The first argument <i>ole_type</i> specifies WIN32OLE::Type object.
* The second argument <i>method</i> specifies OLE method name defined OLE class
- * which represents WIN32OLE_TYPE object.
+ * which represents WIN32OLE::Type object.
*
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
- * method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
+ * method = WIN32OLE::Method.new(tobj, 'SaveAs')
*/
static VALUE
folemethod_initialize(VALUE self, VALUE oletype, VALUE method)
@@ -277,19 +277,19 @@ folemethod_initialize(VALUE self, VALUE oletype, VALUE method)
}
}
else {
- rb_raise(rb_eTypeError, "1st argument should be WIN32OLE_TYPE object");
+ rb_raise(rb_eTypeError, "1st argument should be WIN32OLE::Type object");
}
return obj;
}
/*
* call-seq:
- * WIN32OLE_METHOD#name
+ * name
*
* Returns the name of the method.
*
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
- * method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
+ * method = WIN32OLE::Method.new(tobj, 'SaveAs')
* puts method.name # => SaveAs
*
*/
@@ -317,11 +317,11 @@ ole_method_return_type(ITypeInfo *pTypeInfo, UINT method_index)
/*
* call-seq:
- * WIN32OLE_METHOD#return_type
+ * return_type
*
* Returns string of return value type of method.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
+ * method = WIN32OLE::Method.new(tobj, 'Add')
* puts method.return_type # => Workbook
*
*/
@@ -351,11 +351,11 @@ ole_method_return_vtype(ITypeInfo *pTypeInfo, UINT method_index)
/*
* call-seq:
- * WIN32OLE_METHOD#return_vtype
+ * return_vtype
*
* Returns number of return value type of method.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
+ * method = WIN32OLE::Method.new(tobj, 'Add')
* puts method.return_vtype # => 26
*
*/
@@ -385,12 +385,12 @@ ole_method_return_type_detail(ITypeInfo *pTypeInfo, UINT method_index)
/*
* call-seq:
- * WIN32OLE_METHOD#return_type_detail
+ * return_type_detail
*
* Returns detail information of return value type of method.
* The information is array.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
+ * method = WIN32OLE::Method.new(tobj, 'Add')
* p method.return_type_detail # => ["PTR", "USERDEFINED", "Workbook"]
*/
static VALUE
@@ -437,11 +437,11 @@ ole_method_invoke_kind(ITypeInfo *pTypeInfo, UINT method_index)
/*
* call-seq:
- * WIN32OLE_METHOD#invkind
+ * invkind
*
* Returns the method invoke kind.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
+ * method = WIN32OLE::Method.new(tobj, 'Add')
* puts method.invkind # => 1
*
*/
@@ -455,13 +455,13 @@ folemethod_invkind(VALUE self)
/*
* call-seq:
- * WIN32OLE_METHOD#invoke_kind
+ * invoke_kind
*
* Returns the method kind string. The string is "UNKNOWN" or "PROPERTY"
* or "PROPERTY" or "PROPERTYGET" or "PROPERTYPUT" or "PROPERTYPPUTREF"
* or "FUNC".
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
+ * method = WIN32OLE::Method.new(tobj, 'Add')
* puts method.invoke_kind # => "FUNC"
*/
static VALUE
@@ -494,11 +494,11 @@ ole_method_visible(ITypeInfo *pTypeInfo, UINT method_index)
/*
* call-seq:
- * WIN32OLE_METHOD#visible?
+ * visible?
*
* Returns true if the method is public.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
+ * method = WIN32OLE::Method.new(tobj, 'Add')
* puts method.visible? # => true
*/
static VALUE
@@ -575,11 +575,11 @@ ole_method_event(ITypeInfo *pTypeInfo, UINT method_index, VALUE method_name)
/*
* call-seq:
- * WIN32OLE_METHOD#event?
+ * event?
*
* Returns true if the method is event.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
- * method = WIN32OLE_METHOD.new(tobj, 'SheetActivate')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
+ * method = WIN32OLE::Method.new(tobj, 'SheetActivate')
* puts method.event? # => true
*
*/
@@ -597,11 +597,11 @@ folemethod_event(VALUE self)
/*
* call-seq:
- * WIN32OLE_METHOD#event_interface
+ * event_interface
*
* Returns event interface name if the method is event.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
- * method = WIN32OLE_METHOD.new(tobj, 'SheetActivate')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
+ * method = WIN32OLE::Method.new(tobj, 'SheetActivate')
* puts method.event_interface # => WorkbookEvents
*/
static VALUE
@@ -655,12 +655,12 @@ ole_method_helpstring(ITypeInfo *pTypeInfo, UINT method_index)
/*
* call-seq:
- * WIN32OLE_METHOD#helpstring
+ * helpstring
*
* Returns help string of OLE method. If the help string is not found,
* then the method returns nil.
- * tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'IWebBrowser')
- * method = WIN32OLE_METHOD.new(tobj, 'Navigate')
+ * tobj = WIN32OLE::Type.new('Microsoft Internet Controls', 'IWebBrowser')
+ * method = WIN32OLE::Method.new(tobj, 'Navigate')
* puts method.helpstring # => Navigates to a URL or file.
*
*/
@@ -686,12 +686,12 @@ ole_method_helpfile(ITypeInfo *pTypeInfo, UINT method_index)
/*
* call-seq:
- * WIN32OLE_METHOD#helpfile
+ * helpfile
*
* Returns help file. If help file is not found, then
* the method returns nil.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
+ * method = WIN32OLE::Method.new(tobj, 'Add')
* puts method.helpfile # => C:\...\VBAXL9.CHM
*/
static VALUE
@@ -717,11 +717,11 @@ ole_method_helpcontext(ITypeInfo *pTypeInfo, UINT method_index)
/*
* call-seq:
- * WIN32OLE_METHOD#helpcontext
+ * helpcontext
*
* Returns help context.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
+ * method = WIN32OLE::Method.new(tobj, 'Add')
* puts method.helpcontext # => 65717
*/
static VALUE
@@ -748,11 +748,11 @@ ole_method_dispid(ITypeInfo *pTypeInfo, UINT method_index)
/*
* call-seq:
- * WIN32OLE_METHOD#dispid
+ * dispid
*
* Returns dispatch ID.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
+ * method = WIN32OLE::Method.new(tobj, 'Add')
* puts method.dispid # => 181
*/
static VALUE
@@ -779,11 +779,11 @@ ole_method_offset_vtbl(ITypeInfo *pTypeInfo, UINT method_index)
/*
* call-seq:
- * WIN32OLE_METHOD#offset_vtbl
+ * offset_vtbl
*
* Returns the offset ov VTBL.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
- * method = WIN32OLE_METHOD.new(tobj, 'Add')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
+ * method = WIN32OLE::Method.new(tobj, 'Add')
* puts method.offset_vtbl # => 40
*/
static VALUE
@@ -810,11 +810,11 @@ ole_method_size_params(ITypeInfo *pTypeInfo, UINT method_index)
/*
* call-seq:
- * WIN32OLE_METHOD#size_params
+ * size_params
*
* Returns the size of arguments of the method.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
- * method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
+ * method = WIN32OLE::Method.new(tobj, 'SaveAs')
* puts method.size_params # => 11
*
*/
@@ -842,11 +842,11 @@ ole_method_size_opt_params(ITypeInfo *pTypeInfo, UINT method_index)
/*
* call-seq:
- * WIN32OLE_METHOD#size_opt_params
+ * size_opt_params
*
* Returns the size of optional parameters.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
- * method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
+ * method = WIN32OLE::Method.new(tobj, 'SaveAs')
* puts method.size_opt_params # => 4
*/
static VALUE
@@ -892,11 +892,11 @@ ole_method_params(ITypeInfo *pTypeInfo, UINT method_index)
/*
* call-seq:
- * WIN32OLE_METHOD#params
+ * params
*
- * returns array of WIN32OLE_PARAM object corresponding with method parameters.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
- * method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
+ * returns array of WIN32OLE::Param object corresponding with method parameters.
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
+ * method = WIN32OLE::Method.new(tobj, 'SaveAs')
* p method.params # => [Filename, FileFormat, Password, WriteResPassword,
* ReadOnlyRecommended, CreateBackup, AccessMode,
* ConflictResolution, AddToMru, TextCodepage,
@@ -912,7 +912,7 @@ folemethod_params(VALUE self)
/*
* call-seq:
- * WIN32OLE_METHOD#inspect -> String
+ * inspect -> String
*
* Returns the method name with class name.
*
@@ -920,14 +920,16 @@ folemethod_params(VALUE self)
static VALUE
folemethod_inspect(VALUE self)
{
- return default_inspect(self, "WIN32OLE_METHOD");
+ return default_inspect(self, "WIN32OLE::Method");
}
VALUE cWIN32OLE_METHOD;
void Init_win32ole_method(void)
{
- cWIN32OLE_METHOD = rb_define_class("WIN32OLE_METHOD", rb_cObject);
+ cWIN32OLE_METHOD = rb_define_class_under(cWIN32OLE, "Method", rb_cObject);
+ /* Alias of WIN32OLE::Method, for the backward compatibility */
+ rb_define_const(rb_cObject, "WIN32OLE_METHOD", cWIN32OLE_METHOD);
rb_define_alloc_func(cWIN32OLE_METHOD, folemethod_s_allocate);
rb_define_method(cWIN32OLE_METHOD, "initialize", folemethod_initialize, 2);
rb_define_method(cWIN32OLE_METHOD, "name", folemethod_name, 0);
diff --git a/ext/win32ole/win32ole_param.c b/ext/win32ole/win32ole_param.c
index 52905b3e8e..0c4b185921 100644
--- a/ext/win32ole/win32ole_param.c
+++ b/ext/win32ole/win32ole_param.c
@@ -64,9 +64,9 @@ create_win32ole_param(ITypeInfo *pTypeInfo, UINT method_index, UINT index, VALUE
}
/*
- * Document-class: WIN32OLE_PARAM
+ * Document-class: WIN32OLE::Param
*
- * <code>WIN32OLE_PARAM</code> objects represent param information of
+ * +WIN32OLE::Param+ objects represent param information of
* the OLE method.
*/
static VALUE
@@ -131,15 +131,15 @@ oleparam_ole_param(VALUE self, VALUE olemethod, int n)
/*
* call-seq:
- * WIN32OLE_PARAM.new(method, n) -> WIN32OLE_PARAM object
+ * new(method, n) -> WIN32OLE::Param object
*
- * Returns WIN32OLE_PARAM object which represents OLE parameter information.
- * 1st argument should be WIN32OLE_METHOD object.
+ * Returns WIN32OLE::Param object which represents OLE parameter information.
+ * 1st argument should be WIN32OLE::Method object.
* 2nd argument `n' is n-th parameter of the method specified by 1st argument.
*
- * tobj = WIN32OLE_TYPE.new('Microsoft Scripting Runtime', 'IFileSystem')
- * method = WIN32OLE_METHOD.new(tobj, 'CreateTextFile')
- * param = WIN32OLE_PARAM.new(method, 2) # => #<WIN32OLE_PARAM:Overwrite=true>
+ * tobj = WIN32OLE::Type.new('Microsoft Scripting Runtime', 'IFileSystem')
+ * method = WIN32OLE::Method.new(tobj, 'CreateTextFile')
+ * param = WIN32OLE::Param.new(method, 2) # => #<WIN32OLE::Param:Overwrite=true>
*
*/
static VALUE
@@ -147,7 +147,7 @@ foleparam_initialize(VALUE self, VALUE olemethod, VALUE n)
{
int idx;
if (!rb_obj_is_kind_of(olemethod, cWIN32OLE_METHOD)) {
- rb_raise(rb_eTypeError, "1st parameter must be WIN32OLE_METHOD object");
+ rb_raise(rb_eTypeError, "1st parameter must be WIN32OLE::Method object");
}
idx = RB_FIX2INT(n);
return oleparam_ole_param(self, olemethod, idx);
@@ -155,11 +155,11 @@ foleparam_initialize(VALUE self, VALUE olemethod, VALUE n)
/*
* call-seq:
- * WIN32OLE_PARAM#name
+ * name
*
* Returns name.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
- * method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
+ * method = WIN32OLE::Method.new(tobj, 'SaveAs')
* param1 = method.params[0]
* puts param1.name # => Filename
*/
@@ -186,11 +186,11 @@ ole_param_ole_type(ITypeInfo *pTypeInfo, UINT method_index, UINT index)
/*
* call-seq:
- * WIN32OLE_PARAM#ole_type
+ * ole_type
*
- * Returns OLE type of WIN32OLE_PARAM object(parameter of OLE method).
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
- * method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
+ * Returns OLE type of WIN32OLE::Param object(parameter of OLE method).
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
+ * method = WIN32OLE::Method.new(tobj, 'SaveAs')
* param1 = method.params[0]
* puts param1.ole_type # => VARIANT
*/
@@ -220,11 +220,11 @@ ole_param_ole_type_detail(ITypeInfo *pTypeInfo, UINT method_index, UINT index)
/*
* call-seq:
- * WIN32OLE_PARAM#ole_type_detail
+ * ole_type_detail
*
* Returns detail information of type of argument.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'IWorksheetFunction')
- * method = WIN32OLE_METHOD.new(tobj, 'SumIf')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'IWorksheetFunction')
+ * method = WIN32OLE::Method.new(tobj, 'SumIf')
* param1 = method.params[0]
* p param1.ole_type_detail # => ["PTR", "USERDEFINED", "Range"]
*/
@@ -254,11 +254,11 @@ ole_param_flag_mask(ITypeInfo *pTypeInfo, UINT method_index, UINT index, USHORT
/*
* call-seq:
- * WIN32OLE_PARAM#input?
+ * input?
*
* Returns true if the parameter is input.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
- * method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
+ * method = WIN32OLE::Method.new(tobj, 'SaveAs')
* param1 = method.params[0]
* puts param1.input? # => true
*/
@@ -273,22 +273,22 @@ foleparam_input(VALUE self)
/*
* call-seq:
- * WIN32OLE#output?
+ * output?
*
* Returns true if argument is output.
- * tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'DWebBrowserEvents')
- * method = WIN32OLE_METHOD.new(tobj, 'NewWindow')
+ * tobj = WIN32OLE::Type.new('Microsoft Internet Controls', 'DWebBrowserEvents')
+ * method = WIN32OLE::Method.new(tobj, 'NewWindow')
* method.params.each do |param|
* puts "#{param.name} #{param.output?}"
* end
*
- * The result of above script is following:
- * URL false
- * Flags false
- * TargetFrameName false
- * PostData false
- * Headers false
- * Processed true
+ * The result of above script is following:
+ * URL false
+ * Flags false
+ * TargetFrameName false
+ * PostData false
+ * Headers false
+ * Processed true
*/
static VALUE
foleparam_output(VALUE self)
@@ -301,11 +301,11 @@ foleparam_output(VALUE self)
/*
* call-seq:
- * WIN32OLE_PARAM#optional?
+ * optional?
*
* Returns true if argument is optional.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
- * method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
+ * method = WIN32OLE::Method.new(tobj, 'SaveAs')
* param1 = method.params[0]
* puts "#{param1.name} #{param1.optional?}" # => Filename true
*/
@@ -320,12 +320,12 @@ foleparam_optional(VALUE self)
/*
* call-seq:
- * WIN32OLE_PARAM#retval?
+ * retval?
*
* Returns true if argument is return value.
- * tobj = WIN32OLE_TYPE.new('DirectX 7 for Visual Basic Type Library',
- * 'DirectPlayLobbyConnection')
- * method = WIN32OLE_METHOD.new(tobj, 'GetPlayerShortName')
+ * tobj = WIN32OLE::Type.new('DirectX 7 for Visual Basic Type Library',
+ * 'DirectPlayLobbyConnection')
+ * method = WIN32OLE::Method.new(tobj, 'GetPlayerShortName')
* param = method.params[0]
* puts "#{param.name} #{param.retval?}" # => name true
*/
@@ -363,12 +363,12 @@ ole_param_default(ITypeInfo *pTypeInfo, UINT method_index, UINT index)
/*
* call-seq:
- * WIN32OLE_PARAM#default
+ * default
*
* Returns default value. If the default value does not exist,
* this method returns nil.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook')
- * method = WIN32OLE_METHOD.new(tobj, 'SaveAs')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
+ * method = WIN32OLE::Method.new(tobj, 'SaveAs')
* method.params.each do |param|
* if param.default
* puts "#{param.name} (= #{param.default})"
@@ -377,18 +377,18 @@ ole_param_default(ITypeInfo *pTypeInfo, UINT method_index, UINT index)
* end
* end
*
- * The above script result is following:
- * Filename
- * FileFormat
- * Password
- * WriteResPassword
- * ReadOnlyRecommended
- * CreateBackup
- * AccessMode (= 1)
- * ConflictResolution
- * AddToMru
- * TextCodepage
- * TextVisualLayout
+ * The above script result is following:
+ * Filename
+ * FileFormat
+ * Password
+ * WriteResPassword
+ * ReadOnlyRecommended
+ * CreateBackup
+ * AccessMode (= 1)
+ * ConflictResolution
+ * AddToMru
+ * TextCodepage
+ * TextVisualLayout
*/
static VALUE
foleparam_default(VALUE self)
@@ -401,7 +401,7 @@ foleparam_default(VALUE self)
/*
* call-seq:
- * WIN32OLE_PARAM#inspect -> String
+ * inspect -> String
*
* Returns the parameter name with class name. If the parameter has default value,
* then returns name=value string with class name.
@@ -416,13 +416,15 @@ foleparam_inspect(VALUE self)
rb_str_cat2(detail, "=");
rb_str_concat(detail, rb_inspect(defval));
}
- return make_inspect("WIN32OLE_PARAM", detail);
+ return make_inspect("WIN32OLE::Param", detail);
}
void
Init_win32ole_param(void)
{
- cWIN32OLE_PARAM = rb_define_class("WIN32OLE_PARAM", rb_cObject);
+ cWIN32OLE_PARAM = rb_define_class_under(cWIN32OLE, "Param", rb_cObject);
+ /* Alias of WIN32OLE::Param, for the backward compatibility */
+ rb_define_const(rb_cObject, "WIN32OLE_PARAM", cWIN32OLE_PARAM);
rb_define_alloc_func(cWIN32OLE_PARAM, foleparam_s_allocate);
rb_define_method(cWIN32OLE_PARAM, "initialize", foleparam_initialize, 2);
rb_define_method(cWIN32OLE_PARAM, "name", foleparam_name, 0);
diff --git a/ext/win32ole/win32ole_record.c b/ext/win32ole/win32ole_record.c
index 03523bc47d..02f05a3fa7 100644
--- a/ext/win32ole/win32ole_record.c
+++ b/ext/win32ole/win32ole_record.c
@@ -177,10 +177,10 @@ create_win32ole_record(IRecordInfo *pri, void *prec)
}
/*
- * Document-class: WIN32OLE_RECORD
+ * Document-class: WIN32OLE::Record
*
- * <code>WIN32OLE_RECORD</code> objects represents VT_RECORD OLE variant.
- * Win32OLE returns WIN32OLE_RECORD object if the result value of invoking
+ * +WIN32OLE::Record+ objects represents VT_RECORD OLE variant.
+ * Win32OLE returns WIN32OLE::Record object if the result value of invoking
* OLE methods.
*
* If COM server in VB.NET ComServer project is the following:
@@ -206,7 +206,7 @@ create_win32ole_record(IRecordInfo *pri, void *prec)
* require 'win32ole'
* obj = WIN32OLE.new('ComServer.ComClass')
* book = obj.getBook
- * book.class # => WIN32OLE_RECORD
+ * book.class # => WIN32OLE::Record
* book.title # => "The Ruby Book"
* book.cost # => 20
*
@@ -253,11 +253,11 @@ folerecord_s_allocate(VALUE klass) {
/*
* call-seq:
- * WIN32OLE_RECORD.new(typename, obj) -> WIN32OLE_RECORD object
+ * new(typename, obj) -> WIN32OLE::Record object
*
- * Returns WIN32OLE_RECORD object. The first argument is struct name (String
+ * Returns WIN32OLE::Record object. The first argument is struct name (String
* or Symbol).
- * The second parameter obj should be WIN32OLE object or WIN32OLE_TYPELIB object.
+ * The second parameter obj should be WIN32OLE object or WIN32OLE::TypeLib object.
* If COM server in VB.NET ComServer project is the following:
*
* Imports System.Runtime.InteropServices
@@ -269,13 +269,13 @@ folerecord_s_allocate(VALUE klass) {
* End Structure
* End Class
*
- * then, you can create WIN32OLE_RECORD object is as following:
+ * then, you can create WIN32OLE::Record object is as following:
*
* require 'win32ole'
* obj = WIN32OLE.new('ComServer.ComClass')
- * book1 = WIN32OLE_RECORD.new('Book', obj) # => WIN32OLE_RECORD object
+ * book1 = WIN32OLE::Record.new('Book', obj) # => WIN32OLE::Record object
* tlib = obj.ole_typelib
- * book2 = WIN32OLE_RECORD.new('Book', tlib) # => WIN32OLE_RECORD object
+ * book2 = WIN32OLE::Record.new('Book', tlib) # => WIN32OLE::Record object
*
*/
static VALUE
@@ -303,7 +303,7 @@ folerecord_initialize(VALUE self, VALUE typename, VALUE oleobj) {
hr = E_FAIL;
}
} else {
- rb_raise(rb_eArgError, "2nd argument should be WIN32OLE object or WIN32OLE_TYPELIB object");
+ rb_raise(rb_eArgError, "2nd argument should be WIN32OLE object or WIN32OLE::TypeLib object");
}
if (FAILED(hr)) {
@@ -323,7 +323,7 @@ folerecord_initialize(VALUE self, VALUE typename, VALUE oleobj) {
/*
* call-seq:
- * WIN32OLE_RECORD#to_h #=> Ruby Hash object.
+ * WIN32OLE::Record#to_h #=> Ruby Hash object.
*
* Returns Ruby Hash object which represents VT_RECORD variable.
* The keys of Hash object are member names of VT_RECORD OLE variable and
@@ -346,7 +346,7 @@ folerecord_initialize(VALUE self, VALUE typename, VALUE oleobj) {
* End Function
* End Class
*
- * then, the result of WIN32OLE_RECORD#to_h is the following:
+ * then, the result of WIN32OLE::Record#to_h is the following:
*
* require 'win32ole'
* obj = WIN32OLE.new('ComServer.ComClass')
@@ -362,7 +362,7 @@ folerecord_to_h(VALUE self)
/*
* call-seq:
- * WIN32OLE_RECORD#typename #=> String object
+ * typename #=> String object
*
* Returns the type name of VT_RECORD OLE variable.
*
@@ -383,7 +383,7 @@ folerecord_to_h(VALUE self)
* End Function
* End Class
*
- * then, the result of WIN32OLE_RECORD#typename is the following:
+ * then, the result of WIN32OLE::Record#typename is the following:
*
* require 'win32ole'
* obj = WIN32OLE.new('ComServer.ComClass')
@@ -423,7 +423,7 @@ olerecord_ivar_set(VALUE self, VALUE name, VALUE val)
/*
* call-seq:
- * WIN32OLE_RECORD#method_missing(name)
+ * method_missing(name)
*
* Returns value specified by the member name of VT_RECORD OLE variable.
* Or sets value specified by the member name of VT_RECORD OLE variable.
@@ -443,7 +443,7 @@ olerecord_ivar_set(VALUE self, VALUE name, VALUE val)
* Then getting/setting value from Ruby is as the following:
*
* obj = WIN32OLE.new('ComServer.ComClass')
- * book = WIN32OLE_RECORD.new('Book', obj)
+ * book = WIN32OLE::Record.new('Book', obj)
* book.title # => nil ( book.method_missing(:title) is invoked. )
* book.title = "Ruby" # ( book.method_missing(:title=, "Ruby") is invoked. )
*/
@@ -473,7 +473,7 @@ folerecord_method_missing(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * WIN32OLE_RECORD#ole_instance_variable_get(name)
+ * ole_instance_variable_get(name)
*
* Returns value specified by the member name of VT_RECORD OLE object.
* If the member name is not correct, KeyError exception is raised.
@@ -494,7 +494,7 @@ folerecord_method_missing(int argc, VALUE *argv, VALUE self)
* then accessing object_id of ComObject from Ruby is as the following:
*
* srver = WIN32OLE.new('ComServer.ComClass')
- * obj = WIN32OLE_RECORD.new('ComObject', server)
+ * obj = WIN32OLE::Record.new('ComObject', server)
* # obj.object_id returns Ruby Object#object_id
* obj.ole_instance_variable_get(:object_id) # => nil
*
@@ -515,7 +515,7 @@ folerecord_ole_instance_variable_get(VALUE self, VALUE name)
/*
* call-seq:
- * WIN32OLE_RECORD#ole_instance_variable_set(name, val)
+ * ole_instance_variable_set(name, val)
*
* Sets value specified by the member name of VT_RECORD OLE object.
* If the member name is not correct, KeyError exception is raised.
@@ -534,7 +534,7 @@ folerecord_ole_instance_variable_get(VALUE self, VALUE name)
* then setting value of the `title' member is as following:
*
* srver = WIN32OLE.new('ComServer.ComClass')
- * obj = WIN32OLE_RECORD.new('Book', server)
+ * obj = WIN32OLE::Record.new('Book', server)
* obj.ole_instance_variable_set(:title, "The Ruby Book")
*
*/
@@ -554,7 +554,7 @@ folerecord_ole_instance_variable_set(VALUE self, VALUE name, VALUE val)
/*
* call-seq:
- * WIN32OLE_RECORD#inspect -> String
+ * inspect -> String
*
* Returns the OLE struct name and member name and the value of member
*
@@ -570,8 +570,8 @@ folerecord_ole_instance_variable_set(VALUE self, VALUE name, VALUE val)
* then
*
* srver = WIN32OLE.new('ComServer.ComClass')
- * obj = WIN32OLE_RECORD.new('Book', server)
- * obj.inspect # => <WIN32OLE_RECORD(ComClass) {"title" => nil, "cost" => nil}>
+ * obj = WIN32OLE::Record.new('Book', server)
+ * obj.inspect # => <WIN32OLE::Record(ComClass) {"title" => nil, "cost" => nil}>
*
*/
static VALUE
@@ -584,7 +584,7 @@ folerecord_inspect(VALUE self)
tname = rb_inspect(tname);
}
field = rb_inspect(folerecord_to_h(self));
- return rb_sprintf("#<WIN32OLE_RECORD(%"PRIsVALUE") %"PRIsVALUE">",
+ return rb_sprintf("#<WIN32OLE::Record(%"PRIsVALUE") %"PRIsVALUE">",
tname,
field);
}
@@ -594,7 +594,9 @@ VALUE cWIN32OLE_RECORD;
void
Init_win32ole_record(void)
{
- cWIN32OLE_RECORD = rb_define_class("WIN32OLE_RECORD", rb_cObject);
+ cWIN32OLE_RECORD = rb_define_class_under(cWIN32OLE, "Record", rb_cObject);
+ /* Alias of WIN32OLE::Record, for the backward compatibility */
+ rb_define_const(rb_cObject, "WIN32OLE_RECORD", cWIN32OLE_RECORD);
rb_define_alloc_func(cWIN32OLE_RECORD, folerecord_s_allocate);
rb_define_method(cWIN32OLE_RECORD, "initialize", folerecord_initialize, 2);
rb_define_method(cWIN32OLE_RECORD, "to_h", folerecord_to_h, 0);
diff --git a/ext/win32ole/win32ole_type.c b/ext/win32ole/win32ole_type.c
index 48dbc9dbde..45b16d6722 100644
--- a/ext/win32ole/win32ole_type.c
+++ b/ext/win32ole/win32ole_type.c
@@ -54,9 +54,9 @@ static const rb_data_type_t oletype_datatype = {
};
/*
- * Document-class: WIN32OLE_TYPE
+ * Document-class: WIN32OLE::Type
*
- * <code>WIN32OLE_TYPE</code> objects represent OLE type library information.
+ * +WIN32OLE::Type+ objects represent OLE type library information.
*/
static void
@@ -106,10 +106,12 @@ ole_type_from_itypeinfo(ITypeInfo *pTypeInfo)
/*
* call-seq:
- * WIN32OLE_TYPE.ole_classes(typelib)
+ * ole_classes(typelib)
*
- * Returns array of WIN32OLE_TYPE objects defined by the <i>typelib</i> type library.
- * This method will be OBSOLETE. Use WIN32OLE_TYPELIB.new(typelib).ole_classes instead.
+ * Returns array of WIN32OLE::Type objects defined by the <i>typelib</i> type library.
+ *
+ * This method will be OBSOLETE.
+ * Use <code>WIN32OLE::TypeLib.new(typelib).ole_classes</code> instead.
*/
static VALUE
foletype_s_ole_classes(VALUE self, VALUE typelib)
@@ -118,8 +120,8 @@ foletype_s_ole_classes(VALUE self, VALUE typelib)
/*
rb_warn("%s is obsolete; use %s instead.",
- "WIN32OLE_TYPE.ole_classes",
- "WIN32OLE_TYPELIB.new(typelib).ole_types");
+ "WIN32OLE::Type.ole_classes",
+ "WIN32OLE::TypeLib.new(typelib).ole_types");
*/
obj = rb_funcall(cWIN32OLE_TYPELIB, rb_intern("new"), 1, typelib);
return rb_funcall(obj, rb_intern("ole_types"), 0);
@@ -127,10 +129,12 @@ foletype_s_ole_classes(VALUE self, VALUE typelib)
/*
* call-seq:
- * WIN32OLE_TYPE.typelibs
+ * typelibs
*
* Returns array of type libraries.
- * This method will be OBSOLETE. Use WIN32OLE_TYPELIB.typelibs.collect{|t| t.name} instead.
+ *
+ * This method will be OBSOLETE.
+ * Use <code>WIN32OLE::TypeLib.typelibs.collect{|t| t.name}</code> instead.
*
*/
static VALUE
@@ -138,15 +142,15 @@ foletype_s_typelibs(VALUE self)
{
/*
rb_warn("%s is obsolete. use %s instead.",
- "WIN32OLE_TYPE.typelibs",
- "WIN32OLE_TYPELIB.typelibs.collect{t|t.name}");
+ "WIN32OLE::Type.typelibs",
+ "WIN32OLE::TypeLib.typelibs.collect{t|t.name}");
*/
- return rb_eval_string("WIN32OLE_TYPELIB.typelibs.collect{|t|t.name}");
+ return rb_eval_string("WIN32OLE::TypeLib.typelibs.collect{|t|t.name}");
}
/*
* call-seq:
- * WIN32OLE_TYPE.progids
+ * progids
*
* Returns array of ProgID.
*/
@@ -214,7 +218,6 @@ create_win32ole_type(ITypeInfo *pTypeInfo, VALUE name)
static VALUE
oleclass_from_typelib(VALUE self, ITypeLib *pTypeLib, VALUE oleclass)
{
-
long count;
int i;
HRESULT hr;
@@ -245,14 +248,14 @@ oleclass_from_typelib(VALUE self, ITypeLib *pTypeLib, VALUE oleclass)
/*
* call-seq:
- * WIN32OLE_TYPE.new(typelib, ole_class) -> WIN32OLE_TYPE object
+ * new(typelib, ole_class) -> WIN32OLE::Type object
*
- * Returns a new WIN32OLE_TYPE object.
+ * Returns a new WIN32OLE::Type object.
* The first argument <i>typelib</i> specifies OLE type library name.
* The second argument specifies OLE class name.
*
- * WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application')
- * # => WIN32OLE_TYPE object of Application class of Excel.
+ * WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Application')
+ * # => WIN32OLE::Type object of Application class of Excel.
*/
static VALUE
foletype_initialize(VALUE self, VALUE typelib, VALUE oleclass)
@@ -284,10 +287,10 @@ foletype_initialize(VALUE self, VALUE typelib, VALUE oleclass)
/*
* call-seq:
- * WIN32OLE_TYPE#name #=> OLE type name
+ * name #=> OLE type name
*
* Returns OLE type name.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Application')
* puts tobj.name # => Application
*/
static VALUE
@@ -344,10 +347,10 @@ ole_ole_type(ITypeInfo *pTypeInfo)
/*
* call-seq:
- * WIN32OLE_TYPE#ole_type #=> OLE type string.
+ * ole_type #=> OLE type string.
*
* returns type of OLE class.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Application')
* puts tobj.ole_type # => Class
*/
static VALUE
@@ -378,10 +381,10 @@ ole_type_guid(ITypeInfo *pTypeInfo)
/*
* call-seq:
- * WIN32OLE_TYPE#guid #=> GUID
+ * guid #=> GUID
*
* Returns GUID.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Application')
* puts tobj.guid # => {00024500-0000-0000-C000-000000000046}
*/
static VALUE
@@ -412,10 +415,10 @@ ole_type_progid(ITypeInfo *pTypeInfo)
/*
* call-seq:
- * WIN32OLE_TYPE#progid #=> ProgID
+ * progid #=> ProgID
*
* Returns ProgID if it exists. If not found, then returns nil.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Application')
* puts tobj.progid # => Excel.Application.9
*/
static VALUE
@@ -446,10 +449,10 @@ ole_type_visible(ITypeInfo *pTypeInfo)
/*
* call-seq:
- * WIN32OLE_TYPE#visible? #=> true or false
+ * visible? #=> true or false
*
* Returns true if the OLE class is public.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Application')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Application')
* puts tobj.visible # => true
*/
static VALUE
@@ -475,10 +478,10 @@ ole_type_major_version(ITypeInfo *pTypeInfo)
/*
* call-seq:
- * WIN32OLE_TYPE#major_version
+ * major_version
*
* Returns major version.
- * tobj = WIN32OLE_TYPE.new('Microsoft Word 10.0 Object Library', 'Documents')
+ * tobj = WIN32OLE::Type.new('Microsoft Word 10.0 Object Library', 'Documents')
* puts tobj.major_version # => 8
*/
static VALUE
@@ -504,10 +507,10 @@ ole_type_minor_version(ITypeInfo *pTypeInfo)
/*
* call-seq:
- * WIN32OLE_TYPE#minor_version #=> OLE minor version
+ * minor_version #=> OLE minor version
*
* Returns minor version.
- * tobj = WIN32OLE_TYPE.new('Microsoft Word 10.0 Object Library', 'Documents')
+ * tobj = WIN32OLE::Type.new('Microsoft Word 10.0 Object Library', 'Documents')
* puts tobj.minor_version # => 2
*/
static VALUE
@@ -533,10 +536,10 @@ ole_type_typekind(ITypeInfo *pTypeInfo)
/*
* call-seq:
- * WIN32OLE_TYPE#typekind #=> number of type.
+ * typekind #=> number of type.
*
* Returns number which represents type.
- * tobj = WIN32OLE_TYPE.new('Microsoft Word 10.0 Object Library', 'Documents')
+ * tobj = WIN32OLE::Type.new('Microsoft Word 10.0 Object Library', 'Documents')
* puts tobj.typekind # => 4
*
*/
@@ -561,10 +564,10 @@ ole_type_helpstring(ITypeInfo *pTypeInfo)
/*
* call-seq:
- * WIN32OLE_TYPE#helpstring #=> help string.
+ * helpstring #=> help string.
*
* Returns help string.
- * tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'IWebBrowser')
+ * tobj = WIN32OLE::Type.new('Microsoft Internet Controls', 'IWebBrowser')
* puts tobj.helpstring # => Web Browser interface
*/
static VALUE
@@ -594,10 +597,10 @@ ole_type_src_type(ITypeInfo *pTypeInfo)
/*
* call-seq:
- * WIN32OLE_TYPE#src_type #=> OLE source class
+ * src_type #=> OLE source class
*
* Returns source class when the OLE class is 'Alias'.
- * tobj = WIN32OLE_TYPE.new('Microsoft Office 9.0 Object Library', 'MsoRGBType')
+ * tobj = WIN32OLE::Type.new('Microsoft Office 9.0 Object Library', 'MsoRGBType')
* puts tobj.src_type # => I4
*
*/
@@ -622,10 +625,10 @@ ole_type_helpfile(ITypeInfo *pTypeInfo)
/*
* call-seq:
- * WIN32OLE_TYPE#helpfile
+ * helpfile
*
* Returns helpfile path. If helpfile is not found, then returns nil.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Worksheet')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Worksheet')
* puts tobj.helpfile # => C:\...\VBAXL9.CHM
*
*/
@@ -650,10 +653,10 @@ ole_type_helpcontext(ITypeInfo *pTypeInfo)
/*
* call-seq:
- * WIN32OLE_TYPE#helpcontext
+ * helpcontext
*
* Returns helpcontext. If helpcontext is not found, then returns nil.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Worksheet')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Worksheet')
* puts tobj.helpfile # => 131185
*/
static VALUE
@@ -701,11 +704,11 @@ ole_variables(ITypeInfo *pTypeInfo)
/*
* call-seq:
- * WIN32OLE_TYPE#variables
+ * variables
*
- * Returns array of WIN32OLE_VARIABLE objects which represent variables
+ * Returns array of WIN32OLE::Variable objects which represent variables
* defined in OLE class.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
* vars = tobj.variables
* vars.each do |v|
* puts "#{v.name} = #{v.value}"
@@ -728,11 +731,11 @@ foletype_variables(VALUE self)
/*
* call-seq:
- * WIN32OLE_TYPE#ole_methods # the array of WIN32OLE_METHOD objects.
+ * ole_methods # the array of WIN32OLE::Method objects.
*
- * Returns array of WIN32OLE_METHOD objects which represent OLE method defined in
+ * Returns array of WIN32OLE::Method objects which represent OLE method defined in
* OLE type library.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Worksheet')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Worksheet')
* methods = tobj.ole_methods.collect{|m|
* m.name
* }
@@ -747,11 +750,11 @@ foletype_methods(VALUE self)
/*
* call-seq:
- * WIN32OLE_TYPE#ole_typelib
+ * ole_typelib
*
- * Returns the WIN32OLE_TYPELIB object which is including the WIN32OLE_TYPE
+ * Returns the WIN32OLE::TypeLib object which is including the WIN32OLE::Type
* object. If it is not found, then returns nil.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Worksheet')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Worksheet')
* puts tobj.ole_typelib # => 'Microsoft Excel 9.0 Object Library'
*/
static VALUE
@@ -804,11 +807,11 @@ ole_type_impl_ole_types(ITypeInfo *pTypeInfo, int implflags)
/*
* call-seq:
- * WIN32OLE_TYPE#implemented_ole_types
+ * implemented_ole_types
*
- * Returns the array of WIN32OLE_TYPE object which is implemented by the WIN32OLE_TYPE
+ * Returns the array of WIN32OLE::Type object which is implemented by the WIN32OLE::Type
* object.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Worksheet')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Worksheet')
* p tobj.implemented_ole_types # => [_Worksheet, DocEvents]
*/
static VALUE
@@ -820,13 +823,13 @@ foletype_impl_ole_types(VALUE self)
/*
* call-seq:
- * WIN32OLE_TYPE#source_ole_types
+ * source_ole_types
*
- * Returns the array of WIN32OLE_TYPE object which is implemented by the WIN32OLE_TYPE
+ * Returns the array of WIN32OLE::Type object which is implemented by the WIN32OLE::Type
* object and having IMPLTYPEFLAG_FSOURCE.
- * tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', "InternetExplorer")
+ * tobj = WIN32OLE::Type.new('Microsoft Internet Controls', "InternetExplorer")
* p tobj.source_ole_types
- * # => [#<WIN32OLE_TYPE:DWebBrowserEvents2>, #<WIN32OLE_TYPE:DWebBrowserEvents>]
+ * # => [#<WIN32OLE::Type:DWebBrowserEvents2>, #<WIN32OLE::Type:DWebBrowserEvents>]
*/
static VALUE
foletype_source_ole_types(VALUE self)
@@ -837,12 +840,12 @@ foletype_source_ole_types(VALUE self)
/*
* call-seq:
- * WIN32OLE_TYPE#default_event_sources
+ * default_event_sources
*
- * Returns the array of WIN32OLE_TYPE object which is implemented by the WIN32OLE_TYPE
+ * Returns the array of WIN32OLE::Type object which is implemented by the WIN32OLE::Type
* object and having IMPLTYPEFLAG_FSOURCE and IMPLTYPEFLAG_FDEFAULT.
- * tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', "InternetExplorer")
- * p tobj.default_event_sources # => [#<WIN32OLE_TYPE:DWebBrowserEvents2>]
+ * tobj = WIN32OLE::Type.new('Microsoft Internet Controls', "InternetExplorer")
+ * p tobj.default_event_sources # => [#<WIN32OLE::Type:DWebBrowserEvents2>]
*/
static VALUE
foletype_default_event_sources(VALUE self)
@@ -853,13 +856,13 @@ foletype_default_event_sources(VALUE self)
/*
* call-seq:
- * WIN32OLE_TYPE#default_ole_types
+ * default_ole_types
*
- * Returns the array of WIN32OLE_TYPE object which is implemented by the WIN32OLE_TYPE
+ * Returns the array of WIN32OLE::Type object which is implemented by the WIN32OLE::Type
* object and having IMPLTYPEFLAG_FDEFAULT.
- * tobj = WIN32OLE_TYPE.new('Microsoft Internet Controls', "InternetExplorer")
+ * tobj = WIN32OLE::Type.new('Microsoft Internet Controls', "InternetExplorer")
* p tobj.default_ole_types
- * # => [#<WIN32OLE_TYPE:IWebBrowser2>, #<WIN32OLE_TYPE:DWebBrowserEvents2>]
+ * # => [#<WIN32OLE::Type:IWebBrowser2>, #<WIN32OLE::Type:DWebBrowserEvents2>]
*/
static VALUE
foletype_default_ole_types(VALUE self)
@@ -870,24 +873,26 @@ foletype_default_ole_types(VALUE self)
/*
* call-seq:
- * WIN32OLE_TYPE#inspect -> String
+ * inspect -> String
*
* Returns the type name with class name.
*
* ie = WIN32OLE.new('InternetExplorer.Application')
- * ie.ole_type.inspect => #<WIN32OLE_TYPE:IWebBrowser2>
+ * ie.ole_type.inspect => #<WIN32OLE::Type:IWebBrowser2>
*/
static VALUE
foletype_inspect(VALUE self)
{
- return default_inspect(self, "WIN32OLE_TYPE");
+ return default_inspect(self, "WIN32OLE::Type");
}
VALUE cWIN32OLE_TYPE;
void Init_win32ole_type(void)
{
- cWIN32OLE_TYPE = rb_define_class("WIN32OLE_TYPE", rb_cObject);
+ cWIN32OLE_TYPE = rb_define_class_under(cWIN32OLE, "Type", rb_cObject);
+ /* Alias of WIN32OLE::Type, for the backward compatibility */
+ rb_define_const(rb_cObject, "WIN32OLE_TYPE", cWIN32OLE_TYPE);
rb_define_singleton_method(cWIN32OLE_TYPE, "ole_classes", foletype_s_ole_classes, 1);
rb_define_singleton_method(cWIN32OLE_TYPE, "typelibs", foletype_s_typelibs, 0);
rb_define_singleton_method(cWIN32OLE_TYPE, "progids", foletype_s_progids, 0);
diff --git a/ext/win32ole/win32ole_typelib.c b/ext/win32ole/win32ole_typelib.c
index d89f181e07..e5eda07e76 100644
--- a/ext/win32ole/win32ole_typelib.c
+++ b/ext/win32ole/win32ole_typelib.c
@@ -127,19 +127,19 @@ ole_typelib_from_itypeinfo(ITypeInfo *pTypeInfo)
}
/*
- * Document-class: WIN32OLE_TYPELIB
+ * Document-class: WIN32OLE::TypeLib
*
- * <code>WIN32OLE_TYPELIB</code> objects represent OLE tyblib information.
+ * +WIN32OLE::TypeLib+ objects represent OLE tyblib information.
*/
/*
* call-seq:
*
- * WIN32OLE_TYPELIB.typelibs
+ * typelibs
*
- * Returns the array of WIN32OLE_TYPELIB object.
+ * Returns the array of WIN32OLE::TypeLib object.
*
- * tlibs = WIN32OLE_TYPELIB.typelibs
+ * tlibs = WIN32OLE::TypeLib.typelibs
*
*/
static VALUE
@@ -285,7 +285,7 @@ oletypelib_get_libattr(ITypeLib *pTypeLib, TLIBATTR **ppTLibAttr)
hr = pTypeLib->lpVtbl->GetLibAttr(pTypeLib, ppTLibAttr);
if (FAILED(hr)) {
ole_raise(hr, eWIN32OLERuntimeError,
- "failed to get library attribute(TLIBATTR) from ITypeLib");
+ "failed to get library attribute(TLIBATTR) from ITypeLib");
}
}
@@ -364,9 +364,9 @@ oletypelib_search_registry2(VALUE self, VALUE args)
/*
* call-seq:
- * WIN32OLE_TYPELIB.new(typelib [, version1, version2]) -> WIN32OLE_TYPELIB object
+ * new(typelib [, version1, version2]) -> WIN32OLE::TypeLib object
*
- * Returns a new WIN32OLE_TYPELIB object.
+ * Returns a new WIN32OLE::TypeLib object.
*
* The first argument <i>typelib</i> specifies OLE type library name or GUID or
* OLE library file.
@@ -376,11 +376,11 @@ oletypelib_search_registry2(VALUE self, VALUE args)
* If the first argument is type library name, then the second and third argument
* are ignored.
*
- * tlib1 = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
- * tlib2 = WIN32OLE_TYPELIB.new('{00020813-0000-0000-C000-000000000046}')
- * tlib3 = WIN32OLE_TYPELIB.new('{00020813-0000-0000-C000-000000000046}', 1.3)
- * tlib4 = WIN32OLE_TYPELIB.new('{00020813-0000-0000-C000-000000000046}', 1, 3)
- * tlib5 = WIN32OLE_TYPELIB.new("C:\\WINNT\\SYSTEM32\\SHELL32.DLL")
+ * tlib1 = WIN32OLE::TypeLib.new('Microsoft Excel 9.0 Object Library')
+ * tlib2 = WIN32OLE::TypeLib.new('{00020813-0000-0000-C000-000000000046}')
+ * tlib3 = WIN32OLE::TypeLib.new('{00020813-0000-0000-C000-000000000046}', 1.3)
+ * tlib4 = WIN32OLE::TypeLib.new('{00020813-0000-0000-C000-000000000046}', 1, 3)
+ * tlib5 = WIN32OLE::TypeLib.new("C:\\WINNT\\SYSTEM32\\SHELL32.DLL")
* puts tlib1.name # -> 'Microsoft Excel 9.0 Object Library'
* puts tlib2.name # -> 'Microsoft Excel 9.0 Object Library'
* puts tlib3.name # -> 'Microsoft Excel 9.0 Object Library'
@@ -428,11 +428,11 @@ foletypelib_initialize(VALUE self, VALUE args)
/*
* call-seq:
- * WIN32OLE_TYPELIB#guid -> The guid string.
+ * guid -> The guid string.
*
* Returns guid string which specifies type library.
*
- * tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
+ * tlib = WIN32OLE::TypeLib.new('Microsoft Excel 9.0 Object Library')
* guid = tlib.guid # -> '{00020813-0000-0000-C000-000000000046}'
*/
static VALUE
@@ -456,11 +456,11 @@ foletypelib_guid(VALUE self)
/*
* call-seq:
- * WIN32OLE_TYPELIB#name -> The type library name
+ * name -> The type library name
*
* Returns the type library name.
*
- * tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
+ * tlib = WIN32OLE::TypeLib.new('Microsoft Excel 9.0 Object Library')
* name = tlib.name # -> 'Microsoft Excel 9.0 Object Library'
*/
static VALUE
@@ -500,11 +500,11 @@ make_version_str(VALUE major, VALUE minor)
/*
* call-seq:
- * WIN32OLE_TYPELIB#version -> The type library version String object.
+ * version -> The type library version String object.
*
* Returns the type library version.
*
- * tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
+ * tlib = WIN32OLE::TypeLib.new('Microsoft Excel 9.0 Object Library')
* puts tlib.version #-> "1.3"
*/
static VALUE
@@ -523,11 +523,11 @@ foletypelib_version(VALUE self)
/*
* call-seq:
- * WIN32OLE_TYPELIB#major_version -> The type library major version.
+ * major_version -> The type library major version.
*
* Returns the type library major version.
*
- * tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
+ * tlib = WIN32OLE::TypeLib.new('Microsoft Excel 9.0 Object Library')
* puts tlib.major_version # -> 1
*/
static VALUE
@@ -546,11 +546,11 @@ foletypelib_major_version(VALUE self)
/*
* call-seq:
- * WIN32OLE_TYPELIB#minor_version -> The type library minor version.
+ * minor_version -> The type library minor version.
*
* Returns the type library minor version.
*
- * tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
+ * tlib = WIN32OLE::TypeLib.new('Microsoft Excel 9.0 Object Library')
* puts tlib.minor_version # -> 3
*/
static VALUE
@@ -568,11 +568,11 @@ foletypelib_minor_version(VALUE self)
/*
* call-seq:
- * WIN32OLE_TYPELIB#path -> The type library file path.
+ * path -> The type library file path.
*
* Returns the type library file path.
*
- * tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
+ * tlib = WIN32OLE::TypeLib.new('Microsoft Excel 9.0 Object Library')
* puts tlib.path #-> 'C:\...\EXCEL9.OLB'
*/
static VALUE
@@ -588,13 +588,13 @@ foletypelib_path(VALUE self)
pTypeLib = itypelib(self);
oletypelib_get_libattr(pTypeLib, &pTLibAttr);
hr = QueryPathOfRegTypeLib(&pTLibAttr->guid,
- pTLibAttr->wMajorVerNum,
- pTLibAttr->wMinorVerNum,
- lcid,
- &bstr);
+ pTLibAttr->wMajorVerNum,
+ pTLibAttr->wMinorVerNum,
+ lcid,
+ &bstr);
if (FAILED(hr)) {
- pTypeLib->lpVtbl->ReleaseTLibAttr(pTypeLib, pTLibAttr);
- ole_raise(hr, eWIN32OLERuntimeError, "failed to QueryPathOfRegTypeTypeLib");
+ pTypeLib->lpVtbl->ReleaseTLibAttr(pTypeLib, pTLibAttr);
+ ole_raise(hr, eWIN32OLERuntimeError, "failed to QueryPathOfRegTypeTypeLib");
}
pTypeLib->lpVtbl->ReleaseTLibAttr(pTypeLib, pTLibAttr);
@@ -604,15 +604,15 @@ foletypelib_path(VALUE self)
/*
* call-seq:
- * WIN32OLE_TYPELIB#visible?
+ * visible?
*
* Returns true if the type library information is not hidden.
* If wLibFlags of TLIBATTR is 0 or LIBFLAG_FRESTRICTED or LIBFLAG_FHIDDEN,
* the method returns false, otherwise, returns true.
* If the method fails to access the TLIBATTR information, then
- * WIN32OLERuntimeError is raised.
+ * WIN32OLE::RuntimeError is raised.
*
- * tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
+ * tlib = WIN32OLE::TypeLib.new('Microsoft Excel 9.0 Object Library')
* tlib.visible? # => true
*/
static VALUE
@@ -636,12 +636,12 @@ foletypelib_visible(VALUE self)
/*
* call-seq:
- * WIN32OLE_TYPELIB#library_name
+ * library_name
*
* Returns library name.
- * If the method fails to access library name, WIN32OLERuntimeError is raised.
+ * If the method fails to access library name, WIN32OLE::RuntimeError is raised.
*
- * tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
+ * tlib = WIN32OLE::TypeLib.new('Microsoft Excel 9.0 Object Library')
* tlib.library_name # => Excel
*/
static VALUE
@@ -722,7 +722,7 @@ typelib_file_from_typelib(VALUE ole)
if (ver == Qnil)
break;
err = reg_open_vkey(hclsid, ver, &hversion);
- if (err != ERROR_SUCCESS || fver > atof(StringValuePtr(ver)))
+ if (err != ERROR_SUCCESS || fver > atof(StringValuePtr(ver)))
continue;
fver = atof(StringValuePtr(ver));
typelib = reg_get_val(hversion, NULL);
@@ -790,11 +790,11 @@ typelib_file(VALUE ole)
/*
* call-seq:
- * WIN32OLE_TYPELIB#ole_types -> The array of WIN32OLE_TYPE object included the type library.
+ * ole_types -> The array of WIN32OLE::Type object included the type library.
*
* Returns the type library file path.
*
- * tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
+ * tlib = WIN32OLE::TypeLib.new('Microsoft Excel 9.0 Object Library')
* classes = tlib.ole_types.collect{|k| k.name} # -> ['AddIn', 'AddIns' ...]
*/
static VALUE
@@ -809,17 +809,17 @@ foletypelib_ole_types(VALUE self)
/*
* call-seq:
- * WIN32OLE_TYPELIB#inspect -> String
+ * inspect -> String
*
* Returns the type library name with class name.
*
- * tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
- * tlib.inspect # => "<#WIN32OLE_TYPELIB:Microsoft Excel 9.0 Object Library>"
+ * tlib = WIN32OLE::TypeLib.new('Microsoft Excel 9.0 Object Library')
+ * tlib.inspect # => "<#WIN32OLE::TypeLib:Microsoft Excel 9.0 Object Library>"
*/
static VALUE
foletypelib_inspect(VALUE self)
{
- return default_inspect(self, "WIN32OLE_TYPELIB");
+ return default_inspect(self, "WIN32OLE::TypeLib");
}
VALUE cWIN32OLE_TYPELIB;
@@ -827,7 +827,9 @@ VALUE cWIN32OLE_TYPELIB;
void
Init_win32ole_typelib(void)
{
- cWIN32OLE_TYPELIB = rb_define_class("WIN32OLE_TYPELIB", rb_cObject);
+ cWIN32OLE_TYPELIB = rb_define_class_under(cWIN32OLE, "TypeLib", rb_cObject);
+ /* Alias of WIN32OLE::TypeLib, for the backward compatibility */
+ rb_define_const(rb_cObject, "WIN32OLE_TYPELIB", cWIN32OLE_TYPELIB);
rb_define_singleton_method(cWIN32OLE_TYPELIB, "typelibs", foletypelib_s_typelibs, 0);
rb_define_alloc_func(cWIN32OLE_TYPELIB, foletypelib_s_allocate);
rb_define_method(cWIN32OLE_TYPELIB, "initialize", foletypelib_initialize, -2);
diff --git a/ext/win32ole/win32ole_variable.c b/ext/win32ole/win32ole_variable.c
index 803083156c..34435301d4 100644
--- a/ext/win32ole/win32ole_variable.c
+++ b/ext/win32ole/win32ole_variable.c
@@ -43,9 +43,9 @@ olevariable_size(const void *ptr)
}
/*
- * Document-class: WIN32OLE_VARIABLE
+ * Document-class: WIN32OLE::Variable
*
- * <code>WIN32OLE_VARIABLE</code> objects represent OLE variable information.
+ * +WIN32OLE::Variable+ objects represent OLE variable information.
*/
VALUE
@@ -63,11 +63,11 @@ create_win32ole_variable(ITypeInfo *pTypeInfo, UINT index, VALUE name)
/*
* call-seq:
- * WIN32OLE_VARIABLE#name
+ * name
*
* Returns the name of variable.
*
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
* variables = tobj.variables
* variables.each do |variable|
* puts "#{variable.name}"
@@ -103,11 +103,11 @@ ole_variable_ole_type(ITypeInfo *pTypeInfo, UINT var_index)
/*
* call-seq:
- * WIN32OLE_VARIABLE#ole_type
+ * ole_type
*
* Returns OLE type string.
*
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
* variables = tobj.variables
* variables.each do |variable|
* puts "#{variable.ole_type} #{variable.name}"
@@ -145,11 +145,11 @@ ole_variable_ole_type_detail(ITypeInfo *pTypeInfo, UINT var_index)
/*
* call-seq:
- * WIN32OLE_VARIABLE#ole_type_detail
+ * ole_type_detail
*
* Returns detail information of type. The information is array of type.
*
- * tobj = WIN32OLE_TYPE.new('DirectX 7 for Visual Basic Type Library', 'D3DCLIPSTATUS')
+ * tobj = WIN32OLE::Type.new('DirectX 7 for Visual Basic Type Library', 'D3DCLIPSTATUS')
* variable = tobj.variables.find {|variable| variable.name == 'lFlags'}
* tdetail = variable.ole_type_detail
* p tdetail # => ["USERDEFINED", "CONST_D3DCLIPSTATUSFLAGS"]
@@ -180,12 +180,12 @@ ole_variable_value(ITypeInfo *pTypeInfo, UINT var_index)
/*
* call-seq:
- * WIN32OLE_VARIABLE#value
+ * value
*
* Returns value if value is exists. If the value does not exist,
* this method returns nil.
*
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
* variables = tobj.variables
* variables.each do |variable|
* puts "#{variable.name} #{variable.value}"
@@ -227,11 +227,11 @@ ole_variable_visible(ITypeInfo *pTypeInfo, UINT var_index)
/*
* call-seq:
- * WIN32OLE_VARIABLE#visible?
+ * visible?
*
* Returns true if the variable is public.
*
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
* variables = tobj.variables
* variables.each do |variable|
* puts "#{variable.name} #{variable.visible?}"
@@ -284,11 +284,11 @@ ole_variable_kind(ITypeInfo *pTypeInfo, UINT var_index)
/*
* call-seq:
- * WIN32OLE_VARIABLE#variable_kind
+ * variable_kind
*
* Returns variable kind string.
*
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
* variables = tobj.variables
* variables.each do |variable|
* puts "#{variable.name} #{variable.variable_kind}"
@@ -325,10 +325,10 @@ ole_variable_varkind(ITypeInfo *pTypeInfo, UINT var_index)
/*
* call-seq:
- * WIN32OLE_VARIABLE#varkind
+ * varkind
*
* Returns the number which represents variable kind.
- * tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
+ * tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
* variables = tobj.variables
* variables.each do |variable|
* puts "#{variable.name} #{variable.varkind}"
@@ -351,7 +351,7 @@ folevariable_varkind(VALUE self)
/*
* call-seq:
- * WIN32OLE_VARIABLE#inspect -> String
+ * inspect -> String
*
* Returns the OLE variable name and the value with class name.
*
@@ -362,14 +362,17 @@ folevariable_inspect(VALUE self)
VALUE v = rb_inspect(folevariable_value(self));
VALUE n = folevariable_name(self);
VALUE detail = rb_sprintf("%"PRIsVALUE"=%"PRIsVALUE, n, v);
- return make_inspect("WIN32OLE_VARIABLE", detail);
+ return make_inspect("WIN32OLE::Variable", detail);
}
VALUE cWIN32OLE_VARIABLE;
void Init_win32ole_variable(void)
{
- cWIN32OLE_VARIABLE = rb_define_class("WIN32OLE_VARIABLE", rb_cObject);
+ cWIN32OLE_VARIABLE = rb_define_class_under(cWIN32OLE, "Variable", rb_cObject);
+ /* Alias of WIN32OLE::Variable, for the backward compatibility */
+ rb_define_const(rb_cObject, "WIN32OLE_VARIABLE", cWIN32OLE_VARIABLE);
+ rb_undef_alloc_func(cWIN32OLE_VARIABLE);
rb_define_method(cWIN32OLE_VARIABLE, "name", folevariable_name, 0);
rb_define_method(cWIN32OLE_VARIABLE, "ole_type", folevariable_ole_type, 0);
rb_define_method(cWIN32OLE_VARIABLE, "ole_type_detail", folevariable_ole_type_detail, 0);
diff --git a/ext/win32ole/win32ole_variant.c b/ext/win32ole/win32ole_variant.c
index 0953fc324c..45c70b1dc3 100644
--- a/ext/win32ole/win32ole_variant.c
+++ b/ext/win32ole/win32ole_variant.c
@@ -267,7 +267,7 @@ folevariant_s_allocate(VALUE klass)
/*
* call-seq:
- * WIN32OLE_VARIANT.array(ary, vt)
+ * array(ary, vt)
*
* Returns Ruby object wrapping OLE variant whose variant type is VT_ARRAY.
* The first argument should be Array object which specifies dimensions
@@ -277,7 +277,7 @@ folevariant_s_allocate(VALUE klass)
* The following create 2 dimensions OLE array. The first dimensions size
* is 3, and the second is 4.
*
- * ole_ary = WIN32OLE_VARIANT.array([3,4], VT_I4)
+ * ole_ary = WIN32OLE::Variant.array([3,4], VT_I4)
* ruby_ary = ole_ary.value # => [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]
*
*/
@@ -357,44 +357,44 @@ check_type_val2variant(VALUE val)
case T_NIL:
break;
default:
- rb_raise(rb_eTypeError, "can not convert WIN32OLE_VARIANT from type %s",
+ rb_raise(rb_eTypeError, "can not convert WIN32OLE::Variant from type %s",
rb_obj_classname(val));
}
}
}
/*
- * Document-class: WIN32OLE_VARIANT
+ * Document-class: WIN32OLE::Variant
*
- * <code>WIN32OLE_VARIANT</code> objects represents OLE variant.
+ * +WIN32OLE::Variant+ objects represents OLE variant.
*
* Win32OLE converts Ruby object into OLE variant automatically when
* invoking OLE methods. If OLE method requires the argument which is
* different from the variant by automatic conversion of Win32OLE, you
- * can convert the specified variant type by using WIN32OLE_VARIANT class.
+ * can convert the specified variant type by using WIN32OLE::Variant class.
*
- * param = WIN32OLE_VARIANT.new(10, WIN32OLE::VARIANT::VT_R4)
+ * param = WIN32OLE::Variant.new(10, WIN32OLE::VARIANT::VT_R4)
* oleobj.method(param)
*
- * WIN32OLE_VARIANT does not support VT_RECORD variant. Use WIN32OLE_RECORD
- * class instead of WIN32OLE_VARIANT if the VT_RECORD variant is needed.
+ * WIN32OLE::Variant does not support VT_RECORD variant. Use WIN32OLE::Record
+ * class instead of WIN32OLE::Variant if the VT_RECORD variant is needed.
*/
/*
* call-seq:
- * WIN32OLE_VARIANT.new(val, vartype) #=> WIN32OLE_VARIANT object.
+ * new(val, vartype) #=> WIN32OLE::Variant object.
*
* Returns Ruby object wrapping OLE variant.
* The first argument specifies Ruby object to convert OLE variant variable.
* The second argument specifies VARIANT type.
- * In some situation, you need the WIN32OLE_VARIANT object to pass OLE method
+ * In some situation, you need the WIN32OLE::Variant object to pass OLE method
*
* shell = WIN32OLE.new("Shell.Application")
* folder = shell.NameSpace("C:\\Windows")
* item = folder.ParseName("tmp.txt")
* # You can't use Ruby String object to call FolderItem.InvokeVerb.
- * # Instead, you have to use WIN32OLE_VARIANT object to call the method.
- * shortcut = WIN32OLE_VARIANT.new("Create Shortcut(\&S)")
+ * # Instead, you have to use WIN32OLE::Variant object to call the method.
+ * shortcut = WIN32OLE::Variant.new("Create Shortcut(\&S)")
* item.invokeVerb(shortcut)
*
*/
@@ -422,7 +422,7 @@ folevariant_initialize(VALUE self, VALUE args)
vvt = rb_ary_entry(args, 1);
vt = RB_NUM2INT(vvt);
if ((vt & VT_TYPEMASK) == VT_RECORD) {
- rb_raise(rb_eArgError, "not supported VT_RECORD WIN32OLE_VARIANT object");
+ rb_raise(rb_eArgError, "not supported VT_RECORD WIN32OLE::Variant object");
}
ole_val2olevariantdata(val, vt, pvar);
}
@@ -482,22 +482,22 @@ unlock_safe_array(SAFEARRAY *psa)
/*
* call-seq:
- * WIN32OLE_VARIANT[i,j,...] #=> element of OLE array.
+ * variant[i,j,...] #=> element of OLE array.
*
- * Returns the element of WIN32OLE_VARIANT object(OLE array).
+ * Returns the element of WIN32OLE::Variant object(OLE array).
* This method is available only when the variant type of
- * WIN32OLE_VARIANT object is VT_ARRAY.
+ * WIN32OLE::Variant object is VT_ARRAY.
*
* REMARK:
* The all indices should be 0 or natural number and
* lower than or equal to max indices.
* (This point is different with Ruby Array indices.)
*
- * obj = WIN32OLE_VARIANT.new([[1,2,3],[4,5,6]])
+ * obj = WIN32OLE::Variant.new([[1,2,3],[4,5,6]])
* p obj[0,0] # => 1
* p obj[1,0] # => 4
- * p obj[2,0] # => WIN32OLERuntimeError
- * p obj[0, -1] # => WIN32OLERuntimeError
+ * p obj[2,0] # => WIN32OLE::RuntimeError
+ * p obj[0, -1] # => WIN32OLE::RuntimeError
*
*/
static VALUE
@@ -537,23 +537,23 @@ folevariant_ary_aref(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * WIN32OLE_VARIANT[i,j,...] = val #=> set the element of OLE array
+ * variant[i,j,...] = val #=> set the element of OLE array
*
- * Set the element of WIN32OLE_VARIANT object(OLE array) to val.
+ * Set the element of WIN32OLE::Variant object(OLE array) to val.
* This method is available only when the variant type of
- * WIN32OLE_VARIANT object is VT_ARRAY.
+ * WIN32OLE::Variant object is VT_ARRAY.
*
* REMARK:
* The all indices should be 0 or natural number and
* lower than or equal to max indices.
* (This point is different with Ruby Array indices.)
*
- * obj = WIN32OLE_VARIANT.new([[1,2,3],[4,5,6]])
+ * obj = WIN32OLE::Variant.new([[1,2,3],[4,5,6]])
* obj[0,0] = 7
* obj[1,0] = 8
* p obj.value # => [[7,2,3], [8,5,6]]
- * obj[2,0] = 9 # => WIN32OLERuntimeError
- * obj[0, -1] = 9 # => WIN32OLERuntimeError
+ * obj[2,0] = 9 # => WIN32OLE::RuntimeError
+ * obj[0, -1] = 9 # => WIN32OLE::RuntimeError
*
*/
static VALUE
@@ -598,10 +598,10 @@ folevariant_ary_aset(int argc, VALUE *argv, VALUE self)
/*
* call-seq:
- * WIN32OLE_VARIANT.value #=> Ruby object.
+ * value #=> Ruby object.
*
* Returns Ruby object value from OLE variant.
- * obj = WIN32OLE_VARIANT.new(1, WIN32OLE::VARIANT::VT_BSTR)
+ * obj = WIN32OLE::Variant.new(1, WIN32OLE::VARIANT::VT_BSTR)
* obj.value # => "1" (not Integer object, but String object "1")
*
*/
@@ -637,10 +637,10 @@ folevariant_value(VALUE self)
/*
* call-seq:
- * WIN32OLE_VARIANT.vartype #=> OLE variant type.
+ * vartype #=> OLE variant type.
*
* Returns OLE variant type.
- * obj = WIN32OLE_VARIANT.new("string")
+ * obj = WIN32OLE::Variant.new("string")
* obj.vartype # => WIN32OLE::VARIANT::VT_BSTR
*
*/
@@ -654,7 +654,7 @@ folevariant_vartype(VALUE self)
/*
* call-seq:
- * WIN32OLE_VARIANT.value = val #=> set WIN32OLE_VARIANT value to val.
+ * variant.value = val #=> set WIN32OLE::Variant value to val.
*
* Sets variant value to val. If the val type does not match variant value
* type(vartype), then val is changed to match variant value type(vartype)
@@ -662,7 +662,7 @@ folevariant_vartype(VALUE self)
* This method is not available when vartype is VT_ARRAY(except VT_UI1|VT_ARRAY).
* If the vartype is VT_UI1|VT_ARRAY, the val should be String object.
*
- * obj = WIN32OLE_VARIANT.new(1) # obj.vartype is WIN32OLE::VARIANT::VT_I4
+ * obj = WIN32OLE::Variant.new(1) # obj.vartype is WIN32OLE::VARIANT::VT_I4
* obj.value = 3.2 # 3.2 is changed to 3 when setting value.
* p obj.value # => 3
*/
@@ -695,7 +695,9 @@ void
Init_win32ole_variant(void)
{
#undef rb_intern
- cWIN32OLE_VARIANT = rb_define_class("WIN32OLE_VARIANT", rb_cObject);
+ cWIN32OLE_VARIANT = rb_define_class_under(cWIN32OLE, "Variant", rb_cObject);
+ /* Alias of WIN32OLE::Variant, for the backward compatibility */
+ rb_define_const(rb_cObject, "WIN32OLE_VARIANT", cWIN32OLE_VARIANT);
rb_define_alloc_func(cWIN32OLE_VARIANT, folevariant_s_allocate);
rb_define_singleton_method(cWIN32OLE_VARIANT, "array", folevariant_s_array, 2);
rb_define_method(cWIN32OLE_VARIANT, "initialize", folevariant_initialize, -2);
@@ -728,7 +730,7 @@ Init_win32ole_variant(void)
* This constants is used for not specified parameter.
*
* fso = WIN32OLE.new("Scripting.FileSystemObject")
- * fso.openTextFile(filename, WIN32OLE_VARIANT::NoParam, false)
+ * fso.openTextFile(filename, WIN32OLE::Variant::NoParam, false)
*/
rb_define_const(cWIN32OLE_VARIANT, "NoParam",
rb_funcall(cWIN32OLE_VARIANT, rb_intern("new"), 2, INT2NUM(DISP_E_PARAMNOTFOUND), RB_INT2FIX(VT_ERROR)));
diff --git a/ext/win32ole/win32ole_variant_m.c b/ext/win32ole/win32ole_variant_m.c
index c285a00177..d879506be3 100644
--- a/ext/win32ole/win32ole_variant_m.c
+++ b/ext/win32ole/win32ole_variant_m.c
@@ -5,16 +5,18 @@ VALUE mWIN32OLE_VARIANT;
void Init_win32ole_variant_m(void)
{
/*
- * Document-module: WIN32OLE::VARIANT
+ * Document-module: WIN32OLE::VariantType
*
- * The WIN32OLE::VARIANT module includes constants of VARIANT type constants.
- * The constants is used when creating WIN32OLE_VARIANT object.
+ * The +WIN32OLE::VariantType+ module includes constants of VARIANT type constants.
+ * The constants is used when creating WIN32OLE::Variant object.
*
- * obj = WIN32OLE_VARIANT.new("2e3", WIN32OLE::VARIANT::VT_R4)
+ * obj = WIN32OLE::Variant.new("2e3", WIN32OLE::VARIANT::VT_R4)
* obj.value # => 2000.0
*
*/
- mWIN32OLE_VARIANT = rb_define_module_under(cWIN32OLE, "VARIANT");
+ mWIN32OLE_VARIANT = rb_define_module_under(cWIN32OLE, "VariantType");
+ /* Alias of WIN32OLE::VariantType, for the backward compatibility */
+ rb_define_const(cWIN32OLE, "VARIANT", mWIN32OLE_VARIANT);
/*
* represents VT_EMPTY type constant.