Author: hbelusca
Date: Tue Dec 23 20:35:42 2014
New Revision: 65816
URL: http://svn.reactos.org/svn/reactos?rev=65816&view=rev
Log:
[NTDLL]: Whitespace fixes. No code changes.
Modified:
trunk/reactos/dll/ntdll/csr/connect.c
Modified: trunk/reactos/dll/ntdll/csr/connect.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/csr/connect.c?re…
==============================================================================
--- trunk/reactos/dll/ntdll/csr/connect.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/csr/connect.c [iso-8859-1] Tue Dec 23 20:35:42 2014
@@ -325,7 +325,7 @@
return Status;
}
-#if 0
+#if 0
//
// Structures can be padded at the end, causing the size of the entire structure
// minus the size of the last field, not to be equal to the offset of the last
@@ -355,7 +355,7 @@
/*
* @implemented
*/
-NTSTATUS
+NTSTATUS
NTAPI
CsrClientCallServer(IN OUT PCSR_API_MESSAGE ApiMessage,
IN OUT PCSR_CAPTURE_BUFFER CaptureBuffer OPTIONAL,
@@ -371,7 +371,7 @@
ApiMessage->Header.u1.s1.TotalLength = DataLength +
sizeof(CSR_API_MESSAGE) - sizeof(ApiMessage->Data); // FIELD_OFFSET(CSR_API_MESSAGE, Data) + DataLength;
ApiMessage->Header.u1.s1.DataLength = DataLength +
- FIELD_OFFSET(CSR_API_MESSAGE, Data) - sizeof(ApiMessage->Header);// ApiMessage->Header.u1.s1.TotalLength - sizeof(PORT_MESSAGE);
+ FIELD_OFFSET(CSR_API_MESSAGE, Data) - sizeof(ApiMessage->Header); // ApiMessage->Header.u1.s1.TotalLength - sizeof(PORT_MESSAGE);
/* Fill out the CSR Header */
ApiMessage->ApiNumber = ApiNumber;
@@ -381,7 +381,7 @@
ApiNumber,
ApiMessage->Header.u1.s1.DataLength,
ApiMessage->Header.u1.s1.TotalLength);
-
+
/* Check if we are already inside a CSR Server */
if (!InsideCsrProcess)
{
Author: hbelusca
Date: Tue Dec 23 16:42:59 2014
New Revision: 65811
URL: http://svn.reactos.org/svn/reactos?rev=65811&view=rev
Log:
[USER32]
Reenable some disabled tests, while disabling some other calls, namely:
- code in ClientThreadStartup (that was moved in ClientThreadSetupHelper that is hackilly now called in Init() from DllMain),
- code in User32CallClientThreadSetupFromKernel,
- add two flag manual resets in Init() and the forced call to ClientThreadSetupHelper,
- and moreover the whole CSR call in DllMain, that seems to sometimes cause some user32 internal global pointers to remain NULL where they should not (more specifically some "pdi" thing).
Obviously all these problems need to be understood (why some things do not become initialized when they should, etc...). See r65799, revert r65810, and CORE-8949.
Modified:
trunk/reactos/win32ss/user/user32/misc/dllmain.c
Modified: trunk/reactos/win32ss/user/user32/misc/dllmain.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/misc/d…
==============================================================================
--- trunk/reactos/win32ss/user/user32/misc/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/misc/dllmain.c [iso-8859-1] Tue Dec 23 16:42:59 2014
@@ -240,7 +240,7 @@
* Also this needs to be done only for the first thread (since the connection
* is per-process).
*/
- // if (gfServerProcess && IsFirstThread) // Disabling this test is a HACK!!
+ if (gfServerProcess && IsFirstThread)
{
NTSTATUS Status;
USERCONNECT UserCon;
@@ -269,7 +269,7 @@
TRACE("Checkpoint (register PFN)\n");
if (!RegisterClientPFN())
{
- TRACE("RegisterClientPFN failed\n");
+ ERR("RegisterClientPFN failed\n");
return FALSE;
}
@@ -277,7 +277,7 @@
ClientInfo->CI_flags |= CI_INITTHREAD;
/* Initialization that should be done once per process */
- // if (IsFirstThread) // Disabling this test is a HACK!!
+ if (IsFirstThread)
{
TRACE("Checkpoint (Allocating TLS)\n");
@@ -352,7 +352,9 @@
// continue as normal.
//
- // return ClientThreadSetupHelper(FALSE); // Disabling this call is a HACK!!
+ // FIXME: Disabling this call is a HACK!! See also User32CallClientThreadSetupFromKernel...
+ // return ClientThreadSetupHelper(FALSE);
+ UNIMPLEMENTED;
return TRUE;
}
@@ -368,18 +370,26 @@
/* Initialize callback table in PEB data */
NtCurrentPeb()->KernelCallbackTable = apfnDispatch;
NtCurrentPeb()->PostProcessInitRoutine = NULL;
+
+ // This is a HACK!! //
+ gfServerProcess = FALSE;
+ gfFirstThread = TRUE;
+ //// End of HACK!! ///
/*
* Retrieve data from the connect info structure if the initializing
* process is not CSRSS. In case it is, this will be done from inside
* ClientThreadSetup.
*/
- // if (!gfServerProcess) // Disabling this test is a HACK!!
+ if (!gfServerProcess)
{
// FIXME: HACK!! We should fixup for the NtUserProcessConnect fixups
// because it was made in the context of CSRSS process and not ours!!
// So... as long as we don't fix that, we need to redo again a call
// to NtUserProcessConnect... How perverse is that?!
+ //
+ // HACK(2): This call is necessary since we disabled
+ // the CSR call in DllMain...
{
RtlZeroMemory(UserCon, sizeof(*UserCon));
@@ -395,7 +405,7 @@
}
//
- // We continue as we should do...
+ // We continue as we should do normally...
//
/* Retrieve data */
@@ -406,6 +416,15 @@
gHandleEntries = SharedPtrToUser(gHandleTable->handles);
}
+ // FIXME: Yet another hack... This call should normally not be done here, but
+ // instead in ClientThreadSetup, and in User32CallClientThreadSetupFromKernel as well.
+ ERR("HACK: Using Init-ClientThreadSetupHelper hack!!\n");
+ if (!ClientThreadSetupHelper(FALSE))
+ {
+ ERR("Init-ClientThreadSetupHelper hack failed!\n");
+ return FALSE;
+ }
+
TRACE("<-- user32::Init()\n");
return NT_SUCCESS(Status);
@@ -436,8 +455,11 @@
#define WIN_OBJ_DIR L"\\Windows"
#define SESSION_DIR L"\\Sessions"
+ USERSRV_API_CONNECTINFO ConnectInfo; // USERCONNECT
+
+#if 0 // Disabling this code is a BIG HACK!!
+
NTSTATUS Status;
- USERSRV_API_CONNECTINFO ConnectInfo; // USERCONNECT
ULONG ConnectInfoSize = sizeof(ConnectInfo);
WCHAR SessionDir[256];
@@ -487,6 +509,8 @@
TRACE("Checkpoint (CSR called)\n");
+#endif
+
User32Instance = hInstanceDll;
/* Finish initialization */
@@ -516,7 +540,8 @@
User32CallClientThreadSetupFromKernel(PVOID Arguments, ULONG ArgumentLength)
{
TRACE("User32CallClientThreadSetupFromKernel -->\n");
- ClientThreadSetupHelper(TRUE);
+ // FIXME: Disabling this call is a HACK!! See also ClientThreadSetup...
+ // ClientThreadSetupHelper(TRUE);
TRACE("<-- User32CallClientThreadSetupFromKernel\n");
return ZwCallbackReturn(NULL, 0, STATUS_SUCCESS);
}
Author: hbelusca
Date: Tue Dec 23 14:31:28 2014
New Revision: 65810
URL: http://svn.reactos.org/svn/reactos?rev=65810&view=rev
Log:
[USER32]: Add yet another magic hack to temporarily reenable bots (ofc. mention in the code that this is a hack). See r65799 for more details, and CORE-8949.
Modified:
trunk/reactos/win32ss/user/user32/misc/dllmain.c
Modified: trunk/reactos/win32ss/user/user32/misc/dllmain.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/misc/d…
==============================================================================
--- trunk/reactos/win32ss/user/user32/misc/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/misc/dllmain.c [iso-8859-1] Tue Dec 23 14:31:28 2014
@@ -277,7 +277,7 @@
ClientInfo->CI_flags |= CI_INITTHREAD;
/* Initialization that should be done once per process */
- if (IsFirstThread)
+ // if (IsFirstThread) // Disabling this test is a HACK!!
{
TRACE("Checkpoint (Allocating TLS)\n");