- Swap GetFullPathName success/failure cases in BasePushProcessParameters. Fixes kernel32:GetModuleFileName test.
See issue #6786 for more details.
svn path=/trunk/; revision=56643
- /* Add the current applicaiton path */
+ /* Add the current application path */
case BaseSearchPathApp:
if ((AppName) && (AppNameEnd))
{
case BaseSearchPathApp:
if ((AppName) && (AppNameEnd))
{
if ((Size) && (Size <= (MAX_PATH + 4)))
{
/* Get the DLL Path */
if ((Size) && (Size <= (MAX_PATH + 4)))
{
/* Get the DLL Path */
- DllPathString = BaseComputeProcessDllPath((LPWSTR)ApplicationPathName,
- lpEnvironment);
+ DllPathString = BaseComputeProcessDllPath(FullPath, lpEnvironment);
if (!DllPathString)
{
/* Fail */
if (!DllPathString)
{
/* Fail */
/* Initialize Strings */
RtlInitUnicodeString(&DllPath, DllPathString);
/* Initialize Strings */
RtlInitUnicodeString(&DllPath, DllPathString);
- RtlInitUnicodeString(&ImageName, ApplicationPathName);
+ RtlInitUnicodeString(&ImageName, FullPath);
- /* Get the DLL Path */
- DllPathString = BaseComputeProcessDllPath(FullPath, lpEnvironment);
+ /* Couldn't get the path name. Just take the original path */
+ DllPathString = BaseComputeProcessDllPath((LPWSTR)ApplicationPathName,
+ lpEnvironment);
if (!DllPathString)
{
/* Fail */
if (!DllPathString)
{
/* Fail */
/* Initialize Strings */
RtlInitUnicodeString(&DllPath, DllPathString);
/* Initialize Strings */
RtlInitUnicodeString(&DllPath, DllPathString);
- RtlInitUnicodeString(&ImageName, FullPath);
+ RtlInitUnicodeString(&ImageName, ApplicationPathName);
}
/* Initialize Strings */
}
/* Initialize Strings */
/* Someone beat us to it, use their data instead */
StartupInfo = BaseAnsiStartupInfo;
Status = STATUS_SUCCESS;
/* Someone beat us to it, use their data instead */
StartupInfo = BaseAnsiStartupInfo;
Status = STATUS_SUCCESS;
/* We're going to free our own stuff, but not raise */
RtlFreeAnsiString(&TitleString);
}
/* We're going to free our own stuff, but not raise */
RtlFreeAnsiString(&TitleString);
}