Author: gadamopoulos
Date: Sat Aug 31 14:53:01 2013
New Revision: 59918
URL: http://svn.reactos.org/svn/reactos?rev=59918&view=rev
Log:
[shell32]
- Halfplement CDesktopBrowser::BrowseObject. Now when the user tries to open a folder from the desktop we will try to create a new explorer window.
- ps: this affects only explorer_new and the rest of the shell is still not working well enough to actually show the new window
Modified:
trunk/reactos/dll/win32/shell32/desktop.cpp
trunk/reactos/dll/win32/shell32/precomp.h
Modified: trunk/reactos/dll/win32/shell32/desktop.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/desktop.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/desktop.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/desktop.cpp [iso-8859-1] Sat Aug 31 14:53:01 2013
@@ -261,7 +261,12 @@
HRESULT STDMETHODCALLTYPE CDesktopBrowser::BrowseObject(LPCITEMIDLIST pidl, UINT wFlags)
{
- return E_NOTIMPL;
+ /*
+ * We should use IShellWindows interface here in order to attempt to
+ * find an open shell window that shows the requested pidl and activate it
+ */
+
+ return SHOpenNewFrame((LPITEMIDLIST)pidl, NULL, 0, 0);
}
HRESULT STDMETHODCALLTYPE CDesktopBrowser::GetViewStateStream(DWORD grfMode, IStream **ppStrm)
Modified: trunk/reactos/dll/win32/shell32/precomp.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/precomp.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/precomp.h [iso-8859-1] Sat Aug 31 14:53:01 2013
@@ -25,6 +25,7 @@
#include <shlwapi.h>
#include <shlobj.h>
#include <shlobj_undoc.h>
+#include <shlwapi_undoc.h>
#include <appmgmt.h>
#include <ntquery.h>
#include <recyclebin.h>
@@ -71,6 +72,7 @@
#include "filedefext.h"
#include "drvdefext.h"
#include "CMenuBand.h"
+#include "CMenuDeskBar.h"
#include <wine/debug.h>
Author: ion
Date: Sat Aug 31 02:19:36 2013
New Revision: 59913
URL: http://svn.reactos.org/svn/reactos?rev=59913&view=rev
Log:
[NTDLL]: Use NT-style calculation in CsrClientCallServer. In special cases, structures can be padded at the end, causing the size of the structure - the size of last field, not to be equal to the offset of the last field. Doing math the NT way will, in some cases (if the CSR union is not 8-byte aligned), cause the TotalLength to be 4 bytes bigger than really needed.
[CSRSRV]: Increase the padding to 39*4 bytes, instead of 35, to match Windows.
Modified:
trunk/reactos/dll/ntdll/csr/connect.c
trunk/reactos/include/reactos/subsys/csr/csrmsg.h
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] Sat Aug 31 02:19:36 2013
@@ -321,6 +321,33 @@
return Status;
}
+#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
+// field.
+//
+typedef struct _TEST_EMBEDDED
+{
+ ULONG One;
+ ULONG Two;
+ ULONG Three;
+} TEST_EMBEDDED;
+
+typedef struct _TEST
+{
+ PORT_MESSAGE h;
+ TEST_EMBEDDED Three;
+} TEST;
+
+C_ASSERT(sizeof(PORT_MESSAGE) == 0x18);
+C_ASSERT(FIELD_OFFSET(TEST, Three) == 0x18);
+C_ASSERT(sizeof(TEST_EMBEDDED) == 0xC);
+
+C_ASSERT(sizeof(TEST) != (sizeof(TEST_EMBEDDED) + sizeof(PORT_MESSAGE)));
+C_ASSERT((sizeof(TEST) - sizeof(TEST_EMBEDDED)) != FIELD_OFFSET(TEST, Three));
+#endif
+
/*
* @implemented
*/
@@ -337,10 +364,10 @@
/* Fill out the Port Message Header */
ApiMessage->Header.u2.ZeroInit = 0;
- ApiMessage->Header.u1.s1.TotalLength =
- FIELD_OFFSET(CSR_API_MESSAGE, Data) + DataLength;
- ApiMessage->Header.u1.s1.DataLength =
- ApiMessage->Header.u1.s1.TotalLength - sizeof(PORT_MESSAGE);
+ 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);
/* Fill out the CSR Header */
ApiMessage->ApiNumber = ApiNumber;
Modified: trunk/reactos/include/reactos/subsys/csr/csrmsg.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/subsys/csr…
==============================================================================
--- trunk/reactos/include/reactos/subsys/csr/csrmsg.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/subsys/csr/csrmsg.h [iso-8859-1] Sat Aug 31 02:19:36 2013
@@ -133,7 +133,7 @@
// Finally, the overall message structure size must be at most
// equal to the maximum acceptable LPC message size.
//
- ULONG_PTR Padding[35];
+ ULONG_PTR ApiMessageData[39];
} Data;
};
};