Operator Console
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AppThread Class Reference

Main thread/header file for the Operator Console application. More...

#include <AppThread.h>

Inheritance diagram for AppThread:
[legend]

Public Member Functions

 AppThread ()
 
 ~AppThread ()
 
void Quit ()
 
BOOL InitInstance ()
 
 AppThread ()
 
 ~AppThread ()
 
void Quit ()
 
BOOL InitInstance ()
 

Protected Member Functions

void CreatePipes ()
 
void CreatePipes ()
 

Protected Attributes

HANDLE m_stderr_Rd
 
HANDLE m_stderr_Wr
 
HANDLE m_stdout_Rd
 
HANDLE m_stdout_Wr
 

Detailed Description

Main thread/header file for the Operator Console application.

Constructor & Destructor Documentation

AppThread::AppThread ( )
23 {
24  // support Restart Manager
25  m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;
26 
27 }
AppThread::~AppThread ( )
30 {
31 }
AppThread::AppThread ( )
AppThread::~AppThread ( )

Member Function Documentation

void AppThread::CreatePipes ( )
protected

References m_stderr_Rd, m_stderr_Wr, m_stdout_Rd, and m_stdout_Wr.

Referenced by InitInstance().

89 {
90  SECURITY_ATTRIBUTES saAttr;
91 
92  saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
93  saAttr.bInheritHandle = TRUE;
94  saAttr.lpSecurityDescriptor = NULL;
95 
96  // Create a pipe for the child process's STDOUT.
97  // Ensure the read handle to the pipe for STDOUT is not inherited.
98 
99  CreatePipe(&m_stdout_Rd, &m_stdout_Wr, &saAttr, 0);
100  SetHandleInformation(m_stdout_Rd, HANDLE_FLAG_INHERIT, 0);
101 
102  CreatePipe(&m_stderr_Rd, &m_stderr_Wr, &saAttr, 0);
103  SetHandleInformation(m_stderr_Rd, HANDLE_FLAG_INHERIT, 0);
104 
105  SetStdHandle(STD_OUTPUT_HANDLE, m_stdout_Wr);
106  SetStdHandle(STD_ERROR_HANDLE, m_stderr_Wr);
107 }
HANDLE m_stderr_Wr
Definition: AppThread.h:60
HANDLE m_stdout_Wr
Definition: AppThread.h:62
HANDLE m_stderr_Rd
Definition: AppThread.h:59
HANDLE m_stdout_Rd
Definition: AppThread.h:61

Here is the caller graph for this function:

void AppThread::CreatePipes ( )
protected
BOOL AppThread::InitInstance ( )
BOOL AppThread::InitInstance ( )

References CreatePipes().

42 {
43 #if 0
44  //TODO: call AfxInitRichEdit2() to initialize richedit2 library.
45  // InitCommonControlsEx() is required on Windows XP if an application
46  // manifest specifies use of ComCtl32.dll version 6 or later to enable
47  // visual styles. Otherwise, any window creation will fail.
48  INITCOMMONCONTROLSEX InitCtrls;
49  InitCtrls.dwSize = sizeof(InitCtrls);
50  // Set this to include all the common control classes you want to use
51  // in your application.
52  InitCtrls.dwICC = ICC_WIN95_CLASSES;
53  InitCommonControlsEx(&InitCtrls);
54 
55  CWinApp::InitInstance();
56 
57  AfxEnableControlContainer();
58  AfxInitRichEdit(); // this must be called once before displaying a dialog that uses RichEdit control
59 
60  // Create the shell manager, in case the dialog contains
61  // any shell tree view or shell list view controls.
62  CShellManager *pShellManager = new CShellManager;
63 
64  // Activate "Windows Native" visual manager for enabling themes in MFC controls
65  CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
66 #else
67  CWinApp::InitInstance();
68 #endif
69 
70  CreatePipes();
71 
72  COperatorConsoleApp *thread = (COperatorConsoleApp *)AfxBeginThread(RUNTIME_CLASS(COperatorConsoleApp), 0, CREATE_SUSPENDED);
73 // thread->m_appInstance = hInstance;
74  thread->ResumeThread();
75  ::WaitForSingleObject(thread->m_hThread, INFINITE);
76 
77  // Delete the shell manager created above.
78 #if 0
79  if (pShellManager != NULL)
80  {
81  delete pShellManager;
82  }
83 #endif
84 
85  return FALSE;
86 }
The main class for the Operator Console Application.
Definition: OperatorConsole.h:174
void CreatePipes()
Definition: AppThread.cpp:88

Here is the call graph for this function:

void AppThread::Quit ( )
void AppThread::Quit ( )

Referenced by COperatorConsoleDlg::Quit().

Here is the caller graph for this function:

Member Data Documentation

HANDLE AppThread::m_stderr_Rd
protected

Referenced by CreatePipes().

HANDLE AppThread::m_stderr_Wr
protected

Referenced by CreatePipes().

HANDLE AppThread::m_stdout_Rd
protected

Referenced by CreatePipes().

HANDLE AppThread::m_stdout_Wr
protected

Referenced by CreatePipes().


The documentation for this class was generated from the following files: