D
derekwrobel
Hi,
I have a specific need to use a windows dll. I am able to create the object and can verify that it is instantiated properly. However, when I try to call the COM methods available, nothing happens. It's actually accepting the method call because if I type in a non-existing method name, it fails with the 'method_missing'. What's odd is if I do a respond_to? on the valid method call, it returns false. I'm confused.
What I'm trying to figure out is, what debugging options/possibilities are there for me to figure out what is actually happening?
Below is the code:
ROLE_SYSTEM_LISTITEM = 34
msawrp = WIN32OLE.new("MSAAWrapper.MSAAInit")
puts "msawrp is #{msawrp.ole_type}"
$index = 0
puts "does msawrp respond to abfp? #{msawrp.respond_to?('AccessibleObjectFromPoint')}"
acc = msawrp.AccessibleObjectFromPoint(633,347, true, $index)
The first puts will return "IMSAAInit" which is what I expect
The second puts returns false, which I do not understand
The last line should assign the number of objects it finds to $index. I'm sure this is not doing anything because no matter what value you set $index to, it's the same value before or after that last call.
Any ideas or suggestions?
I have a specific need to use a windows dll. I am able to create the object and can verify that it is instantiated properly. However, when I try to call the COM methods available, nothing happens. It's actually accepting the method call because if I type in a non-existing method name, it fails with the 'method_missing'. What's odd is if I do a respond_to? on the valid method call, it returns false. I'm confused.
What I'm trying to figure out is, what debugging options/possibilities are there for me to figure out what is actually happening?
Below is the code:
ROLE_SYSTEM_LISTITEM = 34
msawrp = WIN32OLE.new("MSAAWrapper.MSAAInit")
puts "msawrp is #{msawrp.ole_type}"
$index = 0
puts "does msawrp respond to abfp? #{msawrp.respond_to?('AccessibleObjectFromPoint')}"
acc = msawrp.AccessibleObjectFromPoint(633,347, true, $index)
The first puts will return "IMSAAInit" which is what I expect
The second puts returns false, which I do not understand
The last line should assign the number of objects it finds to $index. I'm sure this is not doing anything because no matter what value you set $index to, it's the same value before or after that last call.
Any ideas or suggestions?