Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 1.5

COLUMN

Windows Version

Asking for the correct Windows version from REALbasic Code using Declares

Issue: 1.5 (April/May 2003)
Author: Christian Schmitz
Author Bio: Christian Schmitz has written several articles for the German magazine Macwelt and has made many cross-platform applications using REALbasic.
Article Description: No description available.
Article Length (in bytes): 8,013
Starting Page Number: 37
Article Number: 1519
Resource File(s):

Download Icon 1519.zip Updated: 2013-03-11 19:07:56

Related Web Link(s):

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/sysinfo_92jy.asp
http://msdn.microsoft.com/library/en-us/sysinfo/sysinfo_3a0i.asp
http://msdn.microsoft.com/library/en-us/sysinfo/sysinfo_1o1e.asp

Excerpt of article text...

All Windows versions should be treated as equals by you, as the programmer, but some are different -- so if a customer has a problem, you might ask him what Operation System he is using. Code Listing #1 shows how this can be done for the Mac OS.

Collecting Version Data for Windows

For Windows it's a little bit complicated. First we will make a Declare statement to the function GetVersionEx, which returns the version information record. Then we have to interpret it, but let's start with the declare. The C code looks like this:

BOOL GetVersionExA(LPOSVERSIONINFO lpVersionInfo);

As you can see it's just a boolean function with a pointer (lp is short for a long pointer) pointing to a memoryblock. So we create this declare:

...End of Excerpt. Please purchase the magazine to read the full article.