怎样通过VC得到系统的默认浏览器

解决方案 »

  1.   

    这个好像可以得到默认的浏览器的路径
    HKEY hkRoot;
    HKEY hSubKey;
    char ValueName[256];
    DWORD dwType;
    unsigned long cbValueName = 256;
    unsigned long cbDataValue = 256;
    unsigned char DataValue[256]; if(RegOpenKey(HKEY_CLASSES_ROOT,NULL,&hkRoot)==ERROR_SUCCESS)
    {
    if(RegOpenKeyEx(hkRoot,"htmlfile\\shell\\open\\command",0,KEY_ALL_ACCESS,&hSubKey)==ERROR_SUCCESS) 
    {
    RegEnumValue(hSubKey,0,ValueName,&cbValueName,NULL,&dwType,DataValue,&cbDataValue);
    }
    }

    RegCloseKey(hSubKey);
    RegCloseKey(hkRoot); return (char*)DataValue;
      

  2.   

    http://search.csdn.net/Expert/topic/539/539079.xml?temp=3.365725E-02