[Win32utils-devel] Pure Ruby win32-ole library

Park Heesob phasis at gmail.com
Fri May 15 20:22:20 EDT 2009

----- Original Message ----- 
From: "Daniel Berger" <djberg96 at gmail.com>
To: "Development and ideas for win32utils projects" 
<win32utils-devel at rubyforge.org>
Sent: Saturday, May 16, 2009 8:04 AM
Subject: Re: [Win32utils-devel] Pure Ruby win32-ole library

> On Thu, May 14, 2009 at 10:43 PM, Heesob Park <phasis at gmail.com> wrote:
>> Hi all,
>> As a response to the feature request
>> http://rubyforge.org/tracker/index.php?func=detail&aid=25792&group_id=85&atid=414,
>> I have been struggling with the win32ole in these days. The
>> implementation is almost done except for some event handling.
>> It passed all the test codes provided with the MRI win32ole module
>> except for test_win32ole_event.rb
>> I have got stuck in IConnectionPoint::Advise right now. If you are
>> familiar with the COM event handling, please give me some advice.
>> The code is available at
> Excellent work!
> I did notice one mistake:
> # Wrong function name
> SysFreeString = Win32::API.new('SysAllocString', 'L', 'V', 'oleaut32')
I fixed it.
> Also, most of the functions you need are in the
> Windows::COM::Automation module. A few are missing, so I've added
> those, along with the constant enum values.
> I did notice a prototype difference for SysAllocString. I return the
> string, but you want the address?
Yes. The SysAllocXXX should return the address.

BTW, you mistacked RegEnumKeyEx's prototype in registry.rb
'LLPPPPP' should be 'LLPPPPPP'
Also LoadTypeLibEx's prototype 'PPP' should be 'PLP'.

> I'll take a look at the IConnectionPoint::Advise code soon.
 I guess it is related with the callback function implementation. When I 
tested with the native C function, it works.


Park Heesob

More information about the win32utils-devel mailing list