?? execute.cpp
字號:
#include "stdafx.h"
#include "Execute.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
namespace SbjCore
{
namespace Sys
{
bool Execute(LPCTSTR lpszExe, LPCTSTR lpszCmdLine)
{
bool bRslt = false;
if ((lpszExe != NULL) && (_tcslen(lpszExe) > 0))
{
SHELLEXECUTEINFO theInfo;
ZeroMemory(&theInfo, sizeof(theInfo));
theInfo.cbSize = sizeof(SHELLEXECUTEINFO);
theInfo.lpVerb = _T("Open");
theInfo.nShow = SW_SHOW;
theInfo.lpFile = lpszExe;
theInfo.lpParameters = lpszCmdLine;
if (::ShellExecuteEx(&theInfo) == FALSE)
{
TRACE(_T("ShellExecuteEx() failed with %ul.\n"), ::GetLastError());
}
else
{
TRACE(_T("ShellExecuteEx() succeeded.\n"));
bRslt = true;
}
}
return bRslt;
}
}
}
//*** Modification History ***
// $Log: $
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -