[CSRSRV]: Hey Arch, try creating a shared section before mapping it.
authorAlex Ionescu <aionescu@gmail.com>
Wed, 3 Aug 2011 15:04:21 +0000 (15:04 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Wed, 3 Aug 2011 15:04:21 +0000 (15:04 +0000)
svn path=/trunk/; revision=53049

reactos/subsystems/win32/csrss/csrsrv/api/wapi.c
reactos/subsystems/win32/csrss/csrsrv/init.c

index 13b8918..6c0ac2d 100644 (file)
@@ -153,7 +153,6 @@ CsrSrvCreateSharedSection(IN PCHAR ParameterValue)
     PPEB Peb = NtCurrentPeb();
     
     /* ReactOS Hackssss */
-    ParameterValue = "1024,3072,512";
     Status = NtQuerySystemInformation(SystemBasicInformation,
                                       &CsrNtSysInfo,
                                       sizeof(SYSTEM_BASIC_INFORMATION),
@@ -175,7 +174,7 @@ CsrSrvCreateSharedSection(IN PCHAR ParameterValue)
     }
     
     /* Make sure it's valid */
-    if (!*SizeValue) return(STATUS_INVALID_PARAMETER);
+    if (!*SizeValue) return STATUS_INVALID_PARAMETER;
     
     /* Convert it to an integer */
     Status = RtlCharToInteger(SizeValue, 0, &Size);
@@ -184,6 +183,7 @@ CsrSrvCreateSharedSection(IN PCHAR ParameterValue)
     /* Multiply by 1024 entries and round to page size */
     #define ROUND_UP(n,size)   (((ULONG)(n) + (size - 1)) & ~(size - 1)) // hax
     CsrSrvSharedSectionSize = ROUND_UP(Size * 1024, CsrNtSysInfo.PageSize);
+    DPRINT1("Size: %lx\n", CsrSrvSharedSectionSize);
     
     /* Create the Secion */
     SectionSize.LowPart = CsrSrvSharedSectionSize;
index 2350815..32faad0 100644 (file)
@@ -512,7 +512,8 @@ CsrpCreateHeap (int argc, char ** argv, char ** envp)
        }
     
     
-    Status = CsrSrvCreateSharedSection("");
+    Status = CsrSrvCreateSharedSection("1024,3072,512");
+    DPRINT1("Status: %lx\n", Status);
     ASSERT(Status == STATUS_SUCCESS);
     
     BasepFakeStaticServerData();