National Instruments 320682C Musical Toy Instrument User Manual


 
Chapter 8 Utility Library
© National Instruments Corporation 8-19 LabWindows/CVI Standard Libraries
Return Codes
Nnn Where N.nn is the LabWindows/CVI version.
GetCurrentPlatform
int platformCode = GetCurrentPlatform (void);
Purpose
This function returns a code representing the operating system under which a project or
standalone executable is running.
The return value of GetCurrentPlatform should not be confused with the predefined
macros such as _NI_mswin_, _NI_unix_, and others, which specify the platform on which
the project is compiled.
This function is useful when you have a program that can run on multiple operating systems but
must take different actions on the different systems. For example, the same standalone
executable can run on both Windows 95 and Windows NT. If the program needs to behave
differently on the two platforms, you can use GetCurrentPlatform to determine the
platform at run-time.
Return Value
platformCode
integer Indicates the current operating system.
Return Codes
kPlatformWin16
1 Windows 3.1
kPlatformWin95
2 Windows 95
kPlatformWinnt
3 Windows NT
kPlatformSunos4
4 Sun Solaris 1
kPlatformSunos5
5 Sun Solaris 2
kPlatformHPUX9
6 HP-UX 9.x
kPlatformHPUX10
7 HP-UX 10.x