Commit in reactos/lib/ntdll/rtl on MAIN
env.c+6-51.21 -> 1.22
Enable environment inheritance.

reactos/lib/ntdll/rtl
env.c 1.21 -> 1.22
diff -u -r1.21 -r1.22
--- env.c	12 Sep 2003 17:51:48 -0000	1.21
+++ env.c	19 Mar 2004 12:38:07 -0000	1.22
@@ -1,4 +1,4 @@
-/* $Id: env.c,v 1.21 2003/09/12 17:51:48 vizzini Exp $
+/* $Id: env.c,v 1.22 2004/03/19 12:38:07 ekohl Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -29,6 +29,7 @@
 RtlCreateEnvironment(BOOLEAN Inherit,
 		     PWSTR *Environment)
 {
+  MEMORY_BASIC_INFORMATION MemInfo;
   PVOID EnvPtr = NULL;
   NTSTATUS Status = STATUS_SUCCESS;
   ULONG RegionSize = PAGE_SIZE;
@@ -36,7 +37,7 @@
   if (Inherit == TRUE)
     {
       RtlAcquirePebLock();
-#if 0
+
       if (NtCurrentPeb()->ProcessParameters->Environment != NULL)
 	{
 	  Status = NtQueryVirtualMemory(NtCurrentProcess(),
@@ -72,7 +73,7 @@
 
 	  *Environment = EnvPtr;
 	}
-#endif
+
       RtlReleasePebLock ();
     }
   else
@@ -326,9 +327,9 @@
 	    {
 	      Status = NtQueryVirtualMemory(NtCurrentProcess(),
 					    env,
-					    0,
+					    MemoryBasicInformation,
 					    &mbi,
-					    sizeof(mbi),
+					    sizeof(MEMORY_BASIC_INFORMATION),
 					    NULL);
 	      if (!NT_SUCCESS(Status))
 		{
CVSspam 0.2.8