Moved modified HL SDK to trunk

This commit is contained in:
Scott Ehlert
2006-08-27 02:22:59 +00:00
parent 28c4ea4fec
commit 30235e05e5
900 changed files with 344676 additions and 0 deletions

View File

@ -0,0 +1,55 @@
// ServerCtrl.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "ServerCtrl.h"
#include "ServerCtrlDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CServerCtrlApp
BEGIN_MESSAGE_MAP(CServerCtrlApp, CWinApp)
//{{AFX_MSG_MAP(CServerCtrlApp)
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CServerCtrlApp construction
CServerCtrlApp::CServerCtrlApp()
{
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CServerCtrlApp object
CServerCtrlApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CServerCtrlApp initialization
BOOL CServerCtrlApp::InitInstance()
{
// Standard initialization
CServerCtrlDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
}
else if (nResponse == IDCANCEL)
{
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}

View File

@ -0,0 +1,59 @@
// ServerCtrl.h : main header file for the ServerCtrl application
//
#if !defined(AFX_ServerCtrl_H__E2974CA6_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_)
#define AFX_ServerCtrl_H__E2974CA6_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_
#if _MSC_VER > 1000
#ifdef _WIN32
#ifndef __MINGW32__
#pragma once
#endif /* not __MINGW32__ */
#endif
#endif // _MSC_VER > 1000
#if defined _MSC_VER && _MSC_VER >= 1400
#ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE
#endif
#pragma warning(disable: 4996) // deprecated functions
#endif
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
// CServerCtrlApp:
// See ServerCtrl.cpp for the implementation of this class
//
class CServerCtrlApp : public CWinApp
{
public:
CServerCtrlApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CServerCtrlApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CServerCtrlApp)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ServerCtrl_H__E2974CA6_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_)

View File

@ -0,0 +1,179 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
"#ifdef _WIN32\r\n"
"LANGUAGE 9, 1\r\n"
"#pragma code_page(1252)\r\n"
"#endif //_WIN32\r\n"
"#include ""res\\serverctrl.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
"#include ""afxres.rc"" // Standard components\r\n"
"#endif\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME ICON DISCARDABLE "res\\serverctrl.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_SERVERCTRL_DIALOG DIALOGEX 0, 0, 549, 281
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Valve Server Controller"
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Execute",IDC_BTN_EXECUTE,160,7,48,12
PUSHBUTTON "Get Text",IDC_BTN_GET,159,24,48,12
PUSHBUTTON "Start Server",IDC_BTN_START,478,54,64,12
DEFPUSHBUTTON "OK",IDOK,492,7,50,14
EDITTEXT IDC_EDIT_COMMANDS,7,7,144,12,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_CONSOLE,7,56,434,218,ES_MULTILINE |
ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY
END
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "serverctrl MFC Application\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "serverctrl\0"
VALUE "LegalCopyright", "Copyright (C) 2000\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "serverctrl.EXE\0"
VALUE "ProductName", "serverctrl Application\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_SERVERCTRL_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 542
TOPMARGIN, 7
BOTTOMMARGIN, 274
END
END
#endif // APSTUDIO_INVOKED
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif //_WIN32
#include "res\serverctrl.rc2" // non-Microsoft Visual C++ edited resources
#include "afxres.rc" // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -0,0 +1,662 @@
// ServerCtrlDlg.cpp : implementation file
//
#include "stdafx.h"
#include <afxpriv.h>
#include <mmsystem.h>
#include "ServerCtrl.h"
#include "ServerCtrlDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
// Each ENGINE command token is a 32 bit integer
#define ENGINE_ISSUE_COMMANDS 0x2
// Param1 : char * text to issue
#define ENGINE_RETRIEVE_CONSOLE_CONTENTS 0x3
// Param1 : int32 Begin line
// Param2 : int32 End line
#define ENGINE_RETRIEVE_GET_CONSOLE_HEIGHT 0x4
// No params
#define ENGINE_RETRIEVE_SET_CONSOLE_HEIGHT 0x5
// Param1 : int32 Number of lines
/////////////////////////////////////////////////////////////////////////////
// CServerCtrlDlg dialog
CServerCtrlDlg::CServerCtrlDlg(CWnd* pParent /*=NULL*/)
: CDialog(CServerCtrlDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CServerCtrlDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
memset( &PI, 0, sizeof( PI ) );
m_nPendingRequest = 0;
m_nPendingLines = 0;
m_hMappedFile = (HANDLE)0;
m_hSend = (HANDLE)0;
m_hReceive = (HANDLE)0;
m_bOnlyPumpIfMessageInQueue = FALSE;
}
void CServerCtrlDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CServerCtrlDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CServerCtrlDlg, CDialog)
//{{AFX_MSG_MAP(CServerCtrlDlg)
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_BTN_START, OnBtnStart)
ON_BN_CLICKED(IDC_BTN_EXECUTE, OnBtnExecute)
ON_BN_CLICKED(IDC_BTN_GET, OnBtnGet)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
int CServerCtrlDlg::RunModalLoop(DWORD dwFlags)
{
ASSERT(::IsWindow(m_hWnd)); // window must be created
ASSERT(!(m_nFlags & WF_MODALLOOP)); // window must not already be in modal state
// for tracking the idle time state
BOOL bIdle = TRUE;
LONG lIdleCount = 0;
BOOL bShowIdle = (dwFlags & MLF_SHOWONIDLE) && !(GetStyle() & WS_VISIBLE);
HWND hWndParent = ::GetParent(m_hWnd);
m_nFlags |= (WF_MODALLOOP|WF_CONTINUEMODAL);
#if _MSC_VER < 1300
MSG* pMsg = &AfxGetThread()->m_msgCur;
#else
MSG* pMsg = &AfxGetThreadState()->m_msgCur;
#endif
// acquire and dispatch messages until the modal state is done
for (;;)
{
ASSERT(ContinueModal());
int iRet = RMLPreIdle();
if (iRet < 0)
goto ExitModal;
else if (iRet > 0)
continue;
// phase1: check to see if we can do idle work
while (bIdle &&
!::PeekMessage(pMsg, NULL, NULL, NULL, PM_NOREMOVE))
{
ASSERT(ContinueModal());
// show the dialog when the message queue goes idle
if (bShowIdle)
{
ShowWindow(SW_SHOWNORMAL);
UpdateWindow();
bShowIdle = FALSE;
}
// call OnIdle while in bIdle state
if (!(dwFlags & MLF_NOIDLEMSG) && hWndParent != NULL && lIdleCount == 0)
{
// send WM_ENTERIDLE to the parent
::SendMessage(hWndParent, WM_ENTERIDLE, MSGF_DIALOGBOX, (LPARAM)m_hWnd);
}
if ((dwFlags & MLF_NOKICKIDLE) ||
!SendMessage(WM_KICKIDLE, MSGF_DIALOGBOX, lIdleCount++))
{
// stop idle processing next time
bIdle = FALSE;
}
}
// phase2: pump messages while available
do
{
BOOL ShouldPump = TRUE;
ASSERT(ContinueModal());
// See if we are requiring messages to be in queue?
if ( m_bOnlyPumpIfMessageInQueue )
{
// If there isn't a message, don't turn over control to PumpMessage
// since it will block
if ( !::PeekMessage( pMsg, NULL, NULL, NULL, PM_NOREMOVE ) )
{
ShouldPump = FALSE;
}
}
// pump message, but quit on WM_QUIT
if ( ShouldPump )
{
if (!AfxGetThread()->PumpMessage())
{
AfxPostQuitMessage(0);
return -1;
}
// show the window when certain special messages rec'd
if (bShowIdle &&
(pMsg->message == 0x118 || pMsg->message == WM_SYSKEYDOWN))
{
ShowWindow(SW_SHOWNORMAL);
UpdateWindow();
bShowIdle = FALSE;
}
if (!ContinueModal())
goto ExitModal;
// reset "no idle" state after pumping "normal" message
if (AfxGetThread()->IsIdleMessage(pMsg))
{
bIdle = TRUE;
lIdleCount = 0;
}
}
} while (::PeekMessage(pMsg, NULL, NULL, NULL, PM_NOREMOVE));
}
ExitModal:
m_nFlags &= ~(WF_MODALLOOP|WF_CONTINUEMODAL);
return m_nModalResult;
}
int CServerCtrlDlg::DoModal()
{
// can be constructed with a resource template or InitModalIndirect
ASSERT(m_lpszTemplateName != NULL || m_hDialogTemplate != NULL ||
m_lpDialogTemplate != NULL);
// load resource as necessary
LPCDLGTEMPLATE lpDialogTemplate = m_lpDialogTemplate;
HGLOBAL hDialogTemplate = m_hDialogTemplate;
HINSTANCE hInst = AfxGetResourceHandle();
if (m_lpszTemplateName != NULL)
{
hInst = AfxFindResourceHandle(m_lpszTemplateName, RT_DIALOG);
HRSRC hResource = ::FindResource(hInst, m_lpszTemplateName, RT_DIALOG);
hDialogTemplate = LoadResource(hInst, hResource);
}
if (hDialogTemplate != NULL)
lpDialogTemplate = (LPCDLGTEMPLATE)LockResource(hDialogTemplate);
// return -1 in case of failure to load the dialog template resource
if (lpDialogTemplate == NULL)
return -1;
// disable parent (before creating dialog)
HWND hWndParent = PreModal();
AfxUnhookWindowCreate();
BOOL bEnableParent = FALSE;
if (hWndParent != NULL && ::IsWindowEnabled(hWndParent))
{
::EnableWindow(hWndParent, FALSE);
bEnableParent = TRUE;
}
TRY
{
// create modeless dialog
AfxHookWindowCreate(this);
if (CreateDlgIndirect(lpDialogTemplate,
CWnd::FromHandle(hWndParent), hInst))
{
if (m_nFlags & WF_CONTINUEMODAL)
{
// enter modal loop
DWORD dwFlags = MLF_SHOWONIDLE;
if (GetStyle() & DS_NOIDLEMSG)
dwFlags |= MLF_NOIDLEMSG;
VERIFY(RunModalLoop(dwFlags) == m_nModalResult);
}
// hide the window before enabling the parent, etc.
if (m_hWnd != NULL)
SetWindowPos(NULL, 0, 0, 0, 0, SWP_HIDEWINDOW|
SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER);
}
}
CATCH_ALL(e)
{
//DELETE_EXCEPTION(e);
m_nModalResult = -1;
}
END_CATCH_ALL
if (bEnableParent)
::EnableWindow(hWndParent, TRUE);
if (hWndParent != NULL && ::GetActiveWindow() == m_hWnd)
::SetActiveWindow(hWndParent);
// destroy modal window
DestroyWindow();
PostModal();
// unlock/free resources as necessary
if (m_lpszTemplateName != NULL || m_hDialogTemplate != NULL)
UnlockResource(hDialogTemplate);
if (m_lpszTemplateName != NULL)
FreeResource(hDialogTemplate);
return m_nModalResult;
}
void CServerCtrlDlg::SetPumpIfQueued( BOOL bValue )
{
m_bOnlyPumpIfMessageInQueue = bValue;
}
/////////////////////////////////////////////////////////////////////////////
// CServerCtrlDlg message handlers
BOOL CServerCtrlDlg::OnInitDialog()
{
CDialog::OnInitDialog();
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
SetPumpIfQueued( TRUE );
return TRUE; // return TRUE unless you set the focus to a control
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.
void CServerCtrlDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}
HCURSOR CServerCtrlDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
/////////////////////////////////////
/////////////////////////////////////
// IMPORTANT STUFF STARTS HERE
/////////////////////////////////////
/*
=====================
ProcessMappedResponse
The engine has signaled the receive event, see what the results of the command we issued are.
=====================
*/
int CServerCtrlDlg::ProcessMappedResponse( void )
{
char *psz;
int *pBuffer;
int i;
char line[ 1024 ];
char szwindow[ 4096 ];
CEdit *pEdit;
pBuffer = (int *)GetMappedBuffer ( m_hMappedFile );
// buffer is invalid. Just leave.
if ( !pBuffer )
{
return 0;
}
// Will be non-zero upon success
if ( pBuffer[0] )
{
switch ( m_nPendingRequest )
{
case ENGINE_RETRIEVE_CONSOLE_CONTENTS:
// Write text lines to console area
pEdit = (CEdit *)GetDlgItem( IDC_EDIT_CONSOLE );
if ( pEdit )
{
szwindow[ 0 ] = '\0';
for ( i = 0; i < m_nPendingLines; i++ )
{
// Skip first int32 result code
// Lines are assumed to be 80 characters wide
psz = (char *)( pBuffer + 1 ) + 80 * i;
strncpy( line, psz, 80 );
line[ 79 ] = '\0';
strcat( szwindow, line );
if ( i != ( m_nPendingLines ) - 1 )
{
strcat( szwindow, "\r\n" );
}
}
// Send to display control
pEdit->SetWindowText( szwindow );
}
break;
default:
break;
}
}
// Reset results stuff
m_nPendingRequest = 0;
m_nPendingLines = 0;
// Free up buffer pointer
ReleaseMappedBuffer( pBuffer );
return 1;
}
/*
==============
GetMappedBuffer
==============
*/
LPVOID CServerCtrlDlg::GetMappedBuffer (HANDLE hfileBuffer)
{
LPVOID pBuffer;
pBuffer = MapViewOfFile (hfileBuffer, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0);
return pBuffer;
}
/*
==============
ReleaseMappedBuffer
==============
*/
void CServerCtrlDlg::ReleaseMappedBuffer (LPVOID pBuffer)
{
UnmapViewOfFile (pBuffer);
}
/*
==============
OnBtnStart
==============
*/
void CServerCtrlDlg::OnBtnStart( void )
{
STARTUPINFO SI;
// Still active? Or did user kill it or did it crash
if ( PI.hProcess )
{
DWORD dwEC;
if ( GetExitCodeProcess( PI.hProcess, &dwEC ) )
{
if ( dwEC == STILL_ACTIVE )
{
return;
}
else
{
memset( &PI, 0, sizeof( PI ) );
CloseHandles();
}
}
}
// Really still active
if ( PI.hProcess || m_hMappedFile || m_hSend || m_hReceive )
return;
// Startup dedicated server
SECURITY_ATTRIBUTES SA;
memset( &SA, 0, sizeof( SA ) );
SA.nLength = sizeof( SA );
// HLDS must be able to inherit the handles we pass via command line so we need to mark the handle as inheritable
SA.bInheritHandle = TRUE;
SA.lpSecurityDescriptor = NULL;
// Create handles && hlds process
m_hMappedFile = CreateFileMapping( (HANDLE)0xFFFFFFFF, &SA, PAGE_READWRITE, 0, 16384, NULL );
if ( !m_hMappedFile )
{
AfxMessageBox( "Couldn't create mapped file", MB_OK );
return;
}
// Uses same security attributes to make handle inheritable
m_hSend = CreateEvent( &SA, FALSE, FALSE, NULL );
m_hReceive = CreateEvent( &SA, FALSE, FALSE, NULL );
memset( &SI, 0, sizeof( SI ) );
SI.cb = sizeof( SI );
memset( &PI, 0, sizeof( PI ) );
char sz[ 256 ];
char szdir[ 256 ];
// FIXME: You'll want to fill in your executable path here, of course.
// The key thing is to invoke the engine using the three HANDLES that were just created
sprintf( szdir, "d:\\quiver" );
sprintf( sz, "%s\\hlds.exe +sv_lan 1 -HFILE %i -HPARENT %i -HCHILD %i", szdir, (int)m_hMappedFile, (int)m_hSend, (int)m_hReceive );
// Run it
if ( !CreateProcess( NULL, sz, &SA, NULL, TRUE, 0, NULL, szdir, &SI, &PI ) )
{
AfxMessageBox( "Couldn't create dedicated server process? Correct path", MB_OK );
}
}
/*
==============
~CServerCtrlDlg
==============
*/
CServerCtrlDlg::~CServerCtrlDlg( void )
{
// Quitting the front end can kill HLDS, if you want it to, since we created that process
if ( PI.hProcess )
{
// Kill process
TerminateProcess( PI.hProcess, 0 );
memset( &PI, 0, sizeof( PI ) );
}
// Close remaining handles.
CloseHandles();
}
/*
==============
OnBtnExecute
User wants to issue commands
==============
*/
void CServerCtrlDlg::OnBtnExecute( void )
{
if ( !m_hSend || !m_hMappedFile )
return;
// Get commands
CEdit *pEdit = (CEdit *)GetDlgItem( IDC_EDIT_COMMANDS );
if ( pEdit )
{
CString cmds;
pEdit->GetWindowText( cmds );
// Get buffer
char *sz = (char *)GetMappedBuffer( m_hMappedFile );
if ( sz )
{
// Write command int32 token
*(int *)&sz[ 0 ] = ENGINE_ISSUE_COMMANDS;
// Write rest of line, including a return character ( necessary? )
sprintf( sz + sizeof( int ), "%s\n", (char *)(LPCSTR)cmds );
// Release the buffer
ReleaseMappedBuffer( sz );
// Store off what we are expecting in return buffer
m_nPendingRequest = ENGINE_ISSUE_COMMANDS;
// Signal HLDS to check for requests
SetEvent( m_hSend );
}
}
}
/*
==============
OnBtnGet
==============
*/
void CServerCtrlDlg::OnBtnGet( void )
{
RefreshText();
}
/*
==============
CloseHandles
==============
*/
void CServerCtrlDlg::CloseHandles( void )
{
if (m_hMappedFile )
{
CloseHandle( m_hMappedFile );
m_hMappedFile = ( HANDLE)0;
}
if ( m_hSend )
{
CloseHandle( m_hSend );
m_hSend = (HANDLE)0;
}
if ( m_hReceive )
{
CloseHandle( m_hReceive );
m_hReceive = (HANDLE)0;
}
}
/*
==============
RefreshText
==============
*/
void CServerCtrlDlg::RefreshText( void )
{
if ( !m_hSend || !m_hMappedFile )
return;
int i = 0;
char *sz = (char *)GetMappedBuffer( m_hMappedFile );
if ( sz )
{
// Command token
*(int *)&sz[ i ] = ENGINE_RETRIEVE_CONSOLE_CONTENTS;
i += sizeof( int );
// Start at line 0
*(int *)&sz[ i ] = 0;
i += sizeof( int );
// End at line 23 ( assumes 24 line console )
*(int *)&sz[ i ] = 23;
i += sizeof( int );
// Done creating commands
ReleaseMappedBuffer( sz );
// Store off pending state info
m_nPendingRequest = ENGINE_RETRIEVE_CONSOLE_CONTENTS;
m_nPendingLines = 23 - 0 + 1;
// Signal HLDS that we have written commands to the buffer
SetEvent( m_hSend );
}
}
/*
==============
RMLPreIdle
Called every "frame" by the modal dialog loop
==============
*/
int CServerCtrlDlg::RMLPreIdle(void)
{
static DWORD lastupdate;
DWORD currenttime;
// Haven't started up HLDS
if ( !m_hReceive || !m_hSend || !m_hMappedFile )
return 0;
// Refresh console text every 1/2 second
currenttime = timeGetTime();
if ( ( currenttime - lastupdate ) > 500 )
{
lastupdate = currenttime;
RefreshText();
}
// Has event fired? Signaling that we have received a response from the engine?
if ( WaitForSingleObject( m_hReceive, 0 ) == WAIT_OBJECT_0 )
{
// Process response
ProcessMappedResponse();
}
return 0;
}

View File

@ -0,0 +1,83 @@
// ServerCtrlDlg.h : header file
//
#if !defined(AFX_ServerCtrlDLG_H__E2974CA8_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_)
#define AFX_ServerCtrlDLG_H__E2974CA8_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_
#if _MSC_VER > 1000
#ifdef _WIN32
#ifndef __MINGW32__
#pragma once
#endif /* not __MINGW32__ */
#endif
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CServerCtrlDlg dialog
class CServerCtrlDlg : public CDialog
{
// Construction
public:
CServerCtrlDlg( CWnd* pParent = NULL ); // standard constructor
~CServerCtrlDlg( void );
void CloseHandles( void );
virtual int RMLPreIdle(void);
int RunModalLoop(DWORD dwFlags);
int DoModal( void );
void SetPumpIfQueued( BOOL bValue );
void RefreshText( void );
int ProcessMappedResponse( void );
LPVOID GetMappedBuffer ( HANDLE hfileBuffer );
void ReleaseMappedBuffer ( LPVOID pBuffer );
// Dialog Data
//{{AFX_DATA(CServerCtrlDlg)
enum { IDD = IDD_SERVERCTRL_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CServerCtrlDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CServerCtrlDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnBtnStart();
afx_msg void OnBtnExecute();
afx_msg void OnBtnGet();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
PROCESS_INFORMATION PI; // Information about the HLDS process ( mostly the HANDLE )
HANDLE m_hMappedFile; // Shared file for sending/receiving commands to HLDS
HANDLE m_hSend; // Event that will be signaled when we have written commands into mapped file
HANDLE m_hReceive; // Engine will set this when it has readied response to our commands
int m_nPendingRequest; // The last request we issued
int m_nPendingLines; // Number of console lines we want to receive
BOOL m_bOnlyPumpIfMessageInQueue; // TRUE if we should only go into PumpMessage ( which blocks ) if we have seen a message in the MSG queue using PeekMessage
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ServerCtrlDLG_H__E2974CA8_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_)

View File

@ -0,0 +1,8 @@
// stdafx.cpp : source file that includes just the standard includes
// serverctrl.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"

View File

@ -0,0 +1,30 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__E2974CAA_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_)
#define AFX_STDAFX_H__E2974CAA_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_
#if _MSC_VER > 1000
#ifdef _WIN32
#ifndef __MINGW32__
#pragma once
#endif /* not __MINGW32__ */
#endif
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__E2974CAA_EF9F_11D3_A4D9_00105A1727F3__INCLUDED_)

View File

@ -0,0 +1,144 @@
# Microsoft Developer Studio Project File - Name="serverctrl" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=serverctrl - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "serverctrl.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "serverctrl.mak" CFG="serverctrl - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "serverctrl - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "serverctrl - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "serverctrl - Win32 Release"
# PROP BASE Use_MFC 5
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 5
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
# ADD LINK32 winmm.lib /nologo /subsystem:windows /machine:I386
!ELSEIF "$(CFG)" == "serverctrl - Win32 Debug"
# PROP BASE Use_MFC 5
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 5
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "serverctrl - Win32 Release"
# Name "serverctrl - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\ServerCtrl.cpp
# End Source File
# Begin Source File
SOURCE=..\ServerCtrl.rc
# End Source File
# Begin Source File
SOURCE=..\ServerCtrlDlg.cpp
# End Source File
# Begin Source File
SOURCE=..\StdAfx.cpp
# ADD CPP /Yc"stdafx.h"
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\Resource.h
# End Source File
# Begin Source File
SOURCE=..\ServerCtrl.h
# End Source File
# Begin Source File
SOURCE=..\ServerCtrlDlg.h
# End Source File
# Begin Source File
SOURCE=..\StdAfx.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=..\res\serverctrl.ico
# End Source File
# Begin Source File
SOURCE=..\res\serverctrl.rc2
# End Source File
# End Group
# End Target
# End Project

View File

@ -0,0 +1,255 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="serverctrl"
ProjectGUID="{6A950C0B-B04F-4305-876B-2B4166F0246D}"
SccProjectName=""
SccLocalPath=""
Keyword="MFCProj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="1"
UseOfMFC="1"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="3"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\Debug/serverctrl.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/IGNORE:4089"
AdditionalDependencies="winmm.lib"
OutputFile=".\Debug/serverctrl.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/serverctrl.pdb"
SubSystem="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Debug/serverctrl.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="1"
UseOfMFC="1"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="3"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\Release/serverctrl.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/IGNORE:4089"
AdditionalDependencies="winmm.lib"
OutputFile=".\Release/serverctrl.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ProgramDatabaseFile=".\Release/serverctrl.pdb"
SubSystem="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/serverctrl.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="..\ServerCtrl.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions=""
BasicRuntimeChecks="3"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="..\ServerCtrl.rc">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
AdditionalIncludeDirectories="\Documents and Settings\Scott\My Documents\HL Programming\hlsdk\utils\serverctrl"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
AdditionalIncludeDirectories="\Documents and Settings\Scott\My Documents\HL Programming\hlsdk\utils\serverctrl"/>
</FileConfiguration>
</File>
<File
RelativePath="..\ServerCtrlDlg.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions=""
BasicRuntimeChecks="3"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="..\StdAfx.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
UsePrecompiledHeader="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""
UsePrecompiledHeader="1"/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="..\Resource.h">
</File>
<File
RelativePath="..\ServerCtrl.h">
</File>
<File
RelativePath="..\ServerCtrlDlg.h">
</File>
<File
RelativePath="..\StdAfx.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
<File
RelativePath="..\res\serverctrl.ico">
</File>
<File
RelativePath="..\res\serverctrl.rc2">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,346 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="serverctrl"
ProjectGUID="{6A950C0B-B04F-4305-876B-2B4166F0246D}"
Keyword="MFCProj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="1"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug/serverctrl.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\Debug/serverctrl.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/IGNORE:4089"
AdditionalDependencies="winmm.lib"
OutputFile=".\Debug/serverctrl.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\Debug/serverctrl.pdb"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="1"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release/serverctrl.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\Release/serverctrl.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/IGNORE:4089"
AdditionalDependencies="winmm.lib"
OutputFile=".\Release/serverctrl.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile=".\Release/serverctrl.pdb"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\ServerCtrl.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="..\ServerCtrl.rc"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
AdditionalIncludeDirectories="\Documents and Settings\Scott\My Documents\HL Programming\hlsdk\utils\serverctrl"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
AdditionalIncludeDirectories="\Documents and Settings\Scott\My Documents\HL Programming\hlsdk\utils\serverctrl"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\ServerCtrlDlg.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="..\StdAfx.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
PreprocessorDefinitions=""
UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\Resource.h"
>
</File>
<File
RelativePath="..\ServerCtrl.h"
>
</File>
<File
RelativePath="..\ServerCtrlDlg.h"
>
</File>
<File
RelativePath="..\StdAfx.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
<File
RelativePath="..\res\serverctrl.ico"
>
</File>
<File
RelativePath="..\res\serverctrl.rc2"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,13 @@
//
// SERVERCTRL.RC2 - resources Microsoft Visual C++ does not edit directly
//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// Add manually edited resources here...
/////////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,22 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by serverctrl.rc
//
#define IDD_SERVERCTRL_DIALOG 102
#define IDR_MAINFRAME 128
#define IDC_EDIT_COMMANDS 1000
#define IDC_BTN_EXECUTE 1001
#define IDC_BTN_START 1003
#define IDC_BTN_GET 1004
#define IDC_EDIT_CONSOLE 1005
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1006
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif