{
PROCESS_INFORMATION pi;
STARTUPINFO si;
+ static CHAR Title[] = "debugged program console";
// Set up the start up info struct.
ZeroMemory(&si,sizeof(STARTUPINFO));
si.hStdOutput = hChildStdOut;
si.hStdInput = hChildStdIn;
si.hStdError = hChildStdErr;
- si.lpTitle = "debugged program console";
+ si.lpTitle = Title;
// Use this if you want to hide the child:
// si.wShowWindow = SW_HIDE;
// Note that dwFlags must include STARTF_USESHOWWINDOW if you want to
return TAB_WIDTH;
}
-BOOL CConsole::SetTitle(TCHAR *p)
+BOOL CConsole::SetTitle(const TCHAR *p)
{
return SetConsoleTitle(p);
}
m_pchBuffer[dwLastCharOffset] = 0; // terminate string in buffer
ret = Write(m_pchBuffer);
m_History.AddHistoryLine(m_pchBuffer);
- TCHAR *strLF = _T("\n");
+ static TCHAR strLF[] = _T("\n");
ret = Write(strLF);
break;
}
m_Lines = 0;
}
-BOOL CConsole::WriteString(TCHAR *pchString, COORD Position)
+BOOL CConsole::WriteString(const TCHAR *pchString, COORD Position)
{
CHAR_INFO ciBuffer[256];
int nSize = _tcslen(pchString);
// BOOL SetInputMode(DWORD dwMode);
BOOL SetTextAttribute(WORD wAttributes);
BOOL GetTextAttribute(WORD& rwAttributes);
- BOOL SetTitle(TCHAR *p);
+ BOOL SetTitle(const TCHAR *p);
BOOL Write(const TCHAR *p, DWORD dwChars = 0);
CConsole();
virtual ~CConsole();
COORD m_BufferSize;
WORD m_wAttributes;
SHORT m_Lines;
- BOOL WriteString(TCHAR *pchString, COORD Position);
+ BOOL WriteString(const TCHAR *pchString, COORD Position);
BOOL WriteChar(TCHAR ch);
BOOL m_blnInsetMode; // TRUE - insert, FALSE - overwrite
DWORD m_dwInsertModeCursorHeight;
#include "ph.h"
#include "RegistryKey.h"
-static TCHAR *g_ppszHiveNames[] =
+static const TCHAR *g_ppszHiveNames[] =
{
_T("HKEY_CLASSES_ROOT"),
_T("HKEY_CURRENT_USER"),
GotoRoot(); // This is full absolute path.
// split path to key names.
- TCHAR *pszSeps = _T("\\");
+ const TCHAR *pszSeps = _T("\\");
// Make buffer and copy relative path into it.
TCHAR *pszBuffer = new TCHAR[_tcslen(pszRelativePath)+1];
}
}
- TCHAR *pszNewKey = _tcstok(pszBuffer,pszSeps);
+ const TCHAR *pszNewKey = _tcstok(pszBuffer,pszSeps);
if ((!pszNewKey)&&((*pszRelativePath != _T('\\'))||(*(pszRelativePath+1) != 0)))
{
CRegistryKey Key;
TCHAR *pszValueNamePattern;
+ const TCHAR *pszEmpty = _T("");
const TCHAR *pszPath;
if (blnHelp)
}
else
{
- pszValueNamePattern = _T("");
+ pszValueNamePattern = (TCHAR*)pszEmpty;
pszPath = _T(".");
}
CRegistryKey Key;
TCHAR *pszValueName;
+ const TCHAR *pszEmpty = _T("");
const TCHAR *pszPath;
if (blnHelp)
}
else
{
- pszValueName = _T("");
+ pszValueName = (TCHAR*)pszEmpty;
pszPath = _T(".");
}
CRegistryKey Key;
TCHAR *pchValueName;
+ const TCHAR *pszEmpty = _T("");
const TCHAR *pszPath;
if (blnHelp)
}
else
{
- pchValueName = _T("");
+ pchValueName = (TCHAR*)pszEmpty;
pszPath = _T(".");
}