获取Divx的版本号(测试中)

类别:VC语言 点击:0 评论:0 推荐:

 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);

本文地址:http://com.8s8s.com/it/it921.htm