<menu id="w8yyk"><menu id="w8yyk"></menu></menu>
  • <dd id="w8yyk"><nav id="w8yyk"></nav></dd>
    <menu id="w8yyk"></menu>
    <menu id="w8yyk"><code id="w8yyk"></code></menu>
    <menu id="w8yyk"></menu>
    <xmp id="w8yyk">
    <xmp id="w8yyk"><nav id="w8yyk"></nav>
  • 網站首頁 > 物聯資訊 > 技術分享

    深入淺出ShellExecute

    2016-09-28 00:00:00 廣州睿豐德信息科技有限公司 閱讀
    睿豐德科技 專注RFID識別技術和條碼識別技術與管理軟件的集成項目。質量追溯系統、MES系統、金蝶與條碼系統對接、用友與條碼系統對接

    Q: 如何打開一個應用程序?

    ShellExecute(this->m_hWnd,"open","calc.exe","","", SW_SHOW );

    ShellExecute(this->m_hWnd,"open","notepad.exe",      "c:\\MyLog.log","",SW_SHOW );

    正如您所看到的,我并沒有傳遞程序的完整路徑。


    深入淺出ShellExecute - Fly - 從C開始Q: 如何打開一個同系統程序相關連的文檔?

    ShellExecute(this->m_hWnd,"open",      "c:\\abc.txt","","",SW_SHOW );

    深入淺出ShellExecute - Fly - 從C開始Q: 如何打開一個網頁?

    ShellExecute(this->m_hWnd,"open",      "http://www.google.com","","", SW_SHOW );

    深入淺出ShellExecute - Fly - 從C開始Q: 如何激活相關程序,發送EMAIL?

    ShellExecute(this->m_hWnd,"open",      "mailto:nishinapp@yahoo.com","","", SW_SHOW );

    深入淺出ShellExecute - Fly - 從C開始Q: 如何用系統打印機打印文檔?

    ShellExecute(this->m_hWnd,"print",      "c:\\abc.txt","","", SW_HIDE);

    深入淺出ShellExecute - Fly - 從C開始Q: 如何用系統查找功能來查找指定文件?

    ShellExecute(m_hWnd,"find","d:\\nish",      NULL,NULL,SW_SHOW);

    深入淺出ShellExecute - Fly - 從C開始Q: 如何啟動一個程序,直到它運行結束?

    SHELLEXECUTEINFO ShExecInfo = {0};  ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);  ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;  ShExecInfo.hwnd = NULL;  ShExecInfo.lpVerb = NULL;  ShExecInfo.lpFile = "c:\\MyProgram.exe";    ShExecInfo.lpParameters = "";   ShExecInfo.lpDirectory = NULL;  ShExecInfo.nShow = SW_SHOW;  ShExecInfo.hInstApp = NULL;   ShellExecuteEx(&ShExecInfo);  WaitForSingleObject(ShExecInfo.hProcess,INFINITE);

    或:

    PROCESS_INFORMATION ProcessInfo;   STARTUPINFO StartupInfo; //This is an [in] parameter  ZeroMemory(&StartupInfo, sizeof(StartupInfo));  StartupInfo.cb = sizeof StartupInfo ; //Only compulsory field  if(CreateProcess("c:\\winnt\\notepad.exe", NULL,       NULL,NULL,FALSE,0,NULL,      NULL,&StartupInfo,&ProcessInfo))  {       WaitForSingleObject(ProcessInfo.hProcess,INFINITE);      CloseHandle(ProcessInfo.hThread);      CloseHandle(ProcessInfo.hProcess);  }    else  {      MessageBox("The process could not be started...");  }  

    深入淺出ShellExecute - Fly - 從C開始Q: 如何顯示文件或文件夾的屬性?

    SHELLEXECUTEINFO ShExecInfo ={0};  ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);  ShExecInfo.fMask = SEE_MASK_INVOKEIDLIST ;  ShExecInfo.hwnd = NULL;  ShExecInfo.lpVerb = "properties";  ShExecInfo.lpFile = "c:\\"; //can be a file as well  ShExecInfo.lpParameters = "";   ShExecInfo.lpDirectory = NULL;  ShExecInfo.nShow = SW_SHOW;  ShExecInfo.hInstApp = NULL;   ShellExecuteEx(&ShExecInfo); 
    RFID管理系統集成商 RFID中間件 條碼系統中間層 物聯網軟件集成
    最近免费观看高清韩国日本大全