Hello Everyone,

My requirement is such that, I need to identify OS (in my case it is Windows 7) in C language and based on that condition have to proceed further.
As we have 2 OS(Windows 7 and Windows Server 2008 R2) having the similar dwMajorVersion(6) and dwMinorVersion(1) but different product type.

So we can differentiate "Windows 7" and "Windows Server 2008 R2" by product type.

But my problem begins here:
Currently I am working on "Microsoft Windows XP".

On Windows XP Structure OSVERSIONINFOEX->
Code:
typedef struct _OSVERSIONINFOEXA {
    DWORD dwOSVersionInfoSize;
    DWORD dwMajorVersion;
    DWORD dwMinorVersion;
    DWORD dwBuildNumber;
    DWORD dwPlatformId;
    CHAR   szCSDVersion[ 128 ];     // Maintenance string for PSS usage
    WORD wServicePackMajor;
    WORD wServicePackMinor;
    WORD wReserved[2];
}
It does not contain variable to get information about product type that is "wProductType".

Request you to please help me, how to determine the OS type between "Windows 7" and "Windows Server 2008 R2" considering I am coding on Microsft Windows XP.

Thanks.