Author: hbelusca
Date: Tue Dec 16 21:48:23 2014
New Revision: 65690
URL:
http://svn.reactos.org/svn/reactos?rev=65690&view=rev
Log:
[KERNEL32][BASESRV]
On Windows 2k3, BASESRV_API_CONNECTINFO went under a slimming treatment and now is only 4
bytes. In fact all its information was already existing in the static base data structure
(BaseStaticServerData). We should now be more 2k3-compatible :)
Fix also the testbots.
Modified:
trunk/reactos/dll/win32/kernel32/client/dllmain.c
trunk/reactos/include/reactos/subsys/win/base.h
trunk/reactos/include/reactos/subsys/win/basemsg.h
Modified: trunk/reactos/dll/win32/kernel32/client/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/dllmain.c [iso-8859-1] Tue Dec 16 21:48:23
2014
@@ -88,8 +88,8 @@
LPVOID lpReserved)
{
NTSTATUS Status;
- ULONG Dummy;
- ULONG DummySize = sizeof(Dummy);
+ BASESRV_API_CONNECTINFO ConnectInfo;
+ ULONG ConnectInfoSize = sizeof(ConnectInfo);
WCHAR SessionDir[256];
DPRINT("DllMain(hInst %p, dwReason %lu)\n",
@@ -133,11 +133,11 @@
WIN_OBJ_DIR);
}
- /* Connect to the base server */
+ /* Connect to the Base Server */
Status = CsrClientConnectToServer(SessionDir,
BASESRV_SERVERDLL_INDEX,
- &Dummy,
- &DummySize,
+ &ConnectInfo,
+ &ConnectInfoSize,
&BaseRunningInServerProcess);
if (!NT_SUCCESS(Status))
{
Modified: trunk/reactos/include/reactos/subsys/win/base.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/subsys/win…
==============================================================================
--- trunk/reactos/include/reactos/subsys/win/base.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/subsys/win/base.h [iso-8859-1] Tue Dec 16 21:48:23 2014
@@ -131,7 +131,8 @@
BOOLEAN LUIDDeviceMapsEnabled;
ULONG TermsrvClientTimeZoneChangeNum;
} BASE_STATIC_SERVER_DATA, *PBASE_STATIC_SERVER_DATA;
-#ifndef _WIN64
+
+#if defined(_M_IX86)
C_ASSERT(sizeof(BASE_STATIC_SERVER_DATA) == 0x1AC8);
#endif
Modified: trunk/reactos/include/reactos/subsys/win/basemsg.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/subsys/win…
==============================================================================
--- trunk/reactos/include/reactos/subsys/win/basemsg.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/subsys/win/basemsg.h [iso-8859-1] Tue Dec 16 21:48:23
2014
@@ -53,19 +53,14 @@
BasepMaxApiNumber
} BASESRV_API_NUMBER, *PBASESRV_API_NUMBER;
-
typedef struct _BASESRV_API_CONNECTINFO
{
- ULONG ExpectedVersion;
- HANDLE DefaultObjectDirectory;
- ULONG WindowsVersion;
- ULONG CurrentVersion;
- ULONG DebugFlags;
- WCHAR WindowsDirectory[MAX_PATH];
- WCHAR WindowsSystemDirectory[MAX_PATH];
+ ULONG DebugFlags;
} BASESRV_API_CONNECTINFO, *PBASESRV_API_CONNECTINFO;
-#define BASESRV_VERSION 0x10000
+#if defined(_M_IX86)
+C_ASSERT(sizeof(BASESRV_API_CONNECTINFO) == 0x04);
+#endif
typedef struct _BASE_SXS_CREATEPROCESS_MSG