PROCESS_ACCESS_TOKEN AccessToken;
NTSTATUS Status;
+ TRACE("%p %s %s %p %p %d 0x%08x %p %s %p %p\n", hToken, debugstr_a(lpApplicationName),
+ debugstr_a(lpCommandLine), lpProcessAttributes, lpThreadAttributes, bInheritHandles,
+ dwCreationFlags, lpEnvironment, debugstr_a(lpCurrentDirectory), lpStartupInfo, lpProcessInformation);
+
/* Create the process with a suspended main thread */
if (!CreateProcessA(lpApplicationName,
lpCommandLine,
lpStartupInfo,
lpProcessInformation))
{
+ ERR("CreateProcessA failed! GLE: %d\n", GetLastError());
return FALSE;
}
sizeof(AccessToken));
if (!NT_SUCCESS (Status))
{
+ ERR("NtSetInformationProcess failed: 0x%08x\n", Status);
+ TerminateProcess(lpProcessInformation->hProcess, Status);
SetLastError(RtlNtStatusToDosError(Status));
return FALSE;
}
PROCESS_ACCESS_TOKEN AccessToken;
NTSTATUS Status;
+ TRACE("%p %s %s %p %p %d 0x%08x %p %s %p %p\n", hToken, debugstr_w(lpApplicationName),
+ debugstr_w(lpCommandLine), lpProcessAttributes, lpThreadAttributes, bInheritHandles,
+ dwCreationFlags, lpEnvironment, debugstr_w(lpCurrentDirectory), lpStartupInfo, lpProcessInformation);
+
/* Create the process with a suspended main thread */
if (!CreateProcessW(lpApplicationName,
lpCommandLine,
lpStartupInfo,
lpProcessInformation))
{
+ ERR("CreateProcessW failed! GLE: %d\n", GetLastError());
return FALSE;
}
sizeof(AccessToken));
if (!NT_SUCCESS (Status))
{
+ ERR("NtSetInformationProcess failed: 0x%08x\n", Status);
+ TerminateProcess(lpProcessInformation->hProcess, Status);
SetLastError(RtlNtStatusToDosError(Status));
return FALSE;
}
return TRUE;
}
-/*
- * @unimplemented
- */
-BOOL WINAPI
-CreateProcessWithLogonW(LPCWSTR lpUsername,
- LPCWSTR lpDomain,
- LPCWSTR lpPassword,
- DWORD dwLogonFlags,
- LPCWSTR lpApplicationName,
- LPWSTR lpCommandLine,
- DWORD dwCreationFlags,
- LPVOID lpEnvironment,
- LPCWSTR lpCurrentDirectory,
- LPSTARTUPINFOW lpStartupInfo,
- LPPROCESS_INFORMATION lpProcessInformation)
-{
- FIXME("%s %s %s 0x%08x %s %s 0x%08x %p %s %p %p stub\n", debugstr_w(lpUsername), debugstr_w(lpDomain),
- debugstr_w(lpPassword), dwLogonFlags, debugstr_w(lpApplicationName),
- debugstr_w(lpCommandLine), dwCreationFlags, lpEnvironment, debugstr_w(lpCurrentDirectory),
- lpStartupInfo, lpProcessInformation);
-
- return FALSE;
-}
-
/*
* @implemented
*/
SE_GROUP_ENABLED_BY_DEFAULT;
/* Set the token source */
- strcpy(TokenSource.SourceName, "LogonUser");
+ strncpy(TokenSource.SourceName, "Advapi ", sizeof(TokenSource.SourceName));
AllocateLocallyUniqueId(&TokenSource.SourceIdentifier);
Status = LsaLogonUser(LsaHandle,