-
RunAutomated
鎖定
RunAutomated,確定是否出現了“/Automation”或“-Automation”選項,這指明服務器程序是否是由客户應用程序啓動的。
- 外文名
- RunAutomated
- 類
- CWinApp
- 頭文件
- afxwin.h
- 語 法
- BOOL RunAutomated();
RunAutomated基本介紹
類: CWinApp
頭文件:
afxwin.h
功能:
語法:
返回值:
如果函數找到了該選項,則返回非零值;否則返回零。
説明:
如果出現了“/Automation”或“-Automation”選項,則從命令行中清楚這個選項。
RunAutomated示例
/***********************************************************************
演示函數原型:theApp->RunAutomated();
程序功能説明:判斷是否出現了“/Automation”或“-Automation”選項而執行程序。
***********************************************************************/
//一段例程
class CTestApp : public CWinApp
{ public: CTestApp( );
CString str;//添加的對話框變量
... }
CTestApp *theApp=(CTestApp *)AfxGetApp( );
//判斷是否有Automation選項而執行程序
if(BOOL HR=theApp->RunAutomated())
theApp->str="函數找到了該選項";
else
theApp->str="NULL";
AfxMessageBox(theApp->str);
- 詞條統計
-
- 瀏覽次數:次
- 編輯次數:6次歷史版本
- 最近更新: 瞳瞳Trista