| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 
 |  
    HKEY hKey = NULL;
    LONG lResult;
    DWORD type, size=255;
    CString OPFolderPath, RunFolder;
    CString NoOPResultString="NoOP";
 
//PDSView+VLC Study Case
    lResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Schlumberger\\PDSView",0,KEY_QUERY_VALUE,&hKey);
    if (lResult != ERROR_SUCCESS)
    {    
        //OP is not installed
        return &NoOPResultString;
    }
    lResult = RegQueryValueEx( hKey, "Path", NULL, &type, (unsigned char *)(LPCTSTR)OPFolderPath, &size );
    RegCloseKey(hKey);
    OPRunFolderPath = OPFolderPath;
 
    lResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\VideoLAN\\VLC",0,KEY_QUERY_VALUE,&hKey);
    if (lResult != ERROR_SUCCESS)
    {    
        //OP is not installed
        return &NoOPResultString;
    }
    lResult = RegQueryValueEx( hKey, "InstallDir", NULL, &type, (unsigned char *)(LPCTSTR)RunFolder, &size );
    RegCloseKey(hKey);
 
    return &OPRunFolderPath; | 
Partager