Author: hbelusca
Date: Tue Aug 12 18:49:17 2014
New Revision: 63876
URL:
http://svn.reactos.org/svn/reactos?rev=63876&view=rev
Log:
Sync to trunk revision 63875.
Modified:
branches/condrv_restructure/ (props changed)
branches/condrv_restructure/base/setup/usetup/cabinet.c
branches/condrv_restructure/dll/win32/rpcrt4/ndr_marshall.c
branches/condrv_restructure/dll/win32/shell32/folders/fs.cpp
branches/condrv_restructure/dll/win32/shell32/folders/fs.h
branches/condrv_restructure/dll/win32/syssetup/security.c
branches/condrv_restructure/tools/cdmake/dirhash.c
branches/condrv_restructure/tools/spec2def/spec2def.c
branches/condrv_restructure/win32ss/user/ntuser/focus.c
Propchange: branches/condrv_restructure/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 12 18:49:17 2014
@@ -17,4 +17,4 @@
/branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859
/branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567
/branches/wlan-bringup:54809-54998
-/trunk/reactos:63104-63857
+/trunk/reactos:63104-63875
Modified: branches/condrv_restructure/base/setup/usetup/cabinet.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/base/setup/u…
==============================================================================
--- branches/condrv_restructure/base/setup/usetup/cabinet.c [iso-8859-1] (original)
+++ branches/condrv_restructure/base/setup/usetup/cabinet.c [iso-8859-1] Tue Aug 12
18:49:17 2014
@@ -1098,7 +1098,7 @@
Size -= OutputLength;
/* reduce remaining block size by bytes consumed */
RemainingBlock -= InputLength;
- if (RemainingBlock == 0)
+ if (Size > 0 && RemainingBlock == 0)
{
/* used up this block, move on to the next */
DPRINT("Out of block data\n");
Modified: branches/condrv_restructure/dll/win32/rpcrt4/ndr_marshall.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/dll/win32/rp…
==============================================================================
--- branches/condrv_restructure/dll/win32/rpcrt4/ndr_marshall.c [iso-8859-1] (original)
+++ branches/condrv_restructure/dll/win32/rpcrt4/ndr_marshall.c [iso-8859-1] Tue Aug 12
18:49:17 2014
@@ -1120,7 +1120,7 @@
* BufferStart and BufferEnd won't be reset when allocating memory for
* sending the response. we don't have to check for the new buffer here as
* it won't be used a type memory, only for buffer memory */
- if (Pointer >= pStubMsg->BufferStart && Pointer <
pStubMsg->BufferEnd)
+ if (Pointer >= pStubMsg->BufferStart && Pointer <=
pStubMsg->BufferEnd)
goto notfree;
if (attr & RPC_FC_P_ONSTACK) {
Modified: branches/condrv_restructure/dll/win32/shell32/folders/fs.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/dll/win32/sh…
==============================================================================
--- branches/condrv_restructure/dll/win32/shell32/folders/fs.cpp [iso-8859-1] (original)
+++ branches/condrv_restructure/dll/win32/shell32/folders/fs.cpp [iso-8859-1] Tue Aug 12
18:49:17 2014
@@ -1431,20 +1431,17 @@
_DoDropData *data =
static_cast<_DoDropData*>(HeapAlloc(GetProcessHeap(), 0, sizeof(_DoDropData)));
data->This = this;
// Need to maintain this class in case the window is closed or the class
exists temporarily (when dropping onto a folder).
+ pDataObject->AddRef();
+ pAsyncOperation->StartOperation(NULL);
+ CoMarshalInterThreadInterfaceInStream(IID_IDataObject, pDataObject,
&data->pStream);
this->AddRef();
- data->pDataObject = pDataObject;
- data->pAsyncOperation = pAsyncOperation;
data->dwKeyState = dwKeyState;
data->pt = pt;
// Need to dereference as pdweffect gets freed.
data->pdwEffect = *pdwEffect;
- data->pDataObject->AddRef();
- data->pAsyncOperation->StartOperation(NULL);
SHCreateThread(CFSFolder::_DoDropThreadProc, data, NULL, NULL);
return S_OK;
}
- else
- pAsyncOperation->Release();
}
return this->_DoDrop(pDataObject, dwKeyState, pt, pdwEffect);
}
@@ -1745,12 +1742,22 @@
}
DWORD WINAPI CFSFolder::_DoDropThreadProc(LPVOID lpParameter) {
+ CoInitialize(NULL);
_DoDropData *data = static_cast<_DoDropData*>(lpParameter);
- HRESULT hr = data->This->_DoDrop(data->pDataObject, data->dwKeyState,
data->pt, &data->pdwEffect);
+ IDataObject *pDataObject;
+ HRESULT hr = CoGetInterfaceAndReleaseStream (data->pStream, IID_IDataObject,
(void**) &pDataObject);
+
+ if (SUCCEEDED(hr))
+ {
+ CComPtr<IAsyncOperation> pAsyncOperation;
+ hr = data->This->_DoDrop(pDataObject, data->dwKeyState, data->pt,
&data->pdwEffect);
+ if (SUCCEEDED(pDataObject->QueryInterface(IID_PPV_ARG(IAsyncOperation,
&pAsyncOperation))))
+ {
+ pAsyncOperation->EndOperation(hr, NULL, data->pdwEffect);
+ }
+ pDataObject->Release();
+ }
//Release the CFSFolder and data object holds in the copying thread.
- data->pAsyncOperation->EndOperation(hr, NULL, data->pdwEffect);
- data->pAsyncOperation->Release();
- data->pDataObject->Release();
data->This->Release();
//Release the parameter from the heap.
HeapFree(GetProcessHeap(), 0, data);
Modified: branches/condrv_restructure/dll/win32/shell32/folders/fs.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/dll/win32/sh…
==============================================================================
--- branches/condrv_restructure/dll/win32/shell32/folders/fs.h [iso-8859-1] (original)
+++ branches/condrv_restructure/dll/win32/shell32/folders/fs.h [iso-8859-1] Tue Aug 12
18:49:17 2014
@@ -123,8 +123,7 @@
struct _DoDropData {
CFSFolder *This;
- IDataObject *pDataObject;
- IAsyncOperation *pAsyncOperation;
+ IStream *pStream;
DWORD dwKeyState;
POINTL pt;
DWORD pdwEffect;
Modified: branches/condrv_restructure/dll/win32/syssetup/security.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/dll/win32/sy…
==============================================================================
--- branches/condrv_restructure/dll/win32/syssetup/security.c [iso-8859-1] (original)
+++ branches/condrv_restructure/dll/win32/syssetup/security.c [iso-8859-1] Tue Aug 12
18:49:17 2014
@@ -170,7 +170,11 @@
for (i = 0; i < 10; i++)
{
- ConvertStringSidToSid(BuiltinAccounts[i], &AccountSid);
+ if (!ConvertStringSidToSid(BuiltinAccounts[i], &AccountSid))
+ {
+ DPRINT1("ConvertStringSidToSid(%S) failed: %lu\n",
BuiltinAccounts[i], GetLastError());
+ continue;
+ }
Status = LsaCreateAccount(PolicyHandle,
AccountSid,
@@ -277,7 +281,11 @@
}
DPRINT("SID: %S\n", szSidString);
- ConvertStringSidToSid(szSidString, &AccountSid);
+ if (!ConvertStringSidToSid(szSidString, &AccountSid))
+ {
+ DPRINT1("ConvertStringSidToSid(%S) failed: %lu\n", szSidString,
GetLastError());
+ continue;
+ }
Status = LsaOpenAccount(PolicyHandle,
AccountSid,
Modified: branches/condrv_restructure/tools/cdmake/dirhash.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/tools/cdmake…
==============================================================================
--- branches/condrv_restructure/tools/cdmake/dirhash.c [iso-8859-1] (original)
+++ branches/condrv_restructure/tools/cdmake/dirhash.c [iso-8859-1] Tue Aug 12 18:49:17
2014
@@ -210,7 +210,8 @@
free(tf->target_name);
free(tf);
}
- delete_entry_by_normname(dh, de->normalized_name);
+ if (de->normalized_name)
+ delete_entry_by_normname(dh, de->normalized_name);
free(de->normalized_name);
free(de->case_name);
}
Modified: branches/condrv_restructure/tools/spec2def/spec2def.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/tools/spec2d…
==============================================================================
--- branches/condrv_restructure/tools/spec2def/spec2def.c [iso-8859-1] (original)
+++ branches/condrv_restructure/tools/spec2def/spec2def.c [iso-8859-1] Tue Aug 12 18:49:17
2014
@@ -664,6 +664,10 @@
else if (CompareToken(pc, "-ordinal"))
{
exp.uFlags |= FL_ORDINAL;
+ /* GCC doesn't automatically import by ordinal if an ordinal
+ * is found in the def file. Force it. */
+ if (gbImportLib && !gbMSComp)
+ exp.uFlags |= FL_NONAME;
}
else if (CompareToken(pc, "-stub"))
{
Modified: branches/condrv_restructure/win32ss/user/ntuser/focus.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/ntuser/focus.c [iso-8859-1] (original)
+++ branches/condrv_restructure/win32ss/user/ntuser/focus.c [iso-8859-1] Tue Aug 12
18:49:17 2014
@@ -315,28 +315,22 @@
pti = Wnd->head.pti;
- if (!IsListEmpty(&pti->SentMessagesListHead))
+ Entry = pti->SentMessagesListHead.Flink;
+ while (Entry != &pti->SentMessagesListHead)
{
// Scan sent queue messages to see if we received async messages.
- Entry = pti->SentMessagesListHead.Flink;
Message = CONTAINING_RECORD(Entry, USER_SENT_MESSAGE, ListEntry);
- do
- {
- if (IsListEmpty(Entry)) return;
- if (!Message) return;
- Entry = Message->ListEntry.Flink;
-
- if (Message->Msg.message == WM_ASYNC_SETACTIVEWINDOW &&
- Message->Msg.hwnd == UserHMGetHandle(Wnd) &&
- Message->Msg.wParam == wParam )
- {
- ERR("ASYNC SAW: Found one in the Sent Msg Queue! %p Activate/Deactivate
%d\n", Message->Msg.hwnd,!!wParam);
- RemoveEntryList(&Message->ListEntry); // Purge the entry.
- ExFreePoolWithTag(Message, TAG_USRMSG);
- }
- Message = CONTAINING_RECORD(Entry, USER_SENT_MESSAGE, ListEntry);
- }
- while (Entry != &pti->SentMessagesListHead);
+ Entry = Entry->Flink;
+
+ if (Message->Msg.message == WM_ASYNC_SETACTIVEWINDOW &&
+ Message->Msg.hwnd == UserHMGetHandle(Wnd) &&
+ Message->Msg.wParam == wParam)
+ {
+ ERR("ASYNC SAW: Found one in the Sent Msg Queue! %p Activate/Deactivate
%d\n", Message->Msg.hwnd, !!wParam);
+ RemoveEntryList(&Message->ListEntry); // Purge the entry.
+ ClearMsgBitsMask(pti, Message->QS_Flags);
+ ExFreePoolWithTag(Message, TAG_USRMSG);
+ }
}
}