From: Masaki Suketa Date: 2012-10-27T00:38:50+09:00 Subject: Re: Creating a pointer to SAFEARRAY(BSTR) for COM object communication Hello, On Fri, Oct 26, 2012 at 05:46:11PM +0900, Andreas Lundgren wrote: > I have a hardware driver in DLL format that I would like to invoke from > a Ruby script using the win32ole gem. One of the inputs is defined as a > "SAFEARRAY(BSTR)*" is it possible to create such a pointer in Ruby? > (snip) > > ===== NOT WORKING ===== > This method however, I just cannot solve how to call: > > HRESULT ICdfHandleManager::ListHandleTypes([in, out] long * Count, > [in, out, size_is(*Count)] SAFEARRAY(BSTR)* HandleTypes ) How about Array of string? For example: ["aaa", "bbb", "ccc"] Or, you could get the hint of inputs by running following script. m = iCdfHandleManager.method_help('listHandleTypes') m.params.each do |param| puts param.ole_type_detail.join(',') + ' ' + param.name end Best Regards, Masaki Suketa