# GetCurrentPlatform

GetCurrentPlatform (void);

## Purpose

Returns a code that represents the operating system under which a project or standalone executable is running.

Do not confuse the return value of GetCurrentPlatform with the predefined macros such as _NI_mswin_ and others, which specify the platform on which you compile a source file.

GetCurrentPlatform is useful when you have a program that can run under multiple operating systems but must take different actions on the different systems. For example, consider a stand-alone executable that can run under Windows and Linux. If the program must behave differently on the two platforms, you can use GetCurrentPlatform to determine the platform at run time.

## Parameters

None.

## Return Value

Name | Type | Description
platformCode | integer | The current operating system.
Message | Code | Platform
kPlatformWinnt | 3 | Windows
kPlatformLinuxX86 | 9 | Linux