dimanche 10 juillet 2016

GetVersionEx deprecation - how to get product type (VER_NT_DOMAIN_CONTROLLER) from newer API's


I'm trying to check if the OS is a domain controller (VER_NT_DOMAIN_CONTROLLER). It was easy to do so using GetVersionEx function using OSVERSIONINFOEX. But the MSDN page for GetVersionEx suggests that this function is deprecated and also we see a warning in visual studio 2015. Are there any newer API's which can provide this information? I know there are newer Version Helper functions that tell what kind of OS it is but I did not see anything for getting the product type.

Aucun commentaire:

Enregistrer un commentaire