[Win32utils-devel] Unraveling a protoent struct

Daniel Berger djberg96 at gmail.com
Sat Jun 7 12:24:17 EDT 2008


I'm spacing - how do I unravel a protent struct pointer?

require 'win32/api'
include Win32

getprotobyname = API.new('getprotobyname', 'P', 'P', 'ws2_32')

ptr = getprotobyname.call('tcp')

puts "Name: " + # ???
puts "Aliases: " + # ???
puts "Number: " + # ???

Thanks,

Dan


More information about the win32utils-devel mailing list