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

📄 command.h

📁 vc++网络程序设计实例详解 人民邮电出版社1-2章源码
💻 H
字号:
#ifndef COMMAND_H
#define COMMAND_H

class CRemoteAdminDoc;
class CRemoteAdminView;
class CMachineView;
class CMainFrame;

struct SCommand  // Server machine uses this for ending threads
{
    BOOL m_bThreadExit;  // TRUE == exit thread, FALSE == continue
};

struct SExecuteCommand
{
    TCHAR m_szProcessPath[_MAX_PATH]; // Process to start 
    TCHAR m_szUsername[_MAX_PATH];    // client to log on
    TCHAR m_szDomain[_MAX_PATH];      // domain of client's account
    TCHAR m_szPassword[_MAX_PATH];    // client's password
};


// Since worker threads cannot call the global, GetDocument(), GetMachineView(),
// or GetRemoteAdminView() as windows GUI elments acnnot be accesed from 
// worker threads, it crashes.
// Hence we wrap these values in these structures and pass them to the worker
// threads

//SDocView is passed to the thread function, UpdateprocessListForAllMachines()
struct SDocView
{
    CRemoteAdminDoc*  pDoc;
    CRemoteAdminView* pRemoteAdminView;
    CMachineView*     pMachineView;
};

// SConnectInfo is passed to the thread function, ConnectToMachine()
struct SConnectInfo
{
    CRemoteAdminDoc*  pDoc;
    CRemoteAdminView* pRemoteAdminView;
    CMachineView*     pMachineView;
    CString           strIP;
    CString           strPwd;
};

struct SSysShutDownInfo
{
    BOOL bShutDown;   // TRUE if you want to shutdown,FALSE if want to cancel shutdown
    BOOL bReboot;     // Reboot if TRUE, else HALT if FALSE
    UINT iTimeToShutDown; // Time given to user before shutdown in secs
};


#endif // COMMAND_H

⌨️ 快捷键说明

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