Skip to content

Commit

Permalink
Resending first full commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tcumby committed Nov 21, 2013
1 parent 07361e2 commit 3c8a8a8
Show file tree
Hide file tree
Showing 154 changed files with 23,186 additions and 13 deletions.
246 changes: 233 additions & 13 deletions .gitignore
@@ -1,13 +1,233 @@
# Compiled Object files
*.slo
*.lo
*.o

# Compiled Dynamic libraries
*.so
*.dylib

# Compiled Static libraries
*.lai
*.la
*.a
#################
## Eclipse
#################

*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath


#################
## Visual Studio
#################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results

[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.Publish.xml
*.pubxml

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf

#############
## Windows detritus
#############

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac crap
.DS_Store


#############
## Python
#############

*.py[co]

# Packages
*.egg
*.egg-info
dist/
build/
eggs/
parts/
var/
sdist/
develop-eggs/
.installed.cfg

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox

#Translations
*.mo

#Mr Developer
.mr.developer.cfg

#############
## Other
#############
.svn/
My Inspector XE Results - OperatorConsole/
old_imatest_lib_files/
Documentation/
imatest_library.*
*.m
Doxyfile
Spec_full*
foo.cpp
main.cpp
*.bat
copyright_notice.txt


107 changes: 107 additions & 0 deletions AppThread.cpp
@@ -0,0 +1,107 @@

// AppThread.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "AppThread.h"
#include "OperatorConsole.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// AppThread
BEGIN_MESSAGE_MAP(AppThread, CWinApp)
ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
END_MESSAGE_MAP()


// AppThread construction

AppThread::AppThread()
{
// support Restart Manager
m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;

}

AppThread::~AppThread()
{
}


// The one and only AppThread object

AppThread theApp;

// AppThread initialization


BOOL AppThread::InitInstance()
{
#if 0
//TODO: call AfxInitRichEdit2() to initialize richedit2 library.
// InitCommonControlsEx() is required on Windows XP if an application
// manifest specifies use of ComCtl32.dll version 6 or later to enable
// visual styles. Otherwise, any window creation will fail.
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
// Set this to include all the common control classes you want to use
// in your application.
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);

CWinApp::InitInstance();

AfxEnableControlContainer();
AfxInitRichEdit(); // this must be called once before displaying a dialog that uses RichEdit control

// Create the shell manager, in case the dialog contains
// any shell tree view or shell list view controls.
CShellManager *pShellManager = new CShellManager;

// Activate "Windows Native" visual manager for enabling themes in MFC controls
CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
#else
CWinApp::InitInstance();
#endif

CreatePipes();

COperatorConsoleApp *thread = (COperatorConsoleApp *)AfxBeginThread(RUNTIME_CLASS(COperatorConsoleApp), 0, CREATE_SUSPENDED);
// thread->m_appInstance = hInstance;
thread->ResumeThread();
::WaitForSingleObject(thread->m_hThread, INFINITE);

// Delete the shell manager created above.
#if 0
if (pShellManager != NULL)
{
delete pShellManager;
}
#endif

return FALSE;
}

void AppThread::CreatePipes()
{
SECURITY_ATTRIBUTES saAttr;

saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
saAttr.bInheritHandle = TRUE;
saAttr.lpSecurityDescriptor = NULL;

// Create a pipe for the child process's STDOUT.
// Ensure the read handle to the pipe for STDOUT is not inherited.

CreatePipe(&m_stdout_Rd, &m_stdout_Wr, &saAttr, 0);
SetHandleInformation(m_stdout_Rd, HANDLE_FLAG_INHERIT, 0);

CreatePipe(&m_stderr_Rd, &m_stderr_Wr, &saAttr, 0);
SetHandleInformation(m_stderr_Rd, HANDLE_FLAG_INHERIT, 0);

SetStdHandle(STD_OUTPUT_HANDLE, m_stdout_Wr);
SetStdHandle(STD_ERROR_HANDLE, m_stderr_Wr);
}

0 comments on commit 3c8a8a8

Please sign in to comment.