示例#1
0
void CUCMDetail::OnUnitoolEmanager() 
{
	// TODO: Add your command handler code here
	CManageRegistry* cReg = new CManageRegistry( "Easy-Manager" );
	char* sRootPath;
	char* sFullName;
	int   dNameSz;

	sRootPath = cReg->sGetItem( "ROOT_PATH" );

	if( !sRootPath )
	{
		AfxMessageBox( "Easy-Manager가 설치되지 않았습니다.\n설치 후에 재시도 해주십시오.", MB_OK | MB_SYSTEMMODAL | MB_ICONEXCLAMATION );

		if( sRootPath ) delete sRootPath;
		delete cReg;

		return;
	}

	dNameSz = strlen( sRootPath ) + strlen( "Visual-SQL.exe" );
	sFullName = new char[dNameSz + 1];
	memset( sFullName, 0x00, dNameSz + 1 );
	sprintf( sFullName, "%s\\Visual-SQL.exe", sRootPath );
	system( sFullName );

	delete sRootPath;
	delete sFullName;
	delete cReg;

	return;
}
示例#2
0
bool CCommonMethod::bStatusProcess( DREGNAME_t dProdNum )
{
	CManageRegistry* cReg = new CManageRegistry( sRegName[dProdNum] );
//	char* sPath = cReg->sGetItem( sRegKey[REG_ROOTPATH] );
	char* sPath = cReg->sGetItem( "ROOT_PATH" );

	if( !sPath )
	{
		delete cReg;
		return false;
	}

	int dSize = strlen( sPath ) + strlen( sProcessCmd[dProdNum] );
	char* sFullName = new char[ dSize + 5 ];
	memset( sFullName, 0x00, dSize + 5 );
	sprintf( sFullName, "%s\\%s", sPath, sProcessCmd[dProdNum] );

	char* sResult = sCatchResult( sFullName );

	if( !sResult )
	{
		delete sFullName;
		delete sPath;
		delete cReg;
		return false;
	}


	char* sTmp;

	sTmp = strstr( sResult, sProcessKey[dProdNum] );
	if( !sTmp )
	{
		delete sResult;
		delete sFullName;
		delete sPath;
		delete cReg;
		return false;
	}

	delete sResult;
	delete sFullName;
	delete sPath;
	delete cReg;
	return true;
}
示例#3
0
void CUCMDetail::OnUnitoolVsql() 
{
	// TODO: Add your command handler code here
	CManageRegistry* cReg = new CManageRegistry( "Visual-SQL" );
	char* sRootPath;
	char* sVersion;
	char* sBuild;
	char* sFullName;
	int   dNameSz;

	sRootPath = cReg->sGetItem( "ROOT_PATH" );
	sVersion = cReg->sGetItem( "Version" );
	sBuild = cReg->sGetItem( "Build" );

	if( !sRootPath || !sVersion || !sBuild )
	{
		AfxMessageBox( "Visual-SQL이 설치되지 않았습니다.\n설치 후에 재시도 해주십시오.", MB_OK | MB_SYSTEMMODAL | MB_ICONEXCLAMATION );

		if( sRootPath ) delete sRootPath;
		if( sVersion  ) delete sVersion;
		if( sBuild    ) delete sBuild;
		delete cReg;

		return;
	}

	dNameSz = strlen( sRootPath ) + strlen( "Visual-SQL.exe" );
	sFullName = new char[dNameSz + 1];
	memset( sFullName, 0x00, dNameSz + 1 );
	sprintf( sFullName, "%s\\Visual-SQL.exe", sRootPath );
//	system( sFullName );
	WinExec( sFullName, SW_MAXIMIZE );

	delete sRootPath;
	delete sVersion;
	delete sBuild;
	delete sFullName;
	delete cReg;

	return;
}
示例#4
0
// 2002.10.11 By KingCH
// Object : Patch 또는 Tcl Version이 Null인 경우 Null Point Exception 발생하는 관계로 그 부분에 대하여 수정을 했다.
void CAboutDlg::SetVersion()
{
	CManageRegistry* cCUBRIDReg = new CManageRegistry( "CUBRID" );
	CManageRegistry* cUniCASReg = new CManageRegistry( "CUBRIDCAS" );
	int dUniCASsz, dCUBRIDsz;

	char* sCasVers = cUniCASReg->sGetItem( "Version" );
	char* sCasTcl  = cUniCASReg->sGetItem( "TCL" );

	char* sSQLVers = cCUBRIDReg->sGetItem( "Version" );
	char* sSQLPatch = cCUBRIDReg->sGetItem( "Patch" );

	m_CUBRID_version.Empty();
	m_unicas_version.Empty();


	// 2002년 10월 19일 By KingCH
	// Registry 정보가 없을때 오류
	if( !sCasTcl && !sCasVers )
	{
		sUniCASInfo = new char[ 100 ];
		memset( sUniCASInfo, 0x00, 100 );
		sprintf ( sUniCASInfo, "UniCAS is not installed" );
	}
	else
	{
		if( sCasTcl )
			dUniCASsz = strlen( sCasVers ) + strlen( sCasTcl ) + 5;
		else
			dUniCASsz = strlen( sCasVers ) + 5;

		sUniCASInfo = new char[ dUniCASsz + 1 ];
		memset( sUniCASInfo, 0x00, dUniCASsz + 1 );

		if( sCasTcl )
			sprintf( sUniCASInfo, "%s TCL %s", sCasVers, sCasTcl );
		else
			sprintf( sUniCASInfo, "%s", sCasVers );
	}

/*
	if( !sCasVers || !sCasTcl ) 
			sUniCASInfo = sGetReleaseString( cUniCASReg->sGetItem( "ROOT_PATH" ) );
	else
	{
		dUniCASsz = strlen( sCasVers ) + strlen( sCasTcl ) + 5;
		sUniCASInfo = new char[ dUniCASsz + 1 ];
		memset( sUniCASInfo, 0x00, dUniCASsz + 1 );
		sprintf( sUniCASInfo, "%s TCL %s", sCasVers, sCasTcl );
	}
*/


	// 2002년 10월 19일 By KingCH
	// Registry 정보가 없을때 오류
	if( !sSQLPatch && !sSQLVers )
	{
		sCUBRIDInfo = new char[ 100 ];
		memset( sCUBRIDInfo, 0x00, 100 );
		sprintf ( sCUBRIDInfo, "CUBRID is not installed." );
	}
	else
	{
		if( sSQLPatch )
			dCUBRIDsz = strlen( sSQLVers ) + strlen( sSQLPatch ) + 7;
		else
			dCUBRIDsz = strlen( sSQLVers ) + 7;

		sCUBRIDInfo = new char[ dCUBRIDsz + 1 ];
		memset( sCUBRIDInfo, 0x00, dCUBRIDsz + 1 );
		if( sSQLPatch )
			sprintf( sCUBRIDInfo, "%s patch %s", sSQLVers, sSQLPatch );
		else
			sprintf( sCUBRIDInfo, "%s", sSQLVers );
	}

	delete cCUBRIDReg;
	delete cUniCASReg;

	return;
}