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;
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.
Script by Alex
This page was last modified
34 months, 3 weeks, 2 days and 9 hours ago