From 294b660b256620dd2ac72598937d3918a5b62190 Mon Sep 17 00:00:00 2001 From: Emanuele Aliberti Date: Sun, 25 Sep 2005 13:36:27 +0000 Subject: [PATCH] Required for binary compatibility with MS KERNEL32.DLL. NOTE Filip and I still don't understand why KERNEL32 calls twice CsrConnectToServer. A possible explanation is because the Win32 server is a dual server: gui+console. This differs with our current implementation in the SM: we accept only console registration requests (see SmpHandleConnectionRequest). svn path=/trunk/; revision=18050 --- reactos/lib/ntdll/csr/connect.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/reactos/lib/ntdll/csr/connect.c b/reactos/lib/ntdll/csr/connect.c index 26fee8ac65e..046bf5342af 100644 --- a/reactos/lib/ntdll/csr/connect.c +++ b/reactos/lib/ntdll/csr/connect.c @@ -180,7 +180,14 @@ CsrConnectToServer(IN PWSTR ObjectDirectory) PSID SystemSid = NULL; CSR_CONNECTION_INFO ConnectionInfo; ULONG ConnectionInfoLength = sizeof(CSR_CONNECTION_INFO); - DPRINT("CsrConnectToServer\n"); + + DPRINT("%s(%S)\n", __FUNCTION__, ObjectDirectory); + + /* Binary compatibility with MS KERNEL32 */ + if (NULL == ObjectDirectory) + { + ObjectDirectory = L"\\Windows"; + } /* Calculate the total port name size */ PortNameLength = ((wcslen(ObjectDirectory) + 1) * sizeof(WCHAR)) +