In some documentation, Ruby's Win32API has 'L'
and 'N'
to specify a "number"... and in some documentation, 'L'
is "long". Is 'N'
deprecated, and isn't 'L'
the same as 'I'
actually? A "number" is somewhat not so specific.
In http://rubyforge.org/docman/view.php/85/3463/API.html#M000001
There is no specifying a boolean parameter as 'B'
or 'I'
, only the return value...
In http://www.ruby-doc.org/stdlib/libdoc/Win32API/rdoc/classes/Win32/Registry/Error.html#M001622
There is
Win32API.new('kernel32.dll', 'FormatMessageA', 'LPLLPLP', 'L')
instead of the more common ['L', 'P', 'L', ...]
format
hWnd
is 'L'
and therefore 'I'
will work too? (hWnd
is handle to window)
Boolean parameter is 'B'
and is the same as 'I'
?
So basically, we can use most things as 'I'
? Even the 'P'
should be a 4-byte, so 'I'
should work as well? Is there a more formal specification?
Update: now that I think more about 'P'
, it actually will use a Ruby's String class object, and take the content buffer part and pass it into the C function. So using 'I'
probably won't trigger this behavior. (example: such as using GetWindowText()
)