WinapiZone.net




Tutorials > WinAPI > Functions > IsCommonControlsVersion6

IsCommonControlsVersion6

This function check if the program it is called from is using a manifest to use the common controls version 6 (shipped with Windows XP).

BOOL IsCommCtrlVersion6() { static BOOL isCommCtrlVersion6 = -1; if (isCommCtrlVersion6 != -1) return isCommCtrlVersion6; //The default value isCommCtrlVersion6 = FALSE; HINSTANCE commCtrlDll = LoadLibrary(_T("comctl32.dll")); if (commCtrlDll) { DLLGETVERSIONPROC pDllGetVersion; pDllGetVersion = (DLLGETVERSIONPROC)GetProcAddress(commCtrlDll, "DllGetVersion"); if (pDllGetVersion) { DLLVERSIONINFO dvi = {0}; dvi.cbSize = sizeof(DLLVERSIONINFO); (*pDllGetVersion)(&dvi); isCommCtrlVersion6 = (dvi.dwMajorVersion == 6); } FreeLibrary(commCtrlDll); } return isCommCtrlVersion6; }

Comments

No comments yet.

Your comment:

Name:
E-mail or homepage:
Captcha:
captcha

Script by Alex



This page was last modified 34 months, 3 weeks, 2 days and 9 hours ago