GetVersionEx

new topic     » topic index » view thread      » older message » newer message

This is a multi-part message in MIME format.

------=_NextPart_000_0046_01C0DD9B.BF0948E0
	charset="Windows-1252"

Man, I am having a terrible time getting GetVersionEx to work, what am I =
doing wrong . . .  The value of "Boolean" is "0", False . . .

. . .
global constant
  dwOSVersionInfoSize =3D allot( DWord ),=20
  dwMajorVersion      =3D allot( DWord ),=20
  dwMinorVersion      =3D allot( DWord ),=20
  dwBuildNumber       =3D allot( DWord ),=20
  dwPlatformId        =3D allot( DWord ),
  szCSDVersion        =3D allot( Lpsz ),
  SIZEOF_OSVERSION    =3D allotted_size()=20
. . .
 ptOS =3D allocate_struct( SIZEOF_OSVERSION )
 store( ptOS, dwOSVersionInfoSize, SIZEOF_OSVERSION )

 OSVersion =3D define_c_func(kernel32, "GetVersionExA", {C_POINTER}, =
C_INT)
 val =3D c_func(OSVersion, { ptOS } )
 result =3D message_box(sprintf( "Boolean: %d", val ), "OSVersion", =
MB_ICONINFORMATION+MB_TASKMODAL )


------=_NextPart_000_0046_01C0DD9B.BF0948E0
Content-Type: text/html;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Man, I am having a terrible time =
getting=20
GetVersionEx to work, what am I doing wrong . . .&nbsp; The value of =
"Boolean"=20
is "0", False . . .</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>. . .</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>global constant<BR>&nbsp;=20
dwOSVersionInfoSize =3D allot( DWord ), <BR>&nbsp;=20
dwMajorVersion&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D allot( DWord ), =
<BR>&nbsp;=20
dwMinorVersion&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D allot( DWord ), =
<BR>&nbsp;=20
dwBuildNumber&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D allot( DWord ),=20
<BR>&nbsp;&nbsp;dwPlatformId&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=3D allot(=20
DWord ),<BR>&nbsp; =
szCSDVersion&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D=20
allot( Lpsz ),<BR>&nbsp; SIZEOF_OSVERSION&nbsp;&nbsp;&nbsp; =3D =
allotted_size()=20
<BR>. . .</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>&nbsp;ptOS =3D allocate_struct( =

SIZEOF_OSVERSION )<BR>&nbsp;store( ptOS, dwOSVersionInfoSize, =
SIZEOF_OSVERSION=20
)</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D2>&nbsp;OSVersion =3D =
define_c_func(kernel32,=20
"GetVersionExA", {C_POINTER}, C_INT)<BR>&nbsp;val =3D c_func(OSVersion, =
{ ptOS }=20
)<BR>&nbsp;result =3D message_box(sprintf( "Boolean: %d", val ), =
"OSVersion",=20

------=_NextPart_000_0046_01C0DD9B.BF0948E0--

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu