scandsp/src/dspparser.cxx
// ===========================================================================
// Get the installation location of MSVC.
//
Get the installation location of MSVC.
Get the installation location of MSVC .
bool DSPParser::analyzeVCDir(string &msvc_dir)
{
    bool foundVC = false;
    const char *key_beginning = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft";
    const char *vers[] = {"\\DevStudio\\7.0", 
			  "\\DevStudio\\6.0",
			  "\\DevStudio\\5.0", 
			  "\\Developer",
			  NULL}; 
    const char *key_end = "\\Products\\Microsoft Visual C++\\ProductDir";
    for (int n = 0;; n += 1) {
	string key = key_beginning;
	const char *v = vers[n];
	if (v == NULL) {
	    break;
	}
	key.append(v);
	key.append(key_end);
	if (registry::exists(key)) {
	    msvc_dir = registry::at(key);
	    foundVC = true;
	    break;
	}
    }
    if (!foundVC) {
	msg("Microsoft VC++ not found in registry.", catastrophe_sev) << eom;
    }
    return foundVC;
}
bool DSPParser :: analyzeVCDir ( string & msvc_dir ) { bool foundVC = false ; const char * key_beginning = " \\ \\ " ; const char * vers [ ] = { " \\ \\ " , " \\ \\ " , " \\ \\ " , " \\ " , NULL } ; const char * key_end = " \\ \\ \\ " ; for ( int n = 0 ; ; n += 1 ) { string key = key_beginning ; const char * v = vers [ n ] ; if ( v == NULL ) { break ; } key . append ( v ) ; key . append ( key_end ) ; if ( registry :: exists ( key ) ) { msvc_dir = registry :: at ( key ) ; foundVC = true ; break ; } } if ( ! foundVC ) { msg ( " " , catastrophe_sev ) << eom ; } return foundVC ; }
Get the installation location of MSVC.
Get the installation location of MSVC .
// Form key, concatenating 3 parts. // Look up key in registry.