[Win32utils-devel] Bug in win32-api with void prototypes?
Daniel.Berger at qwest.com
Tue Sep 25 14:22:24 EDT 2007
It seems that a void prototype requires an explicit argument in our
version of win32/api:
irb(main):001:0> require 'win32/api'
irb(main):002:0> include Win32
irb(main):003:0> require 'Win32API'
# Our version
irb(main):004:0> GetLastErrorA = API.new('GetLastError', 'V', 'L',
# Old version
irb(main):005:0> GetLastErrorB = Win32API.new('kernel32',
'GetLastError', 'V', 'L')
# Ours fails with no arguments
ArgumentError: wrong number of parameters: expected 1, got 0
from (irb):6:in `call'
# Works with an explicit nil - intentional?
# Old version ignores it
How should we handle this?
This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.
More information about the win32utils-devel