⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 processutils.cpp

📁 funambol windows mobile plugin source code, the source code is taken from the funambol site
💻 CPP
字号:
#include "processUtils.h"
#include "pim/ClientSettings.h"
#include "base/startcmd.h"
#include <xstring>
using namespace std;


int startProgram(const wchar_t *app, const wchar_t *cmdline)
{   
    PROCESS_INFORMATION procinfo;
     
    wchar_t *path = NULL;
    path = toWideChar(getRegConfig()->getPath().c_str());
    wstring cmd;
    
    if (path) {
        cmd += path;
        delete [] path;
    }
    cmd += TEXT("\\"); cmd += app;

    LOG.debug("Running: %ls %ls\n", cmd.c_str(), cmdline);
    if( CreateProcess( cmd.c_str(), cmdline,
                        NULL, NULL, FALSE, 0,
                        NULL, NULL, NULL, &procinfo ) ) {
        return procinfo.dwProcessId;
    }
    else {
        //-- maybe the Registry entry is missing, trying startcmd()
        int pid = startcmd(app, cmdline);
        return pid;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -