27#if defined(INCLUDE_CMD_CTTY) && defined(FEATURE_REDIRECTION)
33 static const LPCWSTR DosLPTDevice =
L"LPT";
34 static const LPCWSTR DosCOMDevice =
L"COM";
35 static const LPCWSTR DosPRNDevice =
L"PRN";
36 static const LPCWSTR DosAUXDevice =
L"AUX";
37 static const LPCWSTR DosCONDevice =
L"CON";
38 static const LPCWSTR DosNULDevice =
L"NUL";
67 if (DeviceNameInfo != 0)
108 HANDLE hDevice, hStdHandles[3];
168 goto RetryOpenConsole;
190 goto RetryOpenConsole;
310 if((oldoutfd =
dup(
f)) == -1)
314 error_ctty_dup(
param);
ACPI_SIZE strlen(const char *String)
BOOL WINAPI AllocConsole(VOID)
BOOL WINAPI FreeConsole(VOID)
VOID SetHandle(UINT Number, HANDLE Handle)
VOID error_req_param_missing(VOID)
VOID ConOutResPaging(BOOL StartPaging, UINT resID)
#define STRING_ERROR_INVALID_DEVICE
static WORD CheckTerminalDeviceType(IN LPCTSTR pszName)
INT cmd_ctty(LPTSTR param)
struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES
#define INVALID_HANDLE_VALUE
#define GetCurrentProcess()
#define MultiByteToWideChar
BOOL WINAPI DuplicateHandle(IN HANDLE hSourceProcessHandle, IN HANDLE hSourceHandle, IN HANDLE hTargetProcessHandle, OUT LPHANDLE lpTargetHandle, IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwOptions)
NTSYSAPI ULONG NTAPI RtlIsDosDeviceName_U(_In_ PCWSTR Name)
#define ConOutResPrintf(uID,...)
_Check_return_ _CRTIMP int __cdecl dup2(_In_ int _FileHandleSrc, _In_ int _FileHandleDst)
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
#define DUPLICATE_SAME_ACCESS