当前位置: 首页>>代码示例>>C++>>正文


C++ Uninstall函数代码示例

本文整理汇总了C++中Uninstall函数的典型用法代码示例。如果您正苦于以下问题:C++ Uninstall函数的具体用法?C++ Uninstall怎么用?C++ Uninstall使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Uninstall函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: switch

BOOL CDialog::OnCommand(int id, int code)
{
	switch(id)
	{
	case IDOK:
		if(m_bNewVersion)
		{
			if( Uninstall() )
				return Install();
			else
			{
				// Write something to RunOnce registry key
				// Keep in mind that Uninstall() already did!
				SetMessage( IDS_RESTARTBEFOREUPDATE );
			}
		}
		else if(m_bUnInstall)
			return Uninstall();
		else
			return Install();
		break;

	case IDCANCEL:
		if(m_bUnInstall)
			CreateUninstall(TRUE);
		::PostQuitMessage(1);
		break;
	}
	return FALSE;
}
开发者ID:sqba,项目名称:zenfolders,代码行数:30,代码来源:Dialog.cpp

示例2: QThread

int Backend::GoBack(){
    QThread *worker = new QThread();;
    this->moveToThread(worker);
    worker->start();

    connect(this, SIGNAL(Uninstall()), this, SLOT(AsyncUninstall()));
    emit Uninstall();

    return Success;
}
开发者ID:w5wa,项目名称:deepin-windows-installer,代码行数:10,代码来源:backend.cpp

示例3: OnUninstall

int OnUninstall(HWND hDlg)
{
  SetWindowText(GetDlgItem(hDlg, IDC_QUESTION_TEXT), L"");
  ShowWindow(GetDlgItem(hDlg, IDC_BTN_UNINSTALL), SW_HIDE);
  ShowWindow(GetDlgItem(hDlg, IDCANCEL), SW_HIDE);
  ShowWindow(GetDlgItem(hDlg, IDC_PROGRESS), SW_SHOW);
  SendMessage(GetDlgItem(hDlg, IDC_PROGRESS), PBM_SETRANGE, 0, (LPARAM) MAKELPARAM (0, c_nMaxDirs));
  SendMessage(GetDlgItem(hDlg, IDC_PROGRESS), PBM_SETPOS, 0, 0);

  UpdateWindow(hDlg); // make sure the text is drawn
  
  int ret = Uninstall(hDlg);

  if (ret == ErrOK)
  {
    SetWindowText(GetDlgItem(hDlg, IDC_STATIC_TEXT), Strings.GetString(StrID_UninstalledSuccessfully));
  }
  else
  {
    //TODO: Localize this message. It might be shown later when the errors will be handled
    SetWindowText(GetDlgItem(hDlg, IDC_STATIC_TEXT), L"There were errors during uninstallation.");
  }

  ShowWindow(GetDlgItem(hDlg, IDC_PROGRESS), SW_HIDE);
  ShowWindow(GetDlgItem(hDlg, IDOK), SW_SHOW);

  return ret;
}
开发者ID:amyvmiwei,项目名称:firefox,代码行数:28,代码来源:Uninstall.cpp

示例4: Uninstall

void Vehicle::Dismiss()
{
    sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Dismiss Entry: %u, GuidLow %u", _creatureEntry, _me->GetGUIDLow());
    Uninstall();
    _me->DestroyForNearbyPlayers();
    _me->AddObjectToRemoveList();
}
开发者ID:Zakamurite,项目名称:TrilliumEMU,代码行数:7,代码来源:Vehicle.cpp

示例5: Uninstall

status_t
BTeamDebugger::Install(team_id team)
{
	Uninstall();

	// create a debugger port
	char name[B_OS_NAME_LENGTH];
	snprintf(name, sizeof(name), "debugger for team %" B_PRId32, team);
	fDebuggerPort = create_port(100, name);
	if (fDebuggerPort < 0)
		return fDebuggerPort;

	port_id nubPort = install_team_debugger(team, fDebuggerPort);
	if (nubPort < 0) {
		delete_port(fDebuggerPort);
		fDebuggerPort = -1;
		return nubPort;
	}

	status_t error = BDebugContext::Init(team, nubPort);
	if (error != B_OK) {
		remove_team_debugger(team);
		delete_port(fDebuggerPort);
		fDebuggerPort = -1;
		return error;
	}

	return B_OK;
}
开发者ID:looncraz,项目名称:haiku,代码行数:29,代码来源:TeamDebugger.cpp

示例6: DllInstall

STDAPI DllInstall( BOOL bInstall, LPCWSTR pszCmdLine )
{
	// To install into System32\ShellExt
	// regsvr32.exe /i /n HashCheck.dll
	//
	// To install without registering an uninstaller
	// regsvr32.exe /i:"NoUninstall" /n HashCheck.dll
	//
	// To install in-place (without copying the .dll anywhere)
	// regsvr32.exe /i:"NoCopy" /n HashCheck.dll
	//
	// To install with both options above
	// regsvr32.exe /i:"NoUninstall NoCopy" /n HashCheck.dll
	//
	// To uninstall
	// regsvr32.exe /u /i /n HashCheck.dll
	//
	// To install/uninstall silently
	// regsvr32.exe /s ...
	//
	// DllInstall can also be invoked from a RegisterDlls INF section or from
	// a UnregisterDlls INF section, if the registration flags are set to 2.
	// Consult the documentation for RegisterDlls/UnregisterDlls for details.

	return( (bInstall) ?
		Install(pszCmdLine == NULL || StrStrIW(pszCmdLine, L"NoUninstall") == NULL,
                pszCmdLine == NULL || StrStrIW(pszCmdLine, L"NoCopy")      == NULL) :
		Uninstall()
	);
}
开发者ID:gurnec,项目名称:HashCheck,代码行数:30,代码来源:HashCheck.cpp

示例7: Uninstall

void CServiceModule::SetupAsLocalServer()
{
    USES_CONVERSION;
    CRegKey keyClasses,key;
    LPOLESTR pCLSID;

    Uninstall();

    if (keyClasses.Open(HKEY_CLASSES_ROOT, _T("CLSID")) != ERROR_SUCCESS)
        return;

    _ATL_OBJMAP_ENTRY* pEntry = m_pObjMap;
    while (pEntry->pclsid != NULL)
    {
        StringFromCLSID(*pEntry->pclsid, &pCLSID);
        CString csTemp = pCLSID;
        if (key.Open(keyClasses, (LPCTSTR)csTemp) == ERROR_SUCCESS)
        {
            TCHAR szModule[_MAX_PATH];
            key.DeleteValue(_T("AppID"));
            key.DeleteValue(_T("_LocalServer32"));
            GetModuleFileName(GetModuleInstance(), szModule, _MAX_PATH);
            key.SetKeyValue(_T("LocalServer32"), szModule, _T(""));
        }
        pEntry++;
    }
}
开发者ID:jetlive,项目名称:skiaming,代码行数:27,代码来源:DrawServ.cpp

示例8: RegisterAppId

	inline HRESULT RegisterAppId(bool bService = false) throw()
	{
		if (!Uninstall())
			return E_FAIL;

		HRESULT hr = UpdateRegistryAppId(TRUE);
		if (FAILED(hr))
			return hr;

		CRegKey keyAppID;
		LONG lRes = keyAppID.Open(HKEY_CLASSES_ROOT, _T("AppID"), KEY_WRITE);
		if (lRes != ERROR_SUCCESS)
			return AtlHresultFromWin32(lRes);

		CRegKey key;

		lRes = key.Create(keyAppID, GetAppIdT());
		if (lRes != ERROR_SUCCESS)
			return AtlHresultFromWin32(lRes);

		key.DeleteValue(_T("LocalService"));

		if (!bService)
			return S_OK;

		key.SetStringValue(_T("LocalService"), m_szServiceName);

		// Create service
		if (!Install())
			return E_FAIL;
		return S_OK;
	}
开发者ID:AlexS2172,项目名称:IVRM,代码行数:32,代码来源:EgRouterSrv.cpp

示例9: Uninstall

CHook::~CHook()
{
	if ( Installed() )
	{
		Uninstall();
	}

	if ( m_lpBack != NULL )
	{
		delete [] m_lpBack;
		m_lpBack = NULL;
	}

	if ( m_pMProt != NULL )
	{
		MemoryHackingFactory::DestroyMProt( m_pMProt );
		m_pMProt = NULL;
	}

	if ( m_pMAlloc != NULL )
	{
		MemoryHackingFactory::DestroyMAlloc( m_pMAlloc );
		m_pMProt = NULL;
	}
}
开发者ID:Kwiatkooo,项目名称:rec,代码行数:25,代码来源:CHook.cpp

示例10: IniParser

void ServiceUninstall::PreUninstall()
{
	ip = new IniParser();
	ip->Parse(UninstallIniPath);
	if (ip->Error != 0)
	{
		if (dialog)
		{
			String s = "Errore durante il parse del file INI: " + to_wstring(ip->Error);
			MessageBox(dialog->m_hWnd, s.lpcwstr(), _T("INI Parse Error"), 0);
			dialog->EndDialog(-1);
		}
		return;
	}

	String s = "Uninstall "+ ip->AppName + " - "+ ip->AppVersion.getVersion();

	if (dialog)
	{
		SetDlgItemText(dialog->m_hWnd, IDC_STATIC_TITOLO, s.lpcwstr());
		SetWindowText(dialog->m_hWnd, s.lpcwstr());
	}
	



	if (dialog)
		UninstallGUI();
	else
		Uninstall();

}
开发者ID:Rarder44,项目名称:TamrielUnlimitedIT_Installer_Uninstaller,代码行数:32,代码来源:ServiceUninstall.cpp

示例11: if

    int win_svc_base::Main( int argc, char * argv[] )
    {
        //////////////////////////////////////////////////////////////////////////
        /// 命令行参数解析
        boost::program_options::options_description opts;
        opts.add_options()
            ("help", "options: --install --uninstall")
            ("install", "")
            ("uninstall", "")
            ("auto-start", "");

        boost::program_options::store(
            boost::program_options::parse_command_line(argc, argv, opts)
            , m_vm );

        //////////////////////////////////////////////////////////////////////////
        /// 定义SERVICE_TABLE_ENTRY DispatchTable[] 结构
        SERVICE_TABLE_ENTRYA DispatchTable[2] = 
        {
            {(char*)GetServiceName(), (LPSERVICE_MAIN_FUNCTIONA)GetServiceStartFunction()},                  
            {NULL, NULL}
        };

        if ( m_vm.count("help") )
        {
            /// 帮助
            std::cout << opts << std::endl;
        }
        else if ( m_vm.count("install") )
        {
            bool bAutoStart = (m_vm.count("auto-start") > 0);
            /// 安装服务
            if ( Install(bAutoStart) )
            {
                std::cout << "安装成功!" << std::endl;
                OnInstall(bAutoStart);
            }
            else
                std::cout << "安装失败!" << std::endl;
        }
        else if ( m_vm.count("uninstall") )
        {
            /// 卸载服务
            if ( Uninstall() )
                std::cout << "卸载成功!" << std::endl;
            else
                std::cout << "卸载失败!" << std::endl;
        }
        else
        {
            /// OS启动该程序
            BOOL bSuccessed = ::StartServiceCtrlDispatcherA(DispatchTable);
            //if (bSuccessed)
            //    LOG << "服务入口函数注册成功!" << std::endl;
            //else
            //    LOG << "服务入口函数注册失败!" << std::endl;
        }
        return 0;
    }
开发者ID:hyg19831230,项目名称:Bex,代码行数:59,代码来源:win32_service.cpp

示例12: Uninstall

void Vehicle::Dismiss()
{
    sLog.outDebug("Vehicle::Dismiss %u", me->GetEntry());
    Uninstall();
    me->SendObjectDeSpawnAnim(me->GetGUID());
    me->CombatStop();
    me->AddObjectToRemoveList();
}
开发者ID:LolJK,项目名称:PhantomCore,代码行数:8,代码来源:Vehicle.cpp

示例13: Uninstall

void
BPackageManager::Uninstall(const char* const* packages, int packageCount)
{
	BSolverPackageSpecifierList packagesToUninstall;
	if (!packagesToUninstall.AppendSpecifiers(packages, packageCount))
		throw std::bad_alloc();
	Uninstall(packagesToUninstall);
}
开发者ID:SummerSnail2014,项目名称:haiku,代码行数:8,代码来源:PackageManager.cpp

示例14: Uninstall

void Vehicle::Dismiss()
{
	if (GetBase()->GetTypeId() != TYPEID_UNIT)
		return;

	sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Dismiss Entry: %u, GuidLow %u", _creatureEntry, _me->GetGUIDLow());
	Uninstall();
	GetBase()->ToCreature()->DespawnOrUnsummon();
}
开发者ID:Mystiko,项目名称:MoPCore5.4.8,代码行数:9,代码来源:Vehicle.cpp

示例15: LOG4CPLUS_DEBUG

	long ServiceModule::RegisterServer(bool bService)
	{
		LOG4CPLUS_DEBUG(log,"register server.");
		Uninstall();
		if (bService)
		{
			return Install();
		}
		return 0;
	}
开发者ID:AricGod,项目名称:chilli,代码行数:10,代码来源:ServiceModule.cpp


注:本文中的Uninstall函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。