[Win32utils-devel] WSAStartup failure
Daniel Berger
djberg96 at gmail.com
Mon Feb 7 21:56:14 EST 2011
Hi,
I added the Windows::WSA module to windows-pr recently (it's in the latest
git repo). However, I can't seem to make WSAStartup work. I tried the
following bit of code, only to get "The Windows Sockets version requested is
not supported" on my Vista box.
Is it really not supported on Vista? The docs say Win2k or later. Or is
there another issue?
require 'windows/wsa'
require 'windows/error'
require 'windows/system_info'
include Windows::WSA
include Windows::Error
include Windows::SystemInfo
begin
version = MAKEWORD(2,2)
buffer = 0.chr * 532
err = WSAStartup(version, buffer)
if err != 0
puts "Oops: " + get_last_error(err)
end
ensure
WSACleanup()
end
More information about the win32utils-devel
mailing list