Ruby may also be an opportunity. The following is an example showing the results of calling GetVersionEx.
require "Win32API" gvex = Win32API.new( 'kernel32', 'GetVersionEx', ['P'], 'I' ) s = [20+128, 0, 0, 0, 0, '' ].pack('LLLLLa128') gvex.call( s ); a = s.unpack( 'LLLLLa128' ) puts "gvex: ", a
This example simply transfers 148 bytes (the size of the OSVERSION structure), not the entire OSVERSIONEX structure.
source share