GetVersionEx under Windows 8

后端 未结 6 1279
梦毁少年i
梦毁少年i 2020-12-28 17:21

I\'m writing a C++ code to determine what OS it is running on. I use GetVersionEx() API to do that, and this code as a tutorial, but it doesn\'t seems to handle

6条回答
  •  醉酒成梦
    2020-12-28 17:39

    OK, I was hoping someone has done this already ... but, I guess not, so here you go:

    Windows 8 Consumer Preview

    //OSVERSIONINFO for GetVersionEx returns:
    dwMajorVersion = 6;
    dwMinorVersion = 2;
    wProductType = 1;
    
    //GetProductInfo returns:
    dwType = 0x4A;   //Not documented yet???
    

    PS. I don't have VS IDE installed there. Had to make a small app to get those...

提交回复
热议问题