HKEY hKey; TCHAR szProductVersion [128]; DWORD dwBufLen; LONG lRet; int iLen = 0; RegOpenKeyEx (HKEY_LOCAL_MACHINE, _T ( "SYSTEM // CurrentControlSet // Control // MediaResources // icm // vidc.DIVX"), 0, Key_Query_Value, & HKey);
lRet = RegQueryValueEx (hKey, TEXT ( "Description"), NULL, NULL, (LPBYTE) szProductVersion, & dwBufLen); RegCloseKey (hKey); CString strVersion; CString strMsg; strMsg = _T ( "Current Divx's Version:"); strVersion = SzProductversion; Ilen = strVersion.getlength (); strVersion = strVersion.mid (5, Ilen-11); strmsg = strVersion; AFXMESSAGEBOX (STRMSG);