13#define WIN32_NO_STATUS
26#define MAX_PASSWORD_LENGTH 64
62 for (
p = pInput; *
p;
p++)
94 DWORD dwCreateFlags = 0;
106 ZeroMemory(&StartupInfo,
sizeof(StartupInfo));
107 ZeroMemory(&ProcessInfo,
sizeof(ProcessInfo));
112 if (*pszArg ==
L'-' || *pszArg ==
L'/')
121 else if (
_wcsicmp(pszArg,
L"profile") == 0)
125 else if (
_wcsicmp(pszArg,
L"netonly") == 0)
129 else if (
_wcsicmp(pszArg,
L"noprofile") == 0)
145 if (pszUserName ==
NULL)
156 if (pszDomain ==
NULL)
172 if (pszUserName ==
NULL)
182 if (pszDomain ==
NULL)
195 if (pszUserName ==
NULL)
202 wcscpy(pszUserName, pszArg);
215 if (pszCommandLine ==
NULL)
218 if (pszCommandLine ==
NULL)
225 wcscpy(pszCommandLine, pszArg);
232 if ((bProfile && bNoProfile) ||
233 (bProfile && bNetOnly))
241 if (pszCommandLine ==
NULL || pszUserName ==
NULL)
252 dwLogonFlags &= ~LOGON_WITH_PROFILE;
257 dwLogonFlags &= ~LOGON_WITH_PROFILE;
260 DPRINT(
"User: %S\n", pszUserName);
261 DPRINT(
"Domain: %S\n", pszDomain);
262 DPRINT(
"CommandLine: %S\n", pszCommandLine);
264 if (pszDomain ==
NULL)
268 if (pszDomain ==
NULL)
282 if (pszCurrentDirectory ==
NULL)
294 if (pszPassword ==
NULL)
337 if (pszCurrentDirectory)
void ConPuts(FILE *fp, LPCWSTR psz)
#define ConInitStdStreams()
void ConPrintf(FILE *fp, LPCWSTR psz,...)
void ConResPrintf(FILE *fp, UINT nID,...)
void ConResPuts(FILE *fp, UINT nID)
#define IDS_INTERNAL_ERROR
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
BOOL WINAPI GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
BOOL WINAPI CreateProcessWithLogonW(_In_ LPCWSTR lpUsername, _In_opt_ LPCWSTR lpDomain, _In_ LPCWSTR lpPassword, _In_ DWORD dwLogonFlags, _In_opt_ LPCWSTR lpApplicationName, _Inout_opt_ LPWSTR lpCommandLine, _In_ DWORD dwCreationFlags, _In_opt_ LPVOID lpEnvironment, _In_opt_ LPCWSTR lpCurrentDirectory, _In_ LPSTARTUPINFOW lpStartupInfo, _Out_ LPPROCESS_INFORMATION lpProcessInformation)
#define ReadFile(a, b, c, d, e)
#define HeapFree(x, y, z)
#define MultiByteToWideChar
static DWORD DWORD * dwLength
BOOL WINAPI GetConsoleMode(HANDLE hConsoleHandle, LPDWORD lpMode)
BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleMode(HANDLE hConsoleHandle, DWORD dwMode)
UINT WINAPI DECLSPEC_HOTPATCH GetConsoleCP(VOID)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
LPCWSTR LPCWSTR LPCWSTR pszEnvironment
#define MAX_PASSWORD_LENGTH
static VOID ConInString(_In_ PWSTR pInput, _In_ DWORD dwLength)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_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)
#define LOGON_WITH_PROFILE
DWORD WINAPI GetLastError(void)
#define CREATE_UNICODE_ENVIRONMENT
LPWSTR WINAPI GetEnvironmentStringsW(void)
#define LOGON_NETCREDENTIALS_ONLY
#define GetCurrentDirectory
#define MAX_COMPUTERNAME_LENGTH
#define ENABLE_LINE_INPUT