mirror of
https://github.com/reactos/reactos.git
synced 2025-05-30 14:39:46 +00:00
fixed little bug
svn path=/trunk/; revision=811
This commit is contained in:
parent
2ea8bb5aa4
commit
eae47571c9
1 changed files with 10 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: env.c,v 1.1 1999/12/01 15:14:59 ekohl Exp $
|
/* $Id: env.c,v 1.2 1999/12/01 17:34:55 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -29,15 +29,15 @@ RtlCreateEnvironment (
|
||||||
PVOID EnvPtr = NULL;
|
PVOID EnvPtr = NULL;
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
ULONG RegionSize = 1;
|
ULONG RegionSize = 1;
|
||||||
|
#if 0
|
||||||
if (Inherit == TRUE)
|
if (Inherit == TRUE)
|
||||||
{
|
{
|
||||||
RtlAcquirePebLock ();
|
RtlAcquirePebLock ();
|
||||||
|
|
||||||
if (NtCurrentPeb()->ProcessInfo->Environment != NULL)
|
if (NtCurrentPeb()->ProcessParameters->Environment != NULL)
|
||||||
{
|
{
|
||||||
Status = NtQueryVirtualMemory (NtCurrentProcess (),
|
Status = NtQueryVirtualMemory (NtCurrentProcess (),
|
||||||
NtCurrentPeb ()->ProcessInfo->Environment,
|
NtCurrentPeb ()->ProcessParameters->Environment,
|
||||||
MemoryBasicInformation,
|
MemoryBasicInformation,
|
||||||
&MemInfo,
|
&MemInfo,
|
||||||
sizeof(MEMORY_BASIC_INFORMATION),
|
sizeof(MEMORY_BASIC_INFORMATION),
|
||||||
|
@ -64,7 +64,7 @@ RtlCreateEnvironment (
|
||||||
}
|
}
|
||||||
|
|
||||||
memmove (EnvPtr,
|
memmove (EnvPtr,
|
||||||
NtCurrentPeb ()->ProcessInfo->Environment,
|
NtCurrentPeb ()->ProcessParameters->Environment,
|
||||||
MemInfo.RegionSize);
|
MemInfo.RegionSize);
|
||||||
|
|
||||||
*Environment = EnvPtr;
|
*Environment = EnvPtr;
|
||||||
|
@ -83,7 +83,7 @@ RtlCreateEnvironment (
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
*Environment = EnvPtr;
|
*Environment = EnvPtr;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,13 +113,13 @@ RtlSetCurrentEnvironment (
|
||||||
PVOID EnvPtr;
|
PVOID EnvPtr;
|
||||||
|
|
||||||
RtlAcquirePebLock ();
|
RtlAcquirePebLock ();
|
||||||
|
#if 0
|
||||||
EnvPtr = NtCurrentPeb()->ProcessInfo->Environment;
|
EnvPtr = NtCurrentPeb()->ProcessParameters->Environment;
|
||||||
NtCurrentPeb()->ProcessInfo->Environment = NewEnvironment;
|
NtCurrentPeb()->ProcessParameters->Environment = NewEnvironment;
|
||||||
|
|
||||||
if (OldEnvironment != NULL)
|
if (OldEnvironment != NULL)
|
||||||
*OldEnvironment = EnvPtr;
|
*OldEnvironment = EnvPtr;
|
||||||
|
#endif
|
||||||
RtlReleasePebLock ();
|
RtlReleasePebLock ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,6 +161,4 @@ RtlQueryEnvironmentVariable_U (
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Reference in a new issue