Article Preview
Buy Now
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
Article Description: No description available.
Article Length (in bytes): 8,013
Starting Page Number: 37
Article Number: 1519
Resource File(s):
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.