GetVersionEx
- Posted by jjnick at cvn.com May 15, 2001
- 357 views
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 . . . The value of = "Boolean"=20 is "0", False . . .</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3D"Courier New" size=3D2>. . .</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2>global constant<BR> =20 dwOSVersionInfoSize =3D allot( DWord ), <BR> =20 dwMajorVersion =3D allot( DWord ), = <BR> =20 dwMinorVersion =3D allot( DWord ), = <BR> =20 dwBuildNumber =3D allot( DWord ),=20 <BR> dwPlatformId = =3D allot(=20 DWord ),<BR> = szCSDVersion =3D=20 allot( Lpsz ),<BR> SIZEOF_OSVERSION =3D = allotted_size()=20 <BR>. . .</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2> ptOS =3D allocate_struct( = SIZEOF_OSVERSION )<BR> store( ptOS, dwOSVersionInfoSize, = SIZEOF_OSVERSION=20 )</FONT></DIV> <DIV><FONT face=3D"Courier New" size=3D2></FONT> </DIV> <DIV><FONT face=3D"Courier New" size=3D2> OSVersion =3D = define_c_func(kernel32,=20 "GetVersionExA", {C_POINTER}, C_INT)<BR> val =3D c_func(OSVersion, = { ptOS }=20 )<BR> result =3D message_box(sprintf( "Boolean: %d", val ), = "OSVersion",=20 ------=_NextPart_000_0046_01C0DD9B.BF0948E0--