Retrieves the major and minor version numbers of the system on which the specified process expects to run.
DWORD GetProcessVersion( DWORD ProcessId );
The process identifier of the process of interest. A value of zero specifies the calling process.
If the function succeeds, the return value is the version of the system on which the process expects to run. The high word of the return value contains the major version number. The low word of the return value contains the minor version number.
If the function fails, the return value is zero. To get extended error information, call GetLastError. The function fails if ProcessId is an invalid value.
The GetProcessVersion function performs less quickly when ProcessId is nonzero, specifying a process other than the calling process.
The version number returned by this function is the version number stamped in the image header of the .exe file the process is running. Linker programs set this value.
If this function is called from a 32-bit application running on WOW64, the specified process must be a 32-bit process or the function fails.
|Windows version||Windows XP [desktop apps only] Windows Server 2003 [desktop apps only]|
|Header||processthreadsapi.h (include Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008 Windows Server 2008 R2, Windows.h)|