summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d00ff48)
- Simplify initialization of CONSOLE_START_INFO objects by also initializing their AppPath member in InitConsoleInfo.
- Add two members IconPath and IconIndex in the CONSOLE_START_INFO structure, to be used in a future work...
[HEADERS]
- CHAR_INFO* == PCHAR_INFO
- Add two informative comments for two fields of the CONSOLE_READOUTPUT structure (again, to be used in a future work...)
svn path=/trunk/; revision=59234
CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_ALLOCCONSOLE AllocConsoleRequest = &ApiMessage.Data.AllocConsoleRequest;
PCSR_CAPTURE_BUFFER CaptureBuffer;
CONSOLE_API_MESSAGE ApiMessage;
PCONSOLE_ALLOCCONSOLE AllocConsoleRequest = &ApiMessage.Data.AllocConsoleRequest;
PCSR_CAPTURE_BUFFER CaptureBuffer;
- LPWSTR AppPath = NULL;
- SIZE_T Length = 0;
if (Parameters->ConsoleHandle)
{
if (Parameters->ConsoleHandle)
{
sizeof(CONSOLE_START_INFO),
(PVOID*)&AllocConsoleRequest->ConsoleStartInfo);
sizeof(CONSOLE_START_INFO),
(PVOID*)&AllocConsoleRequest->ConsoleStartInfo);
-/** Copied from BasepInitConsole **********************************************/
- InitConsoleInfo(AllocConsoleRequest->ConsoleStartInfo);
-
- AppPath = AllocConsoleRequest->ConsoleStartInfo->AppPath;
- Length = min(MAX_PATH, Parameters->ImagePathName.Length / sizeof(WCHAR));
- wcsncpy(AppPath, Parameters->ImagePathName.Buffer, Length);
- AppPath[Length] = L'\0';
-/******************************************************************************/
+ InitConsoleInfo(AllocConsoleRequest->ConsoleStartInfo,
+ &Parameters->ImagePathName);
AllocConsoleRequest->Console = NULL;
AllocConsoleRequest->CtrlDispatcher = ConsoleControlDispatcher;
AllocConsoleRequest->Console = NULL;
AllocConsoleRequest->CtrlDispatcher = ConsoleControlDispatcher;
-InitConsoleInfo(IN OUT PCONSOLE_START_INFO ConsoleStartInfo)
+InitConsoleInfo(IN OUT PCONSOLE_START_INFO ConsoleStartInfo,
+ IN PUNICODE_STRING ImagePathName)
+ /* Get the startup information */
+ /* Initialize the fields */
ConsoleStartInfo->dwStartupFlags = si.dwFlags;
if (si.dwFlags & STARTF_USEFILLATTRIBUTE)
{
ConsoleStartInfo->dwStartupFlags = si.dwFlags;
if (si.dwFlags & STARTF_USEFILLATTRIBUTE)
{
ConsoleStartInfo->ConsoleWindowSize.cx = (LONG)(si.dwXSize);
ConsoleStartInfo->ConsoleWindowSize.cy = (LONG)(si.dwYSize);
}
ConsoleStartInfo->ConsoleWindowSize.cx = (LONG)(si.dwXSize);
ConsoleStartInfo->ConsoleWindowSize.cy = (LONG)(si.dwYSize);
}
- /*
- if (si.dwFlags & STARTF_RUNFULLSCREEN)
- {
- }
- */
+ /* Set up the title for the console */
if (si.lpTitle)
{
wcsncpy(ConsoleStartInfo->ConsoleTitle, si.lpTitle, MAX_PATH + 1);
if (si.lpTitle)
{
wcsncpy(ConsoleStartInfo->ConsoleTitle, si.lpTitle, MAX_PATH + 1);
{
ConsoleStartInfo->ConsoleTitle[0] = L'\0';
}
{
ConsoleStartInfo->ConsoleTitle[0] = L'\0';
}
+
+ /* Retrieve the application path name */
+ Length = min(sizeof(ConsoleStartInfo->AppPath) / sizeof(ConsoleStartInfo->AppPath[0]) - 1,
+ ImagePathName->Length / sizeof(WCHAR));
+ wcsncpy(ConsoleStartInfo->AppPath, ImagePathName->Buffer, Length);
+ ConsoleStartInfo->AppPath[Length] = L'\0';
+
+ /* The Console Server will use these fields to set up the console icon */
+ ConsoleStartInfo->IconPath[0] = L'\0';
+ ConsoleStartInfo->IconIndex = 0;
- InitConsoleInfo(&ConnectInfo.ConsoleStartInfo);
-
- Length = min(sizeof(ConnectInfo.ConsoleStartInfo.AppPath) / sizeof(ConnectInfo.ConsoleStartInfo.AppPath[0]) - 1,
- Parameters->ImagePathName.Length / sizeof(WCHAR));
- wcsncpy(ConnectInfo.ConsoleStartInfo.AppPath, Parameters->ImagePathName.Buffer, Length);
- ConnectInfo.ConsoleStartInfo.AppPath[Length] = L'\0';
+ InitConsoleInfo(&ConnectInfo.ConsoleStartInfo,
+ &Parameters->ImagePathName);
/* Initialize Input EXE name */
ExeName = wcsrchr(Parameters->ImagePathName.Buffer, L'\\');
/* Initialize Input EXE name */
ExeName = wcsrchr(Parameters->ImagePathName.Buffer, L'\\');
TranslateStdHandle(HANDLE hHandle);
VOID
TranslateStdHandle(HANDLE hHandle);
VOID
-InitConsoleInfo(IN OUT PCONSOLE_START_INFO ConsoleStartInfo);
+InitConsoleInfo(IN OUT PCONSOLE_START_INFO ConsoleStartInfo,
+ IN PUNICODE_STRING ImagePathName);
LPCWSTR
IntCheckForConsoleFileName(IN LPCWSTR pszName,
LPCWSTR
IntCheckForConsoleFileName(IN LPCWSTR pszName,
// UNICODE_STRING ConsoleTitle;
WCHAR ConsoleTitle[MAX_PATH + 1]; // Console title or full path to the startup shortcut
WCHAR AppPath[MAX_PATH + 1]; // Full path of the launched app
// UNICODE_STRING ConsoleTitle;
WCHAR ConsoleTitle[MAX_PATH + 1]; // Console title or full path to the startup shortcut
WCHAR AppPath[MAX_PATH + 1]; // Full path of the launched app
+ WCHAR IconPath[MAX_PATH + 1]; // Path to the file containing the icon
+ INT IconIndex; // Index of the icon
} CONSOLE_START_INFO, *PCONSOLE_START_INFO;
typedef struct _CONSOLE_CONNECTION_INFO
} CONSOLE_START_INFO, *PCONSOLE_START_INFO;
typedef struct _CONSOLE_CONNECTION_INFO
COORD BufferSize;
COORD BufferCoord;
SMALL_RECT WriteRegion;
COORD BufferSize;
COORD BufferCoord;
SMALL_RECT WriteRegion;
} CONSOLE_WRITEOUTPUT, *PCONSOLE_WRITEOUTPUT;
typedef struct
} CONSOLE_WRITEOUTPUT, *PCONSOLE_WRITEOUTPUT;
typedef struct
+ ULONG BufferSize; // Seems unusued
WORD Length;
COORD Coord;
COORD EndCoord;
WORD Length;
COORD Coord;
COORD EndCoord;
- ULONG NrCharactersWritten;
+ ULONG NrCharactersWritten; // Seems unusued
CODE_TYPE CodeType;
union
CODE_TYPE CodeType;
union
COORD BufferSize;
COORD BufferCoord;
SMALL_RECT ReadRegion;
COORD BufferSize;
COORD BufferCoord;
SMALL_RECT ReadRegion;
} CONSOLE_READOUTPUT, *PCONSOLE_READOUTPUT;
typedef struct
} CONSOLE_READOUTPUT, *PCONSOLE_READOUTPUT;
typedef struct