GetCurrentPlatform
- Updated2023-02-21
- 1 minute(s) read
GetCurrentPlatform
int 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 | |||||||||
platform | int | The current operating system.
|
Additional Information
Library: Utility Library
Include file: utility.h
LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later