vs_integration/src/SocketConnection.cpp
//------------------------------------------------------------------------------
// This function will start the name_server.  Returns false to indicate 
// failure, true to indicate that process was started.
//------------------------------------------------------------------------------
This function will start the name_server.  Returns false to indicate
failure, true to indicate that process was started.
This function will start the name_server . Returns false to indicate failure true to indicate that process was started .
bool SocketConnection::StartNameServer(void) {
    char cmd[1024];
    char *p;    
    p=getenv("CODE_ROVER_HOME");
	if(p==NULL)
		p=getenv("PSETHOME");
    if(p!=NULL) {
	    sprintf(cmd,"%s/bin/nameserv",p);
    } else {
	    sprintf(cmd,"nameserv");
    }
    STARTUPINFO si;
    PROCESS_INFORMATION pi;     
    memset(&si,0,sizeof(STARTUPINFO));
    si.wShowWindow=SW_HIDE;
    si.cb=sizeof(STARTUPINFO);
    if(::CreateProcess(NULL,(char *)cmd,NULL,NULL,FALSE,CREATE_NO_WINDOW,NULL,NULL,&si,&pi)==FALSE) {
  	    return false;
    } else {
	    return true;
    }
}
bool SocketConnection :: StartNameServer ( void ) { char cmd [ 1024 ] ; char * p ; p = getenv ( " " ) ; if ( p == NULL ) p = getenv ( " " ) ; if ( p != NULL ) { sprintf ( cmd , " " , p ) ; } else { sprintf ( cmd , " " ) ; } STARTUPINFO si ; PROCESS_INFORMATION pi ; memset ( & si , 0 , sizeof ( STARTUPINFO ) ) ; si . wShowWindow = SW_HIDE ; si . cb = sizeof ( STARTUPINFO ) ; if ( :: CreateProcess ( NULL , ( char * ) cmd , NULL , NULL , FALSE , CREATE_NO_WINDOW , NULL , NULL , & si , & pi ) == FALSE ) { return false ; } else { return true ; } }
This function will start the name_server.
This function will start the name_server .