1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

convert dispid in Ruby and C by INT2NUM and NUM2INT.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
suke 2005-07-09 12:34:47 +00:00
parent 652b68a186
commit 4556ae58dc
4 changed files with 24 additions and 3 deletions

View file

@ -84,4 +84,9 @@ class TestOLEMETHOD < RUNIT::TestCase
m = WIN32OLE_METHOD.new(@excel_app, 'QueryInterface')
assert_equal(0, m.offset_vtbl)
end
def test_dispid
tobj = WIN32OLE_TYPE.new('Microsoft Shell Controls And Automation', 'FolderItem2')
method = WIN32OLE_METHOD.new(tobj, 'InvokeVerb')
assert_equal(1610743824, method.dispid)
end
end

View file

@ -303,6 +303,11 @@ class TestWin32OLE_WITH_MSI < RUNIT::TestCase
@record[ "StringData", 1 ] = 'ffff'
assert_equal('ffff', @record.StringData(1))
end
def test__invoke
shell=WIN32OLE.new('Shell.Application')
assert_equal(shell.NameSpace(0).title, shell._invoke(0x60020002, [0], [WIN32OLE::VARIANT::VT_VARIANT]).title)
end
end
# ---------------------