GetPlatform method


Prototype

GetPlatform Proto lpszSvPack:LPSTR

Syntax

Invoke GetPlatform, lpszSvPack

Function

Gets the current operating system platform. Use this method to determine when your application is running in a particular platform of the Windows operating systems.

Parameters

lpszSvPack

Pointer to the effective address of a null-terminated string to receive the service pack string (if any). This parameter can be NULL if you do not need the service pack information.

Return value

Eax returns the platform of the running operating system.

Possible returned values are:

1  ecWin95 Running O.S. is Windows 95
2  ecWin98 Running O.S. is Windows 98/ME
3  ecWinNT Running O.S. is Windows NT40
4  ecWin2K Running O.S. is Windows 2000
5  ecWinXP Running O.S. is Windows XP
6  ecWinVista Running O.S. is Windows Vista
7  ecWin7 Running O.S. is Windows 7
8  ecWin8 Running O.S. is Windows 8


REMARKS
: The address specified by the lpszSvPack parameter will be filled with a null-terminated string (such as "Service Pack 2") specifying the last service pack installed. This string can be empty if no service pack has been installed on the system. If the lpszSvPack parameter is a NULL pointer, then it is ignored and no information about the service pack is returned.

REMARKS:The lpszSvPack parameter will be filled with a Unicode string if the application is running as Unicode. Otherwise, it will be filled with an ANSI string (see the IsAppUnicode method). You can call GetPlatformA to get an ANSI string in Unicode applications, or GetPlatformW to get a Unicode string in ANSI applications.