Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows API interpreter [closed]

Is there an interpreter that can give output of windows api calls such as GetVersionEx ?

like image 912
JRL Avatar asked Dec 29 '22 01:12

JRL


2 Answers

Not sure if that's what you want/need, but I'd say Python with with pywin32 module.

like image 150
rotoglup Avatar answered Jan 12 '23 08:01

rotoglup


Ruby may also be a possibility. The following is an example that shows the results of a call to 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 just passes 148 bytes (the size of the OSVERSION structure) rather than the entire OSVERSIONEX structure.

like image 22
Mark Wilkins Avatar answered Jan 12 '23 07:01

Mark Wilkins