[ros-diffs] [mjansen] 71572: [APPHELP_APITEST] Extend stringtable related tests. CORE-10367

2016-06-05 Thread mjansen
Author: mjansen
Date: Sun Jun  5 21:26:07 2016
New Revision: 71572

URL: http://svn.reactos.org/svn/reactos?rev=71572=rev
Log:
[APPHELP_APITEST] Extend stringtable related tests. CORE-10367

Modified:
trunk/rostests/apitests/apphelp/db.c

Modified: trunk/rostests/apitests/apphelp/db.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/apphelp/db.c?rev=71572=71571=71572=diff
==
--- trunk/rostests/apitests/apphelp/db.c[iso-8859-1] (original)
+++ trunk/rostests/apitests/apphelp/db.c[iso-8859-1] Sun Jun  5 
21:26:07 2016
@@ -315,6 +315,7 @@
 
 /*
  - Show that a stringtable is automatically generated,
+ - Show that entries in the stringtable are re-used,
  - validate multiple lists (for the length)
 */
 static void test_write_ex(void)
@@ -327,6 +328,7 @@
 TAG tag;
 DWORD size;
 BOOL ret;
+LPWSTR ptr;
 
 /* Write a small database */
 pdb = pSdbCreateDatabase(path1, DOS_PATH);
@@ -336,12 +338,14 @@
 tagdb = pSdbBeginWriteListTag(pdb, TAG_DATABASE);
 ok(tagdb == 12, "Expected tag to be 12, was %u\n", tagdb);
 ret = pSdbWriteStringTag(pdb, TAG_NAME, test1);
+ret = pSdbWriteStringTag(pdb, TAG_NAME, test2);
 ok(ret, "Expected SdbWriteStringTag to succeed\n");
 ret = pSdbEndWriteListTag(pdb, tagdb);
 ok(ret, "Expected SdbEndWriteListTag to succeed\n");
 
 tagdb = pSdbBeginWriteListTag(pdb, TAG_DATABASE);
-ok(tagdb == 24, "Expected tag to be 24, was %u\n", tagdb);
+ok(tagdb == 30, "Expected tag to be 24, was %u\n", tagdb);
+ret = pSdbWriteStringTag(pdb, TAG_NAME, test1);
 ret = pSdbWriteStringTag(pdb, TAG_NAME, test2);
 ok(ret, "Expected SdbWriteStringTag to succeed\n");
 ret = pSdbEndWriteListTag(pdb, tagdb);
@@ -354,10 +358,12 @@
 ok(pdb != NULL, "Expected a valid database\n");
 if (!pdb)
 return;
+
 tagdb = pSdbFindFirstTag(pdb, TAGID_ROOT, TAG_DATABASE);
 ok(tagdb == 12, "Expected tag to be 12, was %u\n", tagdb);
 size = pSdbGetTagDataSize(pdb, tagdb);
-ok(size == 6, "Expected size to be 6, was %u\n", size);
+ok(size == 12, "Expected size to be 12, was %u\n", size);
+
 tagstr = pSdbFindFirstTag(pdb, tagdb, TAG_NAME);
 ok(tagstr == 18, "Expected string tag to be 18, was %u\n", tagstr);
 tag = pSdbGetTagFromTagID(pdb, tagstr);
@@ -365,38 +371,160 @@
 size = pSdbGetTagDataSize(pdb, tagstr);
 ok(size == 4, "Expected size to be 4, was 0x%x\n", size);
 
+tagstr = pSdbFindNextTag(pdb, tagdb, tagstr);
+ok(tagstr == 24, "Expected string tag to be 24, was %u\n", tagstr);
+tag = pSdbGetTagFromTagID(pdb, tagstr);
+ok(tag == TAG_NAME, "Expected tag to be TAG_NAME, was 0x%x\n", (DWORD)tag);
+size = pSdbGetTagDataSize(pdb, tagstr);
+ok(size == 4, "Expected size to be 4, was 0x%x\n", size);
+
 tagdb = pSdbFindNextTag(pdb, TAGID_ROOT, tagdb);
-ok(tagdb == 24, "Expected tag to be 24, was %u\n", tagdb);
+ok(tagdb == 30, "Expected tag to be 30, was %u\n", tagdb);
 size = pSdbGetTagDataSize(pdb, tagdb);
-ok(size == 6, "Expected size to be 6, was %u\n", size);
+ok(size == 12, "Expected size to be 12, was %u\n", size);
+
 tagstr = pSdbFindFirstTag(pdb, tagdb, TAG_NAME);
-ok(tagstr == 30, "Expected string tag to be 30, was %u\n", tagstr);
+ok(tagstr == 36, "Expected string tag to be 36, was %u\n", tagstr);
 tag = pSdbGetTagFromTagID(pdb, tagstr);
 ok(tag == TAG_NAME, "Expected tag to be TAG_NAME, was 0x%x\n", (DWORD)tag);
 size = pSdbGetTagDataSize(pdb, tagstr);
 ok(size == 4, "Expected size to be 4, was %u\n", size);
 
+tagstr = pSdbFindNextTag(pdb, tagdb, tagstr);
+ok(tagstr == 42, "Expected string tag to be 42, was %u\n", tagstr);
+tag = pSdbGetTagFromTagID(pdb, tagstr);
+ok(tag == TAG_NAME, "Expected tag to be TAG_NAME, was 0x%x\n", (DWORD)tag);
+size = pSdbGetTagDataSize(pdb, tagstr);
+ok(size == 4, "Expected size to be 4, was 0x%x\n", size);
+
 tagdb = pSdbFindFirstTag(pdb, TAGID_ROOT, TAG_STRINGTABLE);
-ok(tagdb == 36, "Expected tag to be 36, was %u\n", tagdb);
+ok(tagdb == 48, "Expected tag to be 48, was %u\n", tagdb);
 size = pSdbGetTagDataSize(pdb, tagdb);
 ok(size == 32, "Expected size to be 32, was %u\n", size);
+
 tagstr = pSdbGetFirstChild(pdb, tagdb);
-ok(tagstr == 42, "Expected string tag to be 42, was %u\n", tagstr);
+ok(tagstr == 54, "Expected string tag to be 54, was %u\n", tagstr);
 tag = pSdbGetTagFromTagID(pdb, tagstr);
 ok(tag == TAG_STRINGTABLE_ITEM, "Expected tag to be TAG_STRINGTABLE_ITEM, 
was 0x%x\n", (DWORD)tag);
 size = pSdbGetTagDataSize(pdb, tagstr);
 ok(size == 10, "Expected size to be 10, was %u\n", size);
+ptr = pSdbGetStringTagPtr(pdb, tagstr);
+ok(ptr != NULL, "Expected a valid pointer\n");
+if (ptr)
+ok(!wcscmp(ptr, test1), "Expected ptr to be %s, was %s\n", 
wine_dbgstr_w(test1), 

[ros-diffs] [tfaber] 71571: [COMCTL32_WINETEST] - Fix copypasta'd test list entry

2016-06-05 Thread tfaber
Author: tfaber
Date: Sun Jun  5 21:00:22 2016
New Revision: 71571

URL: http://svn.reactos.org/svn/reactos?rev=71571=rev
Log:
[COMCTL32_WINETEST]
- Fix copypasta'd test list entry

Modified:
trunk/rostests/winetests/comctl32/testlist.c

Modified: trunk/rostests/winetests/comctl32/testlist.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/testlist.c?rev=71571=71570=71571=diff
==
--- trunk/rostests/winetests/comctl32/testlist.c[iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/testlist.c[iso-8859-1] Sun Jun  5 
21:00:22 2016
@@ -31,7 +31,7 @@
 
 const struct test winetest_testlist[] =
 {
-{ "button", func_animate },
+{ "animate", func_animate },
 { "button", func_button },
 { "comboex", func_comboex },
 { "datetime", func_datetime },




[ros-diffs] [akhaldi] 71570: [DBGHELP] GET_ENTRY => CONTAINING_RECORD.

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:47:14 2016
New Revision: 71570

URL: http://svn.reactos.org/svn/reactos?rev=71570=rev
Log:
[DBGHELP] GET_ENTRY => CONTAINING_RECORD.

Modified:
trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff
trunk/reactos/dll/win32/dbghelp/symbol.c

Modified: trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff?rev=71570=71569=71570=diff
==
--- trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff[iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff[iso-8859-1] Sun Jun  5 
19:47:14 2016
@@ -529,7 +529,7 @@
 +
 +/* try to find the pointer in our ht */
 +while ((ptr = hash_table_iter_up())) {
-+idx_to_ptr = GET_ENTRY(ptr, struct symt_idx_to_ptr, hash_elt);
++idx_to_ptr = CONTAINING_RECORD(ptr, struct symt_idx_to_ptr, hash_elt);
 +if (idx_to_ptr->sym == sym)
 +return idx_to_ptr->idx;
  }

Modified: trunk/reactos/dll/win32/dbghelp/symbol.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/symbol.c?rev=71570=71569=71570=diff
==
--- trunk/reactos/dll/win32/dbghelp/symbol.c[iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/symbol.c[iso-8859-1] Sun Jun  5 
19:47:14 2016
@@ -68,7 +68,7 @@
 
 /* try to find the pointer in our ht */
 while ((ptr = hash_table_iter_up())) {
-idx_to_ptr = GET_ENTRY(ptr, struct symt_idx_to_ptr, hash_elt);
+idx_to_ptr = CONTAINING_RECORD(ptr, struct symt_idx_to_ptr, hash_elt);
 if (idx_to_ptr->sym == sym)
 return idx_to_ptr->idx;
 }




[ros-diffs] [akhaldi] 71569: [MSCTF_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:38:56 2016
New Revision: 71569

URL: http://svn.reactos.org/svn/reactos?rev=71569=rev
Log:
[MSCTF_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/rostests/winetests/msctf/inputprocessor.c

Modified: trunk/rostests/winetests/msctf/inputprocessor.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msctf/inputprocessor.c?rev=71569=71568=71569=diff
==
--- trunk/rostests/winetests/msctf/inputprocessor.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msctf/inputprocessor.c [iso-8859-1] Sun Jun  5 
19:38:56 2016
@@ -62,6 +62,7 @@
 
 static DWORD tmSinkCookie;
 static DWORD tmSinkRefCount;
+static DWORD dmSinkCookie;
 static DWORD documentStatus;
 static ITfDocumentMgr *test_CurrentFocus = NULL;
 static ITfDocumentMgr *test_PrevFocus = NULL;
@@ -117,9 +118,7 @@
 *sink = (*sink & ~SINK_EXPECTED_COUNT_MASK) + (count << 16);
 return;
 default:
-if (todo)
-todo_wine winetest_ok(0, "Unexpected %s sink\n",name);
-else
+todo_wine_if (todo)
 winetest_ok(0, "Unexpected %s sink\n",name);
 }
 *sink = SINK_FIRED;
@@ -147,9 +146,7 @@
 winetest_trace("optional sink %s not fired\n",name);
 break;
 default:
-if (todo)
-todo_wine winetest_ok(0, "%s not fired as expected, in state 
%x\n",name,*sink);
-else
+todo_wine_if (todo)
 winetest_ok(0, "%s not fired as expected, in state 
%x\n",name,*sink);
 }
 *sink = SINK_UNEXPECTED;
@@ -230,12 +227,18 @@
 static HRESULT WINAPI TextStoreACP_AdviseSink(ITextStoreACP *iface,
 REFIID riid, IUnknown *punk, DWORD dwMask)
 {
+ITextStoreACPServices *services;
 HRESULT hr;
 
 sink_fire_ok(_ACP_AdviseSink,"TextStoreACP_AdviseSink");
 
-hr = IUnknown_QueryInterface(punk, 
_ITextStoreACPSink,(LPVOID*)());
+hr = IUnknown_QueryInterface(punk, _ITextStoreACPSink, 
(void**));
 ok(SUCCEEDED(hr),"Unable to QueryInterface on sink\n");
+
+hr = ITextStoreACPSink_QueryInterface(ACPSink, _ITextStoreACPServices, 
(void**));
+ok(hr == S_OK, "got 0x%08x\n", hr);
+ITextStoreACPServices_Release(services);
+
 return S_OK;
 }
 
@@ -620,6 +623,42 @@
 return S_OK;
 }
 
+static HRESULT WINAPI 
TfTransitoryExtensionSink_QueryInterface(ITfTransitoryExtensionSink *iface, 
REFIID riid, void **ppv)
+{
+if(IsEqualGUID(_IUnknown, riid) || 
IsEqualGUID(_ITfTransitoryExtensionSink, riid)) {
+*ppv = iface;
+return S_OK;
+}
+
+*ppv = NULL;
+return E_NOINTERFACE;
+}
+
+static ULONG WINAPI 
TfTransitoryExtensionSink_AddRef(ITfTransitoryExtensionSink *iface)
+{
+return 2;
+}
+
+static ULONG WINAPI 
TfTransitoryExtensionSink_Release(ITfTransitoryExtensionSink *iface)
+{
+return 1;
+}
+
+static HRESULT WINAPI 
TfTransitoryExtensionSink_OnTransitoryExtensionUpdated(ITfTransitoryExtensionSink
 *iface, ITfContext *pic,
+TfEditCookie ecReadOnly, ITfRange *pResultRange, ITfRange 
*pCompositionRange, BOOL *pfDeleteResultRange)
+{
+ok(0, "unexpected call\n");
+return E_NOTIMPL;
+}
+
+static const ITfTransitoryExtensionSinkVtbl TfTransitoryExtensionSinkVtbl = {
+TfTransitoryExtensionSink_QueryInterface,
+TfTransitoryExtensionSink_AddRef,
+TfTransitoryExtensionSink_Release,
+TfTransitoryExtensionSink_OnTransitoryExtensionUpdated
+};
+
+static ITfTransitoryExtensionSink TfTransitoryExtensionSink = { 
 };
 
 
/
  * Stub text service for testing
@@ -1051,6 +1090,34 @@
 ITfSource_Release(source);
 }
 
+static void test_DocumentMgrAdviseSinks(void)
+{
+ITfSource *source;
+HRESULT hr;
+
+hr = ITfDocumentMgr_QueryInterface(g_dm, _ITfSource, (void**));
+ok(hr == S_OK,"Failed to get IID_ITfSource for DocumentMgr\n");
+
+dmSinkCookie = 0;
+hr = ITfSource_AdviseSink(source, _ITfTransitoryExtensionSink, 
(IUnknown*), );
+ok(hr == S_OK,"Failed to Advise Sink\n");
+
+ITfSource_Release(source);
+}
+
+static void test_DocumentMgrUnadviseSinks(void)
+{
+ITfSource *source = NULL;
+HRESULT hr;
+
+hr = ITfDocumentMgr_QueryInterface(g_dm, _ITfSource, (void**));
+ok(hr == S_OK,"Failed to get IID_ITfSource for DocumentMgr\n");
+
+hr = ITfSource_UnadviseSink(source, dmSinkCookie);
+ok(hr == S_OK,"Failed to unadvise Sink\n");
+ITfSource_Release(source);
+}
+
 /**
  * ITfKeyEventSink
  **/
@@ -1204,13 +1271,13 @@
 ok(hr == E_INVALIDARG,"Wrong return, expected E_INVALIDARG\n");
 
 hr =ITfKeystrokeMgr_PreserveKey(keymgr, 0, _PreservedKey, , 
NULL, 0);
-

[ros-diffs] [akhaldi] 71568: [MSCTF] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:38:23 2016
New Revision: 71568

URL: http://svn.reactos.org/svn/reactos?rev=71568=rev
Log:
[MSCTF] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/msctf/compartmentmgr.c
trunk/reactos/dll/win32/msctf/context.c
trunk/reactos/dll/win32/msctf/documentmgr.c
trunk/reactos/dll/win32/msctf/inputprocessor.c
trunk/reactos/dll/win32/msctf/msctf.c
trunk/reactos/dll/win32/msctf/msctf_internal.h
trunk/reactos/dll/win32/msctf/threadmgr.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/msctf/compartmentmgr.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/compartmentmgr.c?rev=71568=71567=71568=diff
==
--- trunk/reactos/dll/win32/msctf/compartmentmgr.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msctf/compartmentmgr.c  [iso-8859-1] Sun Jun  5 
19:38:23 2016
@@ -46,15 +46,6 @@
 struct list *cursor;
 } CompartmentEnumGuid;
 
-
-typedef struct tagCompartmentSink {
-struct list entry;
-union {
-IUnknown*pIUnknown;
-ITfCompartmentEventSink *pITfCompartmentEventSink;
-} interfaces;
-} CompartmentSink;
-
 typedef struct tagCompartment {
 ITfCompartment ITfCompartment_iface;
 ITfSource ITfSource_iface;
@@ -423,23 +414,11 @@
 /**
  * ITfCompartment
  **/
-static void free_sink(CompartmentSink *sink)
-{
-IUnknown_Release(sink->interfaces.pIUnknown);
-HeapFree(GetProcessHeap(),0,sink);
-}
-
 static void Compartment_Destructor(Compartment *This)
 {
-struct list *cursor, *cursor2;
 TRACE("destroying %p\n", This);
 VariantClear(>variant);
-LIST_FOR_EACH_SAFE(cursor, cursor2, >CompartmentEventSink)
-{
-CompartmentSink* sink = LIST_ENTRY(cursor,CompartmentSink,entry);
-list_remove(cursor);
-free_sink(sink);
-}
+free_sinks(>CompartmentEventSink);
 HeapFree(GetProcessHeap(),0,This);
 }
 
@@ -489,6 +468,7 @@
 TfClientId tid, const VARIANT *pvarValue)
 {
 Compartment *This = impl_from_ITfCompartment(iface);
+ITfCompartmentEventSink *sink;
 struct list *cursor;
 
 TRACE("(%p) %i %p\n",This,tid,pvarValue);
@@ -514,10 +494,9 @@
 else if (V_VT(pvarValue) == VT_UNKNOWN)
 IUnknown_AddRef(V_UNKNOWN(>variant));
 
-LIST_FOR_EACH(cursor, >CompartmentEventSink)
-{
-CompartmentSink* sink = LIST_ENTRY(cursor,CompartmentSink,entry);
-
ITfCompartmentEventSink_OnChange(sink->interfaces.pITfCompartmentEventSink,>valueData->guid);
+SINK_FOR_EACH(cursor, >CompartmentEventSink, 
ITfCompartmentEventSink, sink)
+{
+ITfCompartmentEventSink_OnChange(sink, >valueData->guid);
 }
 
 return S_OK;
@@ -572,7 +551,6 @@
 REFIID riid, IUnknown *punk, DWORD *pdwCookie)
 {
 Compartment *This = impl_from_ITfSource(iface);
-CompartmentSink *cs;
 
 TRACE("(%p) %s %p %p\n",This,debugstr_guid(riid),punk,pdwCookie);
 
@@ -580,47 +558,23 @@
 return E_INVALIDARG;
 
 if (IsEqualIID(riid, _ITfCompartmentEventSink))
-{
-cs = HeapAlloc(GetProcessHeap(),0,sizeof(CompartmentSink));
-if (!cs)
-return E_OUTOFMEMORY;
-if (FAILED(IUnknown_QueryInterface(punk, riid, (LPVOID 
*)>interfaces.pITfCompartmentEventSink)))
-{
-HeapFree(GetProcessHeap(),0,cs);
-return CONNECT_E_CANNOTCONNECT;
-}
-list_add_head(>CompartmentEventSink,>entry);
-*pdwCookie = generate_Cookie(COOKIE_MAGIC_COMPARTMENTSINK , cs);
-}
-else
-{
-FIXME("(%p) Unhandled Sink: %s\n",This,debugstr_guid(riid));
-return E_NOTIMPL;
-}
-
-TRACE("cookie %x\n",*pdwCookie);
-
-return S_OK;
+return advise_sink(>CompartmentEventSink, 
_ITfCompartmentEventSink,
+   COOKIE_MAGIC_COMPARTMENTSINK, punk, pdwCookie);
+
+FIXME("(%p) Unhandled Sink: %s\n",This,debugstr_guid(riid));
+return E_NOTIMPL;
 }
 
 static HRESULT WINAPI CompartmentSource_UnadviseSink(ITfSource *iface, DWORD 
pdwCookie)
 {
 Compartment *This = impl_from_ITfSource(iface);
-CompartmentSink *sink;
 
 TRACE("(%p) %x\n",This,pdwCookie);
 
 if (get_Cookie_magic(pdwCookie)!=COOKIE_MAGIC_COMPARTMENTSINK)
 return E_INVALIDARG;
 
-sink = remove_Cookie(pdwCookie);
-if (!sink)
-return CONNECT_E_NOCONNECTION;
-
-list_remove(>entry);
-free_sink(sink);
-
-return S_OK;
+return unadvise_sink(pdwCookie);
 }
 
 static const ITfSourceVtbl CompartmentSourceVtbl =

Modified: trunk/reactos/dll/win32/msctf/context.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msctf/context.c?rev=71568=71567=71568=diff
==
--- 

[ros-diffs] [akhaldi] 71567: [PSDK] Update msctf.idl. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:36:59 2016
New Revision: 71567

URL: http://svn.reactos.org/svn/reactos?rev=71567=rev
Log:
[PSDK] Update msctf.idl. CORE-11368

Modified:
trunk/reactos/sdk/include/psdk/msctf.idl

Modified: trunk/reactos/sdk/include/psdk/msctf.idl
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/msctf.idl?rev=71567=71566=71567=diff
==
--- trunk/reactos/sdk/include/psdk/msctf.idl[iso-8859-1] (original)
+++ trunk/reactos/sdk/include/psdk/msctf.idl[iso-8859-1] Sun Jun  5 
19:36:59 2016
@@ -97,6 +97,8 @@
 interface IEnumTfLanguageProfiles;
 interface ITfCompositionView;
 interface ITfKeyEventSink;
+interface ITfPersistentPropertyLoaderACP;
+interface ITfRangeACP;
 
 cpp_quote("#if 0")
 typedef [uuid(4f5d560f-5ab5-4dde-8c4d-404592857ab0)] UINT_PTR HKL;
@@ -348,6 +350,34 @@
 HRESULT Restore(
 [in] TfEditCookie cookie,
 [in] ITfRange *range);
+}
+
+[
+object,
+uuid(aa80e901-2021-11d2-93e0-0060b067b86e),
+pointer_default(unique)
+]
+interface ITextStoreACPServices : IUnknown
+{
+HRESULT Serialize(
+[in] ITfProperty *prop,
+[in] ITfRange *range,
+[out] TF_PERSISTENT_PROPERTY_HEADER_ACP *header,
+[in] IStream *stream);
+
+HRESULT Unserialize(
+[in] ITfProperty *prop,
+[in] const TF_PERSISTENT_PROPERTY_HEADER_ACP *header,
+[in] IStream *stream,
+[in] ITfPersistentPropertyLoaderACP *loader);
+
+HRESULT ForceLoadProperty(
+[in] ITfProperty *prop);
+
+HRESULT CreateRange(
+[in] LONG start,
+[in] LONG end,
+[out] ITfRangeACP **range);
 }
 
 [
@@ -1815,3 +1845,19 @@
 
 HRESULT UnadviseMouseSink([in] DWORD dwCookie);
 }
+
+[
+object,
+local,
+uuid(a615096f-1c57-4813-8a15-55ee6e5a839c),
+pointer_default(unique)
+]
+interface ITfTransitoryExtensionSink : IUnknown
+{
+HRESULT OnTransitoryExtensionUpdated(
+[in] ITfContext *pic,
+[in] TfEditCookie ecReadOnly,
+[in] ITfRange *pResultRange,
+[in] ITfRange *pCompositionRange,
+[out] BOOL *pfDeleteResultRange);
+}




[ros-diffs] [akhaldi] 71566: [MPR_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:35:47 2016
New Revision: 71566

URL: http://svn.reactos.org/svn/reactos?rev=71566=rev
Log:
[MPR_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/rostests/winetests/mpr/mpr.c

Modified: trunk/rostests/winetests/mpr/mpr.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mpr/mpr.c?rev=71566=71565=71566=diff
==
--- trunk/rostests/winetests/mpr/mpr.c  [iso-8859-1] (original)
+++ trunk/rostests/winetests/mpr/mpr.c  [iso-8859-1] Sun Jun  5 19:35:47 2016
@@ -101,25 +101,23 @@
 info_size = sizeof(buffer);
 ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
 buffer, _size);
-todo_wine{
-if(drive_type == DRIVE_REMOTE)
+if(drive_type == DRIVE_REMOTE)
+todo_wine
 ok(ret == WN_NO_ERROR, "WNetGetUniversalNameA failed: %08x\n", 
ret);
 else
 ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
 "(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, 
ret);
-}
 ok(info_size == sizeof(buffer), "Got wrong size: %u\n", info_size);
 
 fail_size = 0;
 ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
 buffer, _size);
-todo_wine{
-if(drive_type == DRIVE_REMOTE)
+if(drive_type == DRIVE_REMOTE)
+todo_wine
 ok(ret == WN_BAD_VALUE, "WNetGetUniversalNameA failed: %08x\n", 
ret);
 else
 ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
 "(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, 
ret);
-}
 ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
 buffer, NULL);
 todo_wine ok(ret == WN_BAD_POINTER, "WNetGetUniversalNameA failed: 
%08x\n", ret);
@@ -127,13 +125,13 @@
 ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
 NULL, _size);
 
-todo_wine{
 if(((GetVersion() & 0x8000) == 0x0004) || /* NT40 */
(drive_type == DRIVE_REMOTE))
+todo_wine
 ok(ret == WN_BAD_POINTER, "WNetGetUniversalNameA failed: %08x\n", 
ret);
 else
 ok(ret == WN_NOT_CONNECTED || ret == WN_BAD_VALUE,
-"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, 
ret);}
+"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, 
ret);
 
 fail_size = sizeof(driveA) / sizeof(char) - 1;
 ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
@@ -149,13 +147,13 @@
 info_size = sizeof(buffer);
 ret = WNetGetUniversalNameW(driveW, REMOTE_NAME_INFO_LEVEL,
 buffer, _size);
-
-if(drive_type == DRIVE_REMOTE)
-todo_wine ok(ret == WN_NO_ERROR, "WNetGetUniversalNameW failed: 
%08x\n", ret);
+todo_wine{
+if(drive_type == DRIVE_REMOTE)
+ok(ret == WN_NO_ERROR, "WNetGetUniversalNameW failed: %08x\n", 
ret);
 else
 ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
 "(%s) WNetGetUniversalNameW gave wrong error: %u\n", driveA, 
ret);
-
+}
 ok(info_size == sizeof(buffer), "Got wrong size: %u\n", info_size);
 }
 }




[ros-diffs] [akhaldi] 71565: [MPR] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:35:09 2016
New Revision: 71565

URL: http://svn.reactos.org/svn/reactos?rev=71565=rev
Log:
[MPR] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/mpr/wnet.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/mpr/wnet.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/wnet.c?rev=71565=71564=71565=diff
==
--- trunk/reactos/dll/win32/mpr/wnet.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mpr/wnet.c  [iso-8859-1] Sun Jun  5 19:35:09 2016
@@ -2101,7 +2101,7 @@
 break;
 }
 case REMOTE_NAME_INFO_LEVEL:
-err = WN_NO_NETWORK;
+err = WN_NOT_CONNECTED;
 break;
 
 default:
@@ -2148,7 +2148,7 @@
 break;
 }
 case REMOTE_NAME_INFO_LEVEL:
-err = WN_NOT_CONNECTED;
+err = WN_NO_NETWORK;
 break;
 
 default:

Modified: trunk/reactos/media/doc/README.WINE
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=71565=71564=71565=diff
==
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun  5 19:35:09 2016
@@ -100,7 +100,7 @@
 reactos/dll/win32/mgmtapi # Synced to WineStaging-1.9.11
 reactos/dll/win32/mlang   # Synced to WineStaging-1.9.4
 reactos/dll/win32/mmdevapi# Synced to WineStaging-1.9.11
-reactos/dll/win32/mpr # Synced to WineStaging-1.9.4
+reactos/dll/win32/mpr # Synced to WineStaging-1.9.11
 reactos/dll/win32/mprapi  # Synced to WineStaging-1.9.4
 reactos/dll/win32/msacm32 # Synced to WineStaging-1.9.4
 reactos/dll/win32/msacm32.drv # Synced to WineStaging-1.9.4




[ros-diffs] [akhaldi] 71564: [MMDEVAPI_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:34:02 2016
New Revision: 71564

URL: http://svn.reactos.org/svn/reactos?rev=71564=rev
Log:
[MMDEVAPI_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/rostests/winetests/mmdevapi/propstore.c
trunk/rostests/winetests/mmdevapi/render.c

Modified: trunk/rostests/winetests/mmdevapi/propstore.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mmdevapi/propstore.c?rev=71564=71563=71564=diff
==
--- trunk/rostests/winetests/mmdevapi/propstore.c   [iso-8859-1] (original)
+++ trunk/rostests/winetests/mmdevapi/propstore.c   [iso-8859-1] Sun Jun  5 
19:34:02 2016
@@ -173,7 +173,7 @@
 
 /* Note: the registry key exists even without calling IPropStore::Commit */
 size = sizeof(regval);
-ret = RegGetValueW(props, NULL, bogusW, RRF_RT_DWORD, , , 
);
+ret = RegQueryValueExW(props, bogusW, NULL, , (LPBYTE), );
 ok(ret == ERROR_SUCCESS, "Couldn't get bogus propertykey value: %u\n", 
ret);
 ok(type == REG_DWORD, "Got wrong value type: %u\n", type);
 ok(regval == 0xAB, "Got wrong value: 0x%x\n", regval);

Modified: trunk/rostests/winetests/mmdevapi/render.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mmdevapi/render.c?rev=71564=71563=71564=diff
==
--- trunk/rostests/winetests/mmdevapi/render.c  [iso-8859-1] (original)
+++ trunk/rostests/winetests/mmdevapi/render.c  [iso-8859-1] Sun Jun  5 
19:34:02 2016
@@ -29,16 +29,14 @@
 
 #define COBJMACROS
 
-#ifdef STANDALONE
-#include "initguid.h"
-#endif
-
 #include "unknwn.h"
 #include "uuids.h"
 #include "mmdeviceapi.h"
 #include "mmsystem.h"
 #include "audioclient.h"
 #include "audiopolicy.h"
+#include "initguid.h"
+#include "endpointvolume.h"
 
 static const unsigned int win_formats[][4] = {
 { 8000,  8, 1},   { 8000,  8, 2},   { 8000, 16, 1},   { 8000, 16, 2},
@@ -729,7 +727,7 @@
 ok(defp == 10 || broken(defp == 101587) || defp == 20,
"Expected 10ms default period: %u\n", (ULONG)defp);
 ok(minp != 0, "Minimum period is 0\n");
-ok(minp <= defp, "Mininum period is greater than default period\n");
+ok(minp <= defp, "Minimum period is greater than default period\n");
 
 hr = IAudioClient_GetService(ac, _IAudioRenderClient, (void**));
 ok(hr == S_OK, "GetService failed: %08x\n", hr);
@@ -951,8 +949,9 @@
 ok(gbsize == bufsize,
"BufferSize %u at rate %u\n", gbsize, pwfx->nSamplesPerSec);
 else
-ok(gbsize == parts * fragment || gbsize == MulDiv(bufsize, 1, 1024) * 1024,
-   "BufferSize %u misfits fragment size %u at rate %u\n", gbsize, 
fragment, pwfx->nSamplesPerSec);
+todo_wine
+ok(gbsize == parts * fragment || gbsize == MulDiv(bufsize, 1, 1024) * 
1024,
+   "BufferSize %u misfits fragment size %u at rate %u\n", gbsize, 
fragment, pwfx->nSamplesPerSec);
 
 /* In shared mode, GetCurrentPadding decreases in multiples of
  * fragment size (i.e. updated only at period ticks), whereas
@@ -2242,6 +2241,44 @@
 
 }
 
+static void test_endpointvolume(void)
+{
+HRESULT hr;
+IAudioEndpointVolume *aev;
+float mindb, maxdb, increment, volume;
+BOOL mute;
+
+hr = IMMDevice_Activate(dev, _IAudioEndpointVolume,
+CLSCTX_INPROC_SERVER, NULL, (void**));
+ok(hr == S_OK, "Activation failed with %08x\n", hr);
+if(hr != S_OK)
+return;
+
+hr = IAudioEndpointVolume_GetVolumeRange(aev, , NULL, NULL);
+ok(hr == E_POINTER, "GetVolumeRange should have failed with E_POINTER: 
0x%08x\n", hr);
+
+hr = IAudioEndpointVolume_GetVolumeRange(aev, , , );
+ok(hr == S_OK, "GetVolumeRange failed: 0x%08x\n", hr);
+trace("got range: [%f,%f]/%f\n", mindb, maxdb, increment);
+
+hr = IAudioEndpointVolume_SetMasterVolumeLevel(aev, mindb - increment, 
NULL);
+ok(hr == E_INVALIDARG, "SetMasterVolumeLevel failed: 0x%08x\n", hr);
+
+hr = IAudioEndpointVolume_GetMasterVolumeLevel(aev, );
+ok(hr == S_OK, "GetMasterVolumeLevel failed: 0x%08x\n", hr);
+
+hr = IAudioEndpointVolume_SetMasterVolumeLevel(aev, volume, NULL);
+ok(hr == S_OK, "SetMasterVolumeLevel failed: 0x%08x\n", hr);
+
+hr = IAudioEndpointVolume_GetMute(aev, );
+ok(hr == S_OK, "GetMute failed: %08x\n", hr);
+
+hr = IAudioEndpointVolume_SetMute(aev, mute, NULL);
+ok(hr == S_OK || hr == S_FALSE, "SetMute failed: %08x\n", hr);
+
+IAudioEndpointVolume_Release(aev);
+}
+
 START_TEST(render)
 {
 HRESULT hr;
@@ -2283,6 +2320,7 @@
 test_volume_dependence();
 test_session_creation();
 test_worst_case();
+test_endpointvolume();
 
 IMMDevice_Release(dev);
 




[ros-diffs] [akhaldi] 71563: [MMDEVAPI] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:33:06 2016
New Revision: 71563

URL: http://svn.reactos.org/svn/reactos?rev=71563=rev
Log:
[MMDEVAPI] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/mmdevapi/audiovolume.c
trunk/reactos/dll/win32/mmdevapi/devenum.c
trunk/reactos/dll/win32/mmdevapi/main.c
trunk/reactos/dll/win32/mmdevapi/mmdevapi.h
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/mmdevapi/audiovolume.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mmdevapi/audiovolume.c?rev=71563=71562=71563=diff
==
--- trunk/reactos/dll/win32/mmdevapi/audiovolume.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mmdevapi/audiovolume.c  [iso-8859-1] Sun Jun  5 
19:33:06 2016
@@ -21,7 +21,7 @@
 typedef struct AEVImpl {
 IAudioEndpointVolumeEx IAudioEndpointVolumeEx_iface;
 LONG ref;
-float level;
+float master_vol;
 BOOL mute;
 } AEVImpl;
 
@@ -102,9 +102,12 @@
 {
 AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
 
-FIXME("(%p)->(%f,%s): stub\n", iface, leveldb, debugstr_guid(ctx));
-
-This->level = leveldb;
+TRACE("(%p)->(%f,%s)\n", iface, leveldb, debugstr_guid(ctx));
+
+if(leveldb < -100.f || leveldb > 0.f)
+return E_INVALIDARG;
+
+This->master_vol = leveldb;
 
 return S_OK;
 }
@@ -120,12 +123,12 @@
 {
 AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
 
-FIXME("(%p)->(%p): stub\n", iface, leveldb);
+TRACE("(%p)->(%p)\n", iface, leveldb);
 
 if (!leveldb)
 return E_POINTER;
 
-*leveldb = This->level;
+*leveldb = This->master_vol;
 
 return S_OK;
 }
@@ -174,19 +177,22 @@
 static HRESULT WINAPI AEV_SetMute(IAudioEndpointVolumeEx *iface, BOOL mute, 
const GUID *ctx)
 {
 AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
-
-FIXME("(%p)->(%u,%s): stub\n", iface, mute, debugstr_guid(ctx));
+HRESULT ret;
+
+TRACE("(%p)->(%u,%s)\n", iface, mute, debugstr_guid(ctx));
+
+ret = This->mute == mute ? S_FALSE : S_OK;
 
 This->mute = mute;
 
-return S_OK;
+return ret;
 }
 
 static HRESULT WINAPI AEV_GetMute(IAudioEndpointVolumeEx *iface, BOOL *mute)
 {
 AEVImpl *This = impl_from_IAudioEndpointVolumeEx(iface);
 
-FIXME("(%p)->(%p): stub\n", iface, mute);
+TRACE("(%p)->(%p)\n", iface, mute);
 
 if (!mute)
 return E_POINTER;
@@ -230,14 +236,14 @@
 
 static HRESULT WINAPI AEV_GetVolumeRange(IAudioEndpointVolumeEx *iface, float 
*mindb, float *maxdb, float *inc)
 {
-FIXME("(%p)->(%p,%p,%p): stub\n", iface, mindb, maxdb, inc);
+TRACE("(%p)->(%p,%p,%p)\n", iface, mindb, maxdb, inc);
 
 if (!mindb || !maxdb || !inc)
 return E_POINTER;
 
-*mindb = 0.0f;
-*maxdb = 1.0f;
-*inc = 0.1f;
+*mindb = -100.f;
+*maxdb = 0.f;
+*inc = 1.f;
 
 return S_OK;
 }
@@ -276,19 +282,17 @@
 AEV_GetVolumeRangeChannel
 };
 
-HRESULT AudioEndpointVolume_Create(MMDevice *parent, IAudioEndpointVolume 
**ppv)
+HRESULT AudioEndpointVolume_Create(MMDevice *parent, IAudioEndpointVolumeEx 
**ppv)
 {
 AEVImpl *This;
 
 *ppv = NULL;
-This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
+This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*This));
 if (!This)
 return E_OUTOFMEMORY;
 This->IAudioEndpointVolumeEx_iface.lpVtbl = _Vtbl;
 This->ref = 1;
-This->level = 1.0f;
-This->mute = FALSE;
-
-*ppv = (IAudioEndpointVolume*)>IAudioEndpointVolumeEx_iface;
-return S_OK;
-}
+
+*ppv = >IAudioEndpointVolumeEx_iface;
+return S_OK;
+}

Modified: trunk/reactos/dll/win32/mmdevapi/devenum.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mmdevapi/devenum.c?rev=71563=71562=71563=diff
==
--- trunk/reactos/dll/win32/mmdevapi/devenum.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mmdevapi/devenum.c  [iso-8859-1] Sun Jun  5 
19:33:06 2016
@@ -577,8 +577,9 @@
 
 if (IsEqualIID(riid, _IAudioClient)){
 hr = drvs.pGetAudioEndpoint(>devguid, iface, 
(IAudioClient**)ppv);
-}else if (IsEqualIID(riid, _IAudioEndpointVolume))
-hr = AudioEndpointVolume_Create(This, (IAudioEndpointVolume**)ppv);
+}else if (IsEqualIID(riid, _IAudioEndpointVolume) ||
+IsEqualIID(riid, _IAudioEndpointVolumeEx))
+hr = AudioEndpointVolume_Create(This, (IAudioEndpointVolumeEx**)ppv);
 else if (IsEqualIID(riid, _IAudioSessionManager)
  || IsEqualIID(riid, _IAudioSessionManager2))
 {

Modified: trunk/reactos/dll/win32/mmdevapi/main.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mmdevapi/main.c?rev=71563=71562=71563=diff
==
--- trunk/reactos/dll/win32/mmdevapi/main.c [iso-8859-1] (original)
+++ 

[ros-diffs] [akhaldi] 71562: [MGMTAPI] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:32:00 2016
New Revision: 71562

URL: http://svn.reactos.org/svn/reactos?rev=71562=rev
Log:
[MGMTAPI] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/mgmtapi/mgmtapi.c
trunk/reactos/dll/win32/mgmtapi/mgmtapi.spec
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/mgmtapi/mgmtapi.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mgmtapi/mgmtapi.c?rev=71562=71561=71562=diff
==
--- trunk/reactos/dll/win32/mgmtapi/mgmtapi.c   [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mgmtapi/mgmtapi.c   [iso-8859-1] Sun Jun  5 
19:32:00 2016
@@ -38,3 +38,10 @@
 }
 return TRUE;
 }
+
+BOOL WINAPI SnmpMgrTrapListen(HANDLE *available)
+{
+FIXME("stub: %p\n", available);
+SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+return FALSE;
+}

Modified: trunk/reactos/dll/win32/mgmtapi/mgmtapi.spec
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mgmtapi/mgmtapi.spec?rev=71562=71561=71562=diff
==
--- trunk/reactos/dll/win32/mgmtapi/mgmtapi.spec[iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mgmtapi/mgmtapi.spec[iso-8859-1] Sun Jun  5 
19:32:00 2016
@@ -6,4 +6,4 @@
 @ stub SnmpMgrOpen
 @ stub SnmpMgrRequest
 @ stub SnmpMgrStrToOid
-@ stub SnmpMgrTrapListen
+@ stdcall SnmpMgrTrapListen(ptr)

Modified: trunk/reactos/media/doc/README.WINE
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=71562=71561=71562=diff
==
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun  5 19:32:00 2016
@@ -97,7 +97,7 @@
 reactos/dll/win32/mciqtz32# Synced to WineStaging-1.9.11
 reactos/dll/win32/mciseq  # Synced to WineStaging-1.9.4
 reactos/dll/win32/mciwave # Synced to WineStaging-1.9.4
-reactos/dll/win32/mgmtapi # Synced to WineStaging-1.9.4
+reactos/dll/win32/mgmtapi # Synced to WineStaging-1.9.11
 reactos/dll/win32/mlang   # Synced to WineStaging-1.9.4
 reactos/dll/win32/mmdevapi# Synced to WineStaging-1.9.4
 reactos/dll/win32/mpr # Synced to WineStaging-1.9.4




[ros-diffs] [akhaldi] 71561: [MCIQTZ32] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:30:31 2016
New Revision: 71561

URL: http://svn.reactos.org/svn/reactos?rev=71561=rev
Log:
[MCIQTZ32] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/mciqtz32/mciqtz.c
trunk/reactos/dll/win32/mciqtz32/mciqtz_private.h
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/mciqtz32/mciqtz.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciqtz32/mciqtz.c?rev=71561=71560=71561=diff
==
--- trunk/reactos/dll/win32/mciqtz32/mciqtz.c   [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mciqtz32/mciqtz.c   [iso-8859-1] Sun Jun  5 
19:30:31 2016
@@ -33,7 +33,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(mciqtz);
 
-static DWORD CALLBACK MCIQTZ_taskThread(LPVOID arg);
+static DWORD MCIQTZ_mciClose(UINT, DWORD, LPMCI_GENERIC_PARMS);
 static DWORD MCIQTZ_mciStop(UINT, DWORD, LPMCI_GENERIC_PARMS);
 
 /*==*
@@ -70,40 +70,6 @@
 return wma;
 }
 
-/***
- *  MCIQTZ_relayTaskMessage [internal]
- */
-static LRESULT MCIQTZ_relayTaskMessage(DWORD_PTR dwDevID, UINT wMsg,
-  DWORD dwFlags, LPARAM lpParms)
-{
-WINE_MCIQTZ *wma;
-LRESULT res;
-HANDLE handles[2];
-DWORD ret;
-TRACE("(%08lX, %08x, %08x, %08lx)\n", dwDevID, wMsg, dwFlags, lpParms);
-
-wma = MCIQTZ_mciGetOpenDev(dwDevID);
-if (!wma)
-return MCIERR_INVALID_DEVICE_ID;
-EnterCriticalSection(>cs);
-wma->task.devid = dwDevID;
-wma->task.msg   = wMsg;
-wma->task.flags = dwFlags;
-wma->task.parms = lpParms;
-SetEvent(wma->task.notify);
-handles[0] = wma->task.done;
-handles[1] = wma->task.thread;
-ret = WaitForMultipleObjects(sizeof(handles)/sizeof(handles[0]), handles,
- FALSE, INFINITE);
-if (ret == WAIT_OBJECT_0)
-res = wma->task.res;
-else
-res = MCIERR_INTERNAL;
-LeaveCriticalSection(>cs);
-
-return res;
-}
-
 /**
  *  MCIQTZ_drvOpen  [internal]
  */
@@ -123,25 +89,12 @@
 return 0;
 
 wma->stop_event = CreateEventW(NULL, FALSE, FALSE, NULL);
-wma->task.notify = CreateEventW(NULL, FALSE, FALSE, NULL);
-if (!wma->task.notify) goto err;
-wma->task.done = CreateEventW(NULL, FALSE, FALSE, NULL);
-if (!wma->task.done)   goto err;
-wma->task.thread = CreateThread(NULL, 0, MCIQTZ_taskThread, >task, 0, 
NULL);
-if (!wma->task.thread) goto err;
-InitializeCriticalSection(>cs);
-wma->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": WINE_MCIQTZ");
 modp->wType = MCI_DEVTYPE_DIGITAL_VIDEO;
 wma->wDevID = modp->wDeviceID;
 modp->wCustomCommandTable = wma->command_table = 
mciLoadCommandResource(MCIQTZ_hInstance, mciAviWStr, 0);
 mciSetDriverData(wma->wDevID, (DWORD_PTR)wma);
 
 return modp->wDeviceID;
-err:
-if (wma->task.notify) CloseHandle(wma->task.notify);
-if (wma->task.done)   CloseHandle(wma->task.done);
-HeapFree(GetProcessHeap(), 0, wma);
-return 0;
 }
 
 /**
@@ -157,16 +110,9 @@
 
 if (wma) {
 /* finish all outstanding things */
-MCIQTZ_relayTaskMessage(dwDevID, MCI_CLOSE_DRIVER, MCI_WAIT, 0);
+MCIQTZ_mciClose(dwDevID, MCI_WAIT, NULL);
 
 mciFreeCommandResource(wma->command_table);
-MCIQTZ_relayTaskMessage(dwDevID, MCI_CLOSE, MCI_WAIT, 0);
-WaitForSingleObject(wma->task.thread, INFINITE);
-CloseHandle(wma->task.notify);
-CloseHandle(wma->task.done);
-CloseHandle(wma->task.thread);
-wma->cs.DebugInfo->Spare[0] = 0;
-DeleteCriticalSection(>cs);
 mciSetDriverData(dwDevID, 0);
 CloseHandle(wma->stop_event);
 HeapFree(GetProcessHeap(), 0, wma);
@@ -222,6 +168,9 @@
 RECT rc = { 0, 0, 0, 0 };
 
 TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpOpenParms);
+
+if(!lpOpenParms)
+return MCIERR_NULL_PARAMETER_BLOCK;
 
 wma = MCIQTZ_mciGetOpenDev(wDevID);
 if (!wma)
@@ -446,6 +395,9 @@
 
 TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
 
+if(!lpParms)
+return MCIERR_NULL_PARAMETER_BLOCK;
+
 wma = MCIQTZ_mciGetOpenDev(wDevID);
 if (!wma)
 return MCIERR_INVALID_DEVICE_ID;
@@ -503,6 +455,9 @@
 
 TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms);
 
+if(!lpParms)
+return MCIERR_NULL_PARAMETER_BLOCK;
+
 wma = MCIQTZ_mciGetOpenDev(wDevID);
 if (!wma)
 return MCIERR_INVALID_DEVICE_ID;
@@ -587,6 +542,29 @@
 }
 
 /***
+ *  

[ros-diffs] [akhaldi] 71560: [MCIAVI32] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:29:11 2016
New Revision: 71560

URL: http://svn.reactos.org/svn/reactos?rev=71560=rev
Log:
[MCIAVI32] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/mciavi32/mmoutput.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/mciavi32/mmoutput.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciavi32/mmoutput.c?rev=71560=71559=71560=diff
==
--- trunk/reactos/dll/win32/mciavi32/mmoutput.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/mciavi32/mmoutput.c [iso-8859-1] Sun Jun  5 
19:29:11 2016
@@ -226,14 +226,16 @@
  alb->numAudioBlocks, mmck->cksize);
if (wma->lpWaveFormat) {
if (alb->numAudioBlocks >= alb->numAudioAllocated) {
-   alb->numAudioAllocated += 32;
-   if (!wma->lpAudioIndex)
-   wma->lpAudioIndex = HeapAlloc(GetProcessHeap(), 0,
- alb->numAudioAllocated * 
sizeof(struct MMIOPos));
-   else
-   wma->lpAudioIndex = HeapReAlloc(GetProcessHeap(), 0, 
wma->lpAudioIndex,
-   alb->numAudioAllocated * 
sizeof(struct MMIOPos));
-   if (!wma->lpAudioIndex) return FALSE;
+DWORD newsize = alb->numAudioAllocated + 32;
+struct MMIOPos* newindex;
+
+if (!wma->lpAudioIndex)
+newindex = HeapAlloc(GetProcessHeap(), 0, newsize * 
sizeof(struct MMIOPos));
+else
+newindex = HeapReAlloc(GetProcessHeap(), 0, 
wma->lpAudioIndex, newsize * sizeof(struct MMIOPos));
+if (!newindex) return FALSE;
+alb->numAudioAllocated = newsize;
+wma->lpAudioIndex = newindex;
}
wma->lpAudioIndex[alb->numAudioBlocks].dwOffset = 
mmck->dwDataOffset;
wma->lpAudioIndex[alb->numAudioBlocks].dwSize = mmck->cksize;

Modified: trunk/reactos/media/doc/README.WINE
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=71560=71559=71560=diff
==
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun  5 19:29:11 2016
@@ -92,7 +92,7 @@
 reactos/dll/win32/localui # Synced to WineStaging-1.9.4
 reactos/dll/win32/lz32# Synced to WineStaging-1.9.4
 reactos/dll/win32/mapi32  # Synced to WineStaging-1.9.4
-reactos/dll/win32/mciavi32# Synced to WineStaging-1.9.4
+reactos/dll/win32/mciavi32# Synced to WineStaging-1.9.11
 reactos/dll/win32/mcicda  # Synced to WineStaging-1.9.4
 reactos/dll/win32/mciqtz32# Synced to WineStaging-1.9.4
 reactos/dll/win32/mciseq  # Synced to WineStaging-1.9.4




[ros-diffs] [akhaldi] 71559: [JSPROXY] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:27:31 2016
New Revision: 71559

URL: http://svn.reactos.org/svn/reactos?rev=71559=rev
Log:
[JSPROXY] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/jsproxy/main.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/jsproxy/main.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jsproxy/main.c?rev=71559=71558=71559=diff
==
--- trunk/reactos/dll/win32/jsproxy/main.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/jsproxy/main.c  [iso-8859-1] Sun Jun  5 
19:27:31 2016
@@ -99,7 +99,7 @@
 return HeapFree( GetProcessHeap(), 0, mem );
 }
 
-static inline WCHAR *strdupAW( const char *src, DWORD len )
+static inline WCHAR *strdupAW( const char *src, int len )
 {
 WCHAR *dst = NULL;
 if (src)
@@ -188,14 +188,28 @@
 
 EnterCriticalSection( _jsproxy );
 
-if (global_script->text)
-{
-LeaveCriticalSection( _jsproxy );
-return FALSE;
-}
-if (buffer && buffer->dwStructSize == sizeof(*buffer) && 
buffer->lpszScriptBuffer &&
-(global_script->text = strdupAW( buffer->lpszScriptBuffer, 
buffer->dwScriptBufferSize ))) ret = TRUE;
-else if ((global_script->text = load_script( tmpfile ))) ret = TRUE;
+if (buffer && buffer->dwStructSize == sizeof(*buffer) && 
buffer->lpszScriptBuffer)
+{
+DWORD i, len = 0;
+for (i = 0; i < buffer->dwScriptBufferSize; i++)
+{
+if (!buffer->lpszScriptBuffer[i]) break;
+len++;
+}
+if (len == buffer->dwScriptBufferSize)
+{
+SetLastError( ERROR_INVALID_PARAMETER );
+LeaveCriticalSection( _jsproxy );
+return FALSE;
+}
+heap_free( global_script->text );
+if ((global_script->text = strdupAW( buffer->lpszScriptBuffer, len ))) 
ret = TRUE;
+}
+else
+{
+heap_free( global_script->text );
+if ((global_script->text = load_script( tmpfile ))) ret = TRUE;
+}
 
 LeaveCriticalSection( _jsproxy );
 return ret;
@@ -627,9 +641,18 @@
 
 EnterCriticalSection( _jsproxy );
 
-if (!global_script->text) goto done;
-if (!(urlW = strdupAW( url, len_url ))) goto done;
-if (hostname && !(hostnameW = strdupAW( hostname, len_hostname ))) goto 
done;
+if (!global_script->text)
+{
+SetLastError( ERROR_CAN_NOT_COMPLETE );
+goto done;
+}
+if (hostname && len_hostname < strlen( hostname ))
+{
+SetLastError( ERROR_INSUFFICIENT_BUFFER );
+goto done;
+}
+if (!(urlW = strdupAW( url, -1 ))) goto done;
+if (hostname && !(hostnameW = strdupAW( hostname, -1 ))) goto done;
 
 TRACE( "%s\n", debugstr_w(global_script->text) );
 ret = run_script( global_script->text, urlW, hostnameW, proxy, len_proxy );

Modified: trunk/reactos/media/doc/README.WINE
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=71559=71558=71559=diff
==
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun  5 19:27:31 2016
@@ -86,7 +86,7 @@
 reactos/dll/win32/itircl  # Synced to WineStaging-1.9.4
 reactos/dll/win32/itss# Synced to WineStaging-1.9.4
 reactos/dll/win32/jscript # Synced to WineStaging-1.9.11
-reactos/dll/win32/jsproxy # Synced to WineStaging-1.9.4
+reactos/dll/win32/jsproxy # Synced to WineStaging-1.9.11
 reactos/dll/win32/loadperf# Synced to WineStaging-1.9.4
 reactos/dll/win32/localspl# Synced to WineStaging-1.9.4
 reactos/dll/win32/localui # Synced to WineStaging-1.9.4




[ros-diffs] [akhaldi] 71558: [JSCRIPT_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:26:27 2016
New Revision: 71558

URL: http://svn.reactos.org/svn/reactos?rev=71558=rev
Log:
[JSCRIPT_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/rostests/winetests/jscript/api.js
trunk/rostests/winetests/jscript/lang.js
trunk/rostests/winetests/jscript/regexp.js

Modified: trunk/rostests/winetests/jscript/api.js
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/jscript/api.js?rev=71558=71557=71558=diff
==
--- trunk/rostests/winetests/jscript/api.js [iso-8859-1] (original)
+++ trunk/rostests/winetests/jscript/api.js [iso-8859-1] Sun Jun  5 
19:26:27 2016
@@ -2098,6 +2098,8 @@
 ok(Date.parse("Jan 20 2009 GMT") === 123240960, "Date.parse(\"Jan 20 2009 
GMT\") = " + Date.parse("Jan 20 2009 GMT"));
 ok(Date.parse("Jan 20 2009 UTC-0") === 123240960, "Date.parse(\"Jan 20 
2009 UTC-0\") = " + Date.parse("Jan 20 2009 UTC-0"));
 ok(Date.parse("Jan 20 2009 UTC+") === 123240960, "Date.parse(\"Jan 20 
2009 UTC+\") = " + Date.parse("Jan 20 2009 UTC+"));
+ok(Date.parse("Jan 20 2009 UTC-1") === 123241320, "Date.parse(\"Jan 20 
2009 UTC-1\") = " + Date.parse("Jan 20 2009 UTC-1"));
+ok(Date.parse("Jan 20 2009 UTC+1") === 123240600, "Date.parse(\"Jan 20 
2009 UTC+1\") = " + Date.parse("Jan 20 2009 UTC+1"));
 ok(Date.parse("Ju 13 79 UTC") === 30067200, "Date.parse(\"Ju 13 79 UTC\") 
= " + Date.parse("Ju 13 79 UTC"));
 ok(Date.parse("12Au91 UTC") === 68195520, "Date.parse(\"12Au91 UTC\") = " 
+ Date.parse("12Au91 UTC"));
 ok(Date.parse("7/02/17 UTC") === -165680640, "Date.parse(\"7/02/17 UTC\") 
= " + Date.parse("7/02/17 UTC"));
@@ -2108,6 +2110,10 @@
 ok(Date.parse("23/71/2000 11::32::UTC") === 101066232, 
"Date.parse(\"23/71/2000 11::32::UTC\") = " + Date.parse("23/71/2000 
11::32::UTC"));
 ok(Date.parse("1970/01/01") === Date.parse("01/01/1970"), 
"Date.parse(\"1970/01/01\") = " + Date.parse("1970/01/01"));
 ok(Date.parse("71/12/14") === Date.parse("12/14/1971"), 
"Date.parse(\"71/12/14\") = " + Date.parse("71/12/14"));
+ok(Date.parse("Tue, 22 Mar 2016 09:57:55 -0300") === Date.parse("Tue, 22 Mar 
2016 09:57:55 GMT-0300"),
+"Date.parse(\"Tue, 22 Mar 2016 09:57:55 -0300\") = " + 
Date.parse("Tue, 22 Mar 2016 09:57:55 -0300"));
+ok(Date.parse("Tue, 22 Mar 2016 09:57:55 +0400") === Date.parse("Tue, 22 Mar 
2016 09:57:55 UTC+0400"),
+"Date.parse(\"Tue, 22 Mar 2016 09:57:55 +0400\") = " + 
Date.parse("Tue, 22 Mar 2016 09:57:55 +0400"));
 
 ok(typeof(Math.PI) === "number", "typeof(Math.PI) = " + typeof(Math.PI));
 ok(Math.floor(Math.PI*100) === 314, "Math.PI = " + Math.PI);

Modified: trunk/rostests/winetests/jscript/lang.js
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/jscript/lang.js?rev=71558=71557=71558=diff
==
--- trunk/rostests/winetests/jscript/lang.js[iso-8859-1] (original)
+++ trunk/rostests/winetests/jscript/lang.js[iso-8859-1] Sun Jun  5 
19:26:27 2016
@@ -194,6 +194,27 @@
 testRecFunc(true);
 ok(testRecFunc.arguments === null, "testRecFunc.arguments = " + 
testRecFunc.arguments);
 
+function argumentsTest() {
+var save = arguments;
+with({arguments: 1}) {
+ok(arguments === 1, "arguments = " + arguments);
+(function() {
+ok(argumentsTest.arguments === save, "unexpected 
argumentsTest.arguments");
+})();
+}
+eval('ok(arguments === save, "unexpected arguments");');
+[1,2].sort(function() {
+ok(argumentsTest.arguments === save, "unexpected 
argumentsTest.arguments");
+return 1;
+});
+}
+
+argumentsTest();
+
+(function callAsExprTest() {
+ok(callAsExprTest.arguments === null, "callAsExprTest.arguments = " + 
callAsExprTest.arguments);
+})(1,2);
+
 tmp = (function() {1;})();
 ok(tmp === undefined, "tmp = " + tmp);
 tmp = eval("1;");
@@ -214,6 +235,58 @@
 
 tmp = (function(){ return testNoRes(), testRes();})();
 
+var f1, f2;
+
+ok(funcexpr() == 2, "funcexpr() = " + funcexpr());
+
+f1 = function funcexpr() { return 1; }
+ok(f1 != funcexpr, "f1 == funcexpr");
+ok(f1() === 1, "f1() = " + f1());
+
+f2 = function funcexpr() { return 2; }
+ok(f2 != funcexpr, "f2 != funcexpr");
+ok(f2() === 2, "f2() = " + f2());
+
+f1 = null;
+for(i = 0; i < 3; i++) {
+f2 = function funcexpr2() {};
+ok(f1 != f2, "f1 == f2");
+f1 = f2;
+}
+
+f1 = null;
+for(i = 0; i < 3; i++) {
+f2 = function() {};
+ok(f1 != f2, "f1 == f2");
+f1 = f2;
+}
+
+(function() {
+ok(infuncexpr() == 2, "infuncexpr() = " + infuncexpr());
+
+f1 = function infuncexpr() { return 1; }
+ok(f1 != funcexpr, "f1 == funcexpr");
+ok(f1() === 1, "f1() = " + f1());
+
+f2 = function infuncexpr() { return 2; }
+ok(f2 != funcexpr, "f2 != funcexpr");
+ok(f2() === 2, "f2() = " + f2());
+
+f1 = null;
+for(i = 0; i < 3; 

[ros-diffs] [akhaldi] 71557: [JSCRIPT] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:25:30 2016
New Revision: 71557

URL: http://svn.reactos.org/svn/reactos?rev=71557=rev
Log:
[JSCRIPT] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/jscript/compile.c
trunk/reactos/dll/win32/jscript/date.c
trunk/reactos/dll/win32/jscript/decode.c
trunk/reactos/dll/win32/jscript/dispex.c
trunk/reactos/dll/win32/jscript/engine.c
trunk/reactos/dll/win32/jscript/engine.h
trunk/reactos/dll/win32/jscript/function.c
trunk/reactos/dll/win32/jscript/global.c
trunk/reactos/dll/win32/jscript/jscript.c
trunk/reactos/dll/win32/jscript/jscript.h
trunk/reactos/dll/win32/jscript/jsregexp.c
trunk/reactos/dll/win32/jscript/lex.c
trunk/reactos/dll/win32/jscript/string.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/jscript/compile.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/compile.c?rev=71557=71556=71557=diff
==
--- trunk/reactos/dll/win32/jscript/compile.c   [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/jscript/compile.c   [iso-8859-1] Sun Jun  5 
19:25:30 2016
@@ -550,12 +550,20 @@
 arg_cnt++;
 }
 
-return push_instr_uint(ctx, OP_new, arg_cnt);
+hres = push_instr_uint(ctx, OP_new, arg_cnt);
+if(FAILED(hres))
+return hres;
+
+hres = push_instr_uint(ctx, OP_pop, arg_cnt+1);
+if(FAILED(hres))
+return hres;
+
+return push_instr(ctx, OP_push_ret) ? S_OK : E_OUTOFMEMORY;
 }
 
 static HRESULT compile_call_expression(compiler_ctx_t *ctx, call_expression_t 
*expr, BOOL emit_ret)
 {
-unsigned arg_cnt = 0;
+unsigned arg_cnt = 0, extra_args;
 argument_t *arg;
 unsigned instr;
 jsop_t op;
@@ -563,9 +571,11 @@
 
 if(is_memberid_expr(expr->expression->type)) {
 op = OP_call_member;
+extra_args = 2;
 hres = compile_memberid_expression(ctx, expr->expression, 0);
 }else {
 op = OP_call;
+extra_args = 1;
 hres = compile_expression(ctx, expr->expression, TRUE);
 }
 
@@ -585,7 +595,12 @@
 
 instr_ptr(ctx, instr)->u.arg[0].uint = arg_cnt;
 instr_ptr(ctx, instr)->u.arg[1].lng = emit_ret;
-return S_OK;
+
+hres = push_instr_uint(ctx, OP_pop, arg_cnt + extra_args);
+if(FAILED(hres))
+return hres;
+
+return !emit_ret || push_instr(ctx, OP_push_ret) ? S_OK : E_OUTOFMEMORY;
 }
 
 static HRESULT compile_delete_expression(compiler_ctx_t *ctx, 
unary_expression_t *expr)
@@ -849,17 +864,11 @@
 return S_OK;
 }
 
-static HRESULT compile_function_expression(compiler_ctx_t *ctx, 
function_expression_t *expr)
-{
+static HRESULT compile_function_expression(compiler_ctx_t *ctx, 
function_expression_t *expr, BOOL emit_ret)
+{
+unsigned func_id = ctx->func->func_cnt++;
 ctx->func_tail = ctx->func_tail ? (ctx->func_tail->next = expr) : 
(ctx->func_head = expr);
-
-/* FIXME: not exactly right */
-if(expr->identifier && !expr->event_target) {
-ctx->func->func_cnt++;
-return push_instr_bstr(ctx, OP_ident, expr->identifier);
-}
-
-return push_instr_uint(ctx, OP_func, ctx->func->func_cnt++);
+return emit_ret ? push_instr_uint(ctx, OP_func, func_id) : S_OK;
 }
 
 static HRESULT compile_expression(compiler_ctx_t *ctx, expression_t *expr, 
BOOL emit_ret)
@@ -944,8 +953,7 @@
 hres = compile_binary_expression(ctx, (binary_expression_t*)expr, 
OP_eq2);
 break;
 case EXPR_FUNC:
-hres = compile_function_expression(ctx, (function_expression_t*)expr);
-break;
+return compile_function_expression(ctx, (function_expression_t*)expr, 
emit_ret);
 case EXPR_GREATER:
 hres = compile_binary_expression(ctx, (binary_expression_t*)expr, 
OP_gt);
 break;
@@ -1471,7 +1479,7 @@
 if(FAILED(hres))
 return hres;
 
-return push_instr(ctx, OP_ret) ? S_OK : E_OUTOFMEMORY;
+return push_instr_uint(ctx, OP_ret, !stat->expr);
 }
 
 /* ECMA-262 3rd Edition12.10 */
@@ -1849,8 +1857,9 @@
 
 resolve_labels(ctx, off);
 
-if(!push_instr(ctx, OP_ret))
-return E_OUTOFMEMORY;
+hres = push_instr_uint(ctx, OP_ret, !from_eval);
+if(FAILED(hres))
+return hres;
 
 if(TRACE_ON(jscript_disas))
 dump_code(ctx, off);

Modified: trunk/reactos/dll/win32/jscript/date.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/date.c?rev=71557=71556=71557=diff
==
--- trunk/reactos/dll/win32/jscript/date.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/jscript/date.c  [iso-8859-1] Sun Jun  5 
19:25:30 2016
@@ -2163,6 +2163,28 @@
 year = tmp;
 }
 }
+else if(parse[i]=='+' || parse[i]=='-') {
+/* Timezone offset */
+BOOL positive = TRUE;
+
+if(set_offset 

[ros-diffs] [akhaldi] 71556: [INETCOMM_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:24:01 2016
New Revision: 71556

URL: http://svn.reactos.org/svn/reactos?rev=71556=rev
Log:
[INETCOMM_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/rostests/winetests/inetcomm/mimeole.c

Modified: trunk/rostests/winetests/inetcomm/mimeole.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/inetcomm/mimeole.c?rev=71556=71555=71556=diff
==
--- trunk/rostests/winetests/inetcomm/mimeole.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/inetcomm/mimeole.c [iso-8859-1] Sun Jun  5 
19:24:01 2016
@@ -332,6 +332,158 @@
 IStream_Release(stream);
 }
 
+static void test_MessageSetProp(void)
+{
+static const char topic[] = "wine topic";
+HRESULT hr;
+IMimeMessage *msg;
+IMimeBody *body;
+PROPVARIANT prop;
+
+hr = MimeOleCreateMessage(NULL, );
+ok(hr == S_OK, "ret %08x\n", hr);
+
+PropVariantInit();
+
+hr = IMimeMessage_BindToObject(msg, HBODY_ROOT, _IMimeBody, 
(void**));
+ok(hr == S_OK, "ret %08x\n", hr);
+
+hr = IMimeBody_SetProp(body, NULL, 0, );
+ok(hr == E_INVALIDARG, "ret %08x\n", hr);
+
+hr = IMimeBody_SetProp(body, "Thread-Topic", 0, NULL);
+ok(hr == E_INVALIDARG, "ret %08x\n", hr);
+
+prop.vt = VT_LPSTR;
+prop.u.pszVal = CoTaskMemAlloc(strlen(topic)+1);
+strcpy(prop.u.pszVal, topic);
+hr = IMimeBody_SetProp(body, "Thread-Topic", 0, );
+ok(hr == S_OK, "ret %08x\n", hr);
+PropVariantClear();
+
+hr = IMimeBody_GetProp(body, NULL, 0, );
+ok(hr == E_INVALIDARG, "ret %08x\n", hr);
+
+hr = IMimeBody_GetProp(body, "Thread-Topic", 0, NULL);
+ok(hr == E_INVALIDARG, "ret %08x\n", hr);
+
+hr = IMimeBody_GetProp(body, "Wine-Topic", 0, );
+ok(hr == MIME_E_NOT_FOUND, "ret %08x\n", hr);
+
+hr = IMimeBody_GetProp(body, "Thread-Topic", 0, );
+ok(hr == S_OK, "ret %08x\n", hr);
+if(hr == S_OK)
+{
+ok(prop.vt == VT_LPSTR, "type %d\n", prop.vt);
+ok(!strcmp(prop.u.pszVal, topic), "got  %s\n", prop.u.pszVal);
+PropVariantClear();
+}
+
+IMimeBody_Release(body);
+IMimeMessage_Release(msg);
+}
+
+static void test_MessageOptions(void)
+{
+static const char string[] = "X";
+static const char zero[] =   "0";
+HRESULT hr;
+IMimeMessage *msg;
+PROPVARIANT prop;
+
+hr = MimeOleCreateMessage(NULL, );
+ok(hr == S_OK, "ret %08x\n", hr);
+
+PropVariantInit();
+
+prop.vt = VT_BOOL;
+prop.u.boolVal = TRUE;
+hr = IMimeMessage_SetOption(msg, OID_HIDE_TNEF_ATTACHMENTS, );
+ok(hr == S_OK, "ret %08x\n", hr);
+PropVariantClear();
+
+hr = IMimeMessage_GetOption(msg, OID_HIDE_TNEF_ATTACHMENTS, );
+todo_wine ok(hr == S_OK, "ret %08x\n", hr);
+todo_wine ok(prop.vt == VT_BOOL, "vt %08x\n", prop.vt);
+todo_wine ok(prop.u.boolVal == TRUE, "Hide Attachments got %d\n", 
prop.u.boolVal);
+PropVariantClear();
+
+prop.vt = VT_LPSTR;
+prop.u.pszVal = CoTaskMemAlloc(strlen(string)+1);
+strcpy(prop.u.pszVal, string);
+hr = IMimeMessage_SetOption(msg, OID_HIDE_TNEF_ATTACHMENTS, );
+ok(hr == S_OK, "ret %08x\n", hr);
+PropVariantClear();
+
+hr = IMimeMessage_GetOption(msg, OID_HIDE_TNEF_ATTACHMENTS, );
+todo_wine ok(hr == S_OK, "ret %08x\n", hr);
+todo_wine ok(prop.vt == VT_BOOL, "vt %08x\n", prop.vt);
+todo_wine ok(prop.u.boolVal == TRUE, "Hide Attachments got %d\n", 
prop.u.boolVal);
+PropVariantClear();
+
+/* Invalid property type doesn't change the value */
+prop.vt = VT_LPSTR;
+prop.u.pszVal = CoTaskMemAlloc(strlen(zero)+1);
+strcpy(prop.u.pszVal, zero);
+hr = IMimeMessage_SetOption(msg, OID_HIDE_TNEF_ATTACHMENTS, );
+ok(hr == S_OK, "ret %08x\n", hr);
+PropVariantClear();
+
+hr = IMimeMessage_GetOption(msg, OID_HIDE_TNEF_ATTACHMENTS, );
+todo_wine ok(hr == S_OK, "ret %08x\n", hr);
+todo_wine ok(prop.vt == VT_BOOL, "vt %08x\n", prop.vt);
+todo_wine ok(prop.u.boolVal == TRUE, "Hide Attachments got %d\n", 
prop.u.boolVal);
+PropVariantClear();
+
+/* Invalid OID */
+prop.vt = VT_BOOL;
+prop.u.boolVal = TRUE;
+hr = IMimeMessage_SetOption(msg, 0xff0a, );
+ok(hr == MIME_E_INVALID_OPTION_ID, "ret %08x\n", hr);
+PropVariantClear();
+
+/* Out of range before type. */
+prop.vt = VT_I4;
+prop.u.lVal = 1;
+hr = IMimeMessage_SetOption(msg, 0xff0a, );
+ok(hr == MIME_E_INVALID_OPTION_ID, "ret %08x\n", hr);
+PropVariantClear();
+
+IMimeMessage_Release(msg);
+}
+
+static void test_BindToObject(void)
+{
+HRESULT hr;
+IMimeMessage *msg;
+IMimeBody *body;
+ULONG count;
+
+hr = MimeOleCreateMessage(NULL, );
+ok(hr == S_OK, "ret %08x\n", hr);
+
+hr = IMimeMessage_CountBodies(msg, HBODY_ROOT, TRUE, );
+ok(hr == S_OK, "ret %08x\n", hr);
+ok(count == 1, "got %d\n", count);
+
+hr = IMimeMessage_BindToObject(msg, 

[ros-diffs] [akhaldi] 71555: [INETCOMM] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:23:27 2016
New Revision: 71555

URL: http://svn.reactos.org/svn/reactos?rev=71555=rev
Log:
[INETCOMM] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/inetcomm/inetcomm.spec
trunk/reactos/dll/win32/inetcomm/mimeole.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/inetcomm/inetcomm.spec
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/inetcomm.spec?rev=71555=71554=71555=diff
==
--- trunk/reactos/dll/win32/inetcomm/inetcomm.spec  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/inetcomm/inetcomm.spec  [iso-8859-1] Sun Jun  5 
19:23:27 2016
@@ -42,7 +42,7 @@
 @ stub MimeEditGetBackgroundImageUrl
 @ stub MimeEditIsSafeToRun
 @ stub MimeEditViewSource
-@ stub MimeGetAddressFormatW
+@ stdcall MimeGetAddressFormatW(ptr ptr long long ptr)
 @ stub MimeOleAlgNameFromSMimeCap
 @ stub MimeOleAlgStrengthFromSMimeCap
 @ stub MimeOleClearDirtyTree
@@ -79,7 +79,7 @@
 @ stdcall MimeOleGetInternat(ptr)
 @ stub MimeOleGetPropA
 @ stub MimeOleGetPropW
-@ stub MimeOleGetPropertySchema
+@ stdcall MimeOleGetPropertySchema(ptr)
 @ stub MimeOleGetRelatedSection
 @ stub MimeOleInetDateToFileTime
 @ stub MimeOleObjectFromMoniker

Modified: trunk/reactos/dll/win32/inetcomm/mimeole.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/inetcomm/mimeole.c?rev=71555=71554=71555=diff
==
--- trunk/reactos/dll/win32/inetcomm/mimeole.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/inetcomm/mimeole.c  [iso-8859-1] Sun Jun  5 
19:23:27 2016
@@ -97,6 +97,17 @@
 return CONTAINING_RECORD(iface, MimeBody, IMimeBody_iface);
 }
 
+typedef struct propschema
+{
+IMimePropertySchema IMimePropertySchema_iface;
+LONG ref;
+} propschema;
+
+static inline propschema *impl_from_IMimePropertySchema(IMimePropertySchema 
*iface)
+{
+return CONTAINING_RECORD(iface, propschema, IMimePropertySchema_iface);
+}
+
 static LPSTR strdupA(LPCSTR str)
 {
 char *ret;
@@ -185,7 +196,7 @@
 
 for(prop = default_props; prop->name; prop++)
 {
-if(!strcasecmp(*ptr, prop->name))
+if(!lstrcmpiA(*ptr, prop->name))
 {
 TRACE("%s: found match with default property id %d\n", *ptr, 
prop->id);
 break;
@@ -197,7 +208,7 @@
 property_list_entry_t *prop_entry;
 LIST_FOR_EACH_ENTRY(prop_entry, >new_props, 
property_list_entry_t, entry)
 {
-if(!strcasecmp(*ptr, prop_entry->prop.name))
+if(!lstrcmpiA(*ptr, prop_entry->prop.name))
 {
 TRACE("%s: found match with already added new property id 
%d\n", *ptr, prop_entry->prop.id);
 prop = _entry->prop;
@@ -467,7 +478,7 @@
 
 LIST_FOR_EACH_ENTRY(header, >headers, header_t, entry)
 {
-if(!strcasecmp(name, header->prop->name))
+if(!lstrcmpiA(name, header->prop->name))
 {
 *prop = header;
 return S_OK;
@@ -541,7 +552,8 @@
  IMimeBody* iface,
  CLSID* pClassID)
 {
-FIXME("stub\n");
+MimeBody *This = impl_from_IMimeBody(iface);
+FIXME("(%p)->(%p) stub\n", This, pClassID);
 return E_NOTIMPL;
 }
 
@@ -549,20 +561,22 @@
 static HRESULT WINAPI MimeBody_IsDirty(
   IMimeBody* iface)
 {
-FIXME("stub\n");
+MimeBody *This = impl_from_IMimeBody(iface);
+FIXME("(%p)->() stub\n", This);
 return E_NOTIMPL;
 }
 
 static HRESULT WINAPI MimeBody_Load(IMimeBody *iface, IStream *pStm)
 {
 MimeBody *This = impl_from_IMimeBody(iface);
-TRACE("(%p)->(%p)\n", iface, pStm);
+TRACE("(%p)->(%p)\n", This, pStm);
 return parse_headers(This, pStm);
 }
 
 static HRESULT WINAPI MimeBody_Save(IMimeBody *iface, IStream *pStm, BOOL 
fClearDirty)
 {
-FIXME("stub\n");
+MimeBody *This = impl_from_IMimeBody(iface);
+FIXME("(%p)->(%p, %d)\n", This, pStm, fClearDirty);
 return E_NOTIMPL;
 }
 
@@ -570,14 +584,16 @@
  IMimeBody* iface,
  ULARGE_INTEGER* pcbSize)
 {
-FIXME("stub\n");
+MimeBody *This = impl_from_IMimeBody(iface);
+FIXME("(%p)->(%p) stub\n", This, pcbSize);
 return E_NOTIMPL;
 }
 
 static HRESULT WINAPI MimeBody_InitNew(
   IMimeBody* iface)
 {
-TRACE("%p->()\n", iface);
+MimeBody *This = impl_from_IMimeBody(iface);
+TRACE("(%p)->()\n", This);
 return S_OK;
 }
 
@@ -586,7 +602,8 @@
   LPCSTR pszName,
   LPMIMEPROPINFO pInfo)
 {
-FIXME("stub\n");
+MimeBody *This = impl_from_IMimeBody(iface);
+FIXME("(%p)->(%s, %p) stub\n", This, debugstr_a(pszName), pInfo);
 return E_NOTIMPL;
 }
 
@@ -595,7 +612,8 @@
  

[ros-diffs] [akhaldi] 71554: [PSDK] Update mimeole.idl. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:22:51 2016
New Revision: 71554

URL: http://svn.reactos.org/svn/reactos?rev=71554=rev
Log:
[PSDK] Update mimeole.idl. CORE-11368

Modified:
trunk/reactos/sdk/include/psdk/mimeole.idl

Modified: trunk/reactos/sdk/include/psdk/mimeole.idl
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/mimeole.idl?rev=71554=71553=71554=diff
==
--- trunk/reactos/sdk/include/psdk/mimeole.idl  [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/psdk/mimeole.idl  [iso-8859-1] Sun Jun  5 
19:22:51 2016
@@ -48,6 +48,23 @@
 cpp_quote("#define MIME_E_CHARSET_TRANSLATE  0x800cce0a")
 cpp_quote("#define MIME_E_NOT_INITIALIZED0x800cce0b")
 
+cpp_quote("#define MIME_E_INVALID_OPTION_VALUE   0x800cce1f")
+cpp_quote("#define MIME_E_INVALID_OPTION_ID  0x800cce20")
+cpp_quote("#define MIME_E_INVALID_HEADER_NAME0x800cce21")
+cpp_quote("#define MIME_E_NOT_BOUND  0x800cce22")
+cpp_quote("#define MIME_E_MAX_SIZE_TOO_SMALL 0x800cce23")
+cpp_quote("#define MIME_E_MULTIPART_HAS_CHILDREN 0x800cce25")
+cpp_quote("#define MIME_E_INVALID_PROP_FLAGS 0x800cce26")
+cpp_quote("#define MIME_E_INVALID_ADDRESS_TYPE   0x800cce27")
+cpp_quote("#define MIME_E_INVALID_OBJECT_IID 0x800cce28")
+cpp_quote("#define MIME_E_MLANG_DLL_NOT_FOUND0x800cce29")
+cpp_quote("#define MIME_E_ROOT_NOT_EMPTY 0x800cce2a")
+cpp_quote("#define MIME_E_MLANG_BAD_DLL  0x800cce2b")
+cpp_quote("#define MIME_E_REG_OPEN_KEY   0x800cce2c")
+cpp_quote("#define MIME_E_INVALID_INET_DATE  0x800cce2d")
+cpp_quote("#define MIME_E_INVALID_BODYTYPE   0x800cce2e")
+cpp_quote("#define MIME_E_INVALID_DELETE_TYPE0x800cce2f")
+cpp_quote("#define MIME_E_OPTION_HAS_NO_VALUE0x800cce30")
 cpp_quote("#define MIME_E_INVALID_CHARSET_TYPE   0x800cce31")
 
 cpp_quote("#define MIME_E_INVALID_TEXT_TYPE  0x800cce38")
@@ -84,21 +101,85 @@
 cpp_quote("PID_HDR_FOLLOWUPTO = 27,")
 cpp_quote("PID_HDR_EXPIRES= 28,")
 cpp_quote("PID_HDR_CC = 29,")
-
+cpp_quote("PID_HDR_CONTROL= 30,")
+cpp_quote("PID_HDR_DISTRIB= 31,")
+cpp_quote("PID_HDR_KEYWORDS   = 32,")
+cpp_quote("PID_HDR_SUMMARY= 33,")
+cpp_quote("PID_HDR_APPROVED   = 34,")
+cpp_quote("PID_HDR_LINES  = 35,")
+cpp_quote("PID_HDR_XREF   = 36,")
+cpp_quote("PID_HDR_ORG= 37,")
+cpp_quote("PID_HDR_XNEWSRDR   = 38,")
+cpp_quote("PID_HDR_XPRI   = 39,")
+cpp_quote("PID_HDR_XMSPRI = 40,")
+cpp_quote("PID_PAR_FILENAME   = 41,")
+cpp_quote("PID_PAR_BOUNDARY   = 42,")
+cpp_quote("PID_PAR_CHARSET= 43,")
+cpp_quote("PID_PAR_NAME   = 44,")
+cpp_quote("PID_ATT_FILENAME   = 45,")
+cpp_quote("PID_ATT_GENFNAME   = 46,")
+cpp_quote("PID_ATT_PRITYPE= 47,")
+cpp_quote("PID_ATT_SUBTYPE= 48,")
+cpp_quote("PID_ATT_NORMSUBJ   = 49,")
+cpp_quote("PID_ATT_ILLEGAL= 50,")
+cpp_quote("PID_ATT_RENDERED   = 51,")
+cpp_quote("PID_ATT_SENTTIME   = 52,")
+cpp_quote("PID_ATT_RECVTIME   = 53,")
+cpp_quote("PID_ATT_PRIORITY   = 54,")
+cpp_quote("PID_HDR_COMMENT= 55,")
+cpp_quote("PID_HDR_ENCODING   = 56,")
+cpp_quote("PID_HDR_ENCRYPTED  = 57,")
+cpp_quote("PID_HDR_OFFSETS= 58,")
+cpp_quote("PID_HDR_XUNSENT= 59,")
+cpp_quote("PID_HDR_ARTICLEID  = 60,")
 cpp_quote("PID_HDR_SENDER = 61,")
-
-cpp_quote("PID_HDR_INREPLYTO  = 77,")
+cpp_quote("PID_ATT_SERVER = 62,")
+cpp_quote("PID_ATT_ACCOUNT= 63,")
+cpp_quote("PID_ATT_UIDL   = 64,")
+cpp_quote("PID_ATT_STOREMSGID = 65,")
+cpp_quote("PID_ATT_USERNAME   = 66,")
+cpp_quote("PID_ATT_FORWARDTO  = 67,")
+cpp_quote("PID_ATT_STOREFOLDERID = 68,")
+cpp_quote("PID_ATT_GHOSTED   = 69,")
+cpp_quote("PID_ATT_UNCACHEDSIZE  = 70,")
+cpp_quote("PID_ATT_COMBINED  = 71,")
+cpp_quote("PID_ATT_AUTOINLINED   = 72,")
+cpp_quote("PID_HDR_DISP_NOTIFICATION_TO = 73,")
+cpp_quote("PID_PAR_REPLYTYPE = 74,")
+cpp_quote("PID_PAR_FORMAT= 75,")
+cpp_quote("PID_ATT_FORMAT= 76,")
+cpp_quote("PID_HDR_INREPLYTO = 77,")
+cpp_quote("PID_ATT_ACCOUNTNAME   = 78,")
+cpp_quote("PID_LAST  = 79,")
 cpp_quote("} MIMEPROPID;")
 
+cpp_quote("#define TYPEDID_ID(_typedid)  (((ULONG)(_typedid))>>16)")
 cpp_quote("#define TYPEDID_MASK  ((ULONG)0x)")
 cpp_quote("#define TYPEDID_TYPE(t)   ((VARTYPE)((t) & 
TYPEDID_MASK))")
 
+cpp_quote("#define OID_ALLOW_8BIT_HEADER (0x0001 | VT_BOOL)")
+cpp_quote("#define OID_CBMAX_HEADER_LINE (0x0002 | VT_UI4)")
+cpp_quote("#define OID_SAVE_FORMAT   (0x0003 | VT_UI4)")
+cpp_quote("#define OID_WRAP_BODY_TEXT(0x0004 | VT_BOOL)")
+cpp_quote("#define OID_CBMAX_BODY_LINE   (0x0005 | VT_UI4)")

[ros-diffs] [akhaldi] 71553: [IMAADP32.ACM] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:20:32 2016
New Revision: 71553

URL: http://svn.reactos.org/svn/reactos?rev=71553=rev
Log:
[IMAADP32.ACM] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/imaadp32.acm/imaadp32.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/imaadp32.acm/imaadp32.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/imaadp32.acm/imaadp32.c?rev=71553=71552=71553=diff
==
--- trunk/reactos/dll/win32/imaadp32.acm/imaadp32.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/imaadp32.acm/imaadp32.c [iso-8859-1] Sun Jun  5 
19:20:32 2016
@@ -179,6 +179,25 @@
 {
 dst[0] = LOBYTE(s);
 dst[1] = HIBYTE(s);
+}
+
+/***
+ *   W8
+ *
+ * Write a 8 bit sample
+ */
+static inline void W8(unsigned char* dst, short s)
+{
+dst[0] = (unsigned char)((s + 32768) >> 8);
+}
+
+
+static inline void W8_16(unsigned char* dst, short s, int bytes)
+{
+if(bytes == 1)
+W8(dst, s);
+else
+W16(dst, s);
 }
 
 /* IMA (or DVI) APDCM codec routines */
@@ -341,43 +360,43 @@
 }
 }
 
-static void cvtMMima16K(PACMDRVSTREAMINSTANCE adsi,
- const unsigned char* src, LPDWORD nsrc,
- unsigned char* dst, LPDWORD ndst)
-{
-intsample;
-intstepIndex;
-intnsamp_blk = 
((LPIMAADPCMWAVEFORMAT)adsi->pwfxSrc)->wSamplesPerBlock;
-intnsamp;
+static void cvtMMimaK(PACMDRVSTREAMINSTANCE adsi,
+const unsigned char* src, LPDWORD nsrc,
+unsigned char* dst, LPDWORD ndst)
+{
+int sample;
+int stepIndex;
+int nsamp_blk = ((LPIMAADPCMWAVEFORMAT)adsi->pwfxSrc)->wSamplesPerBlock;
+int nsamp;
+int bytesPerSample = adsi->pwfxDst->wBitsPerSample / 8;
 /* compute the number of entire blocks we can decode...
  * it's the min of the number of entire blocks in source buffer and the 
number
  * of entire blocks in destination buffer
  */
-DWORD  nblock = min(*nsrc / adsi->pwfxSrc->nBlockAlign,
- *ndst / (nsamp_blk * 2));
+DWORD nblock = min(*nsrc / adsi->pwfxSrc->nBlockAlign, *ndst / (nsamp_blk 
* bytesPerSample));
 
 *nsrc = nblock * adsi->pwfxSrc->nBlockAlign;
-*ndst = nblock * nsamp_blk * 2;
+*ndst = nblock * nsamp_blk * bytesPerSample;
 
 nsamp_blk--; /* remove the sample in block header */
 for (; nblock > 0; nblock--)
 {
-const unsigned char*in_src = src;
-
-   /* handle header first */
-   sample = R16(src);
-   stepIndex = (unsigned)*(src + 2);
+const unsigned char* in_src = src;
+
+/* handle header first */
+sample = R16(src);
+stepIndex = (unsigned)*(src + 2);
 clamp_step_index();
-   src += 4;
-   W16(dst, sample);   dst += 2;
-
-   for (nsamp = nsamp_blk; nsamp > 0; nsamp -= 2)
+src += 4;
+W8_16(dst, sample, bytesPerSample); dst += bytesPerSample;
+
+for (nsamp = nsamp_blk; nsamp > 0; nsamp -= 2)
 {
 process_nibble(*src, , );
-   W16(dst, sample); dst += 2;
+W8_16(dst, sample, bytesPerSample); dst += bytesPerSample;
 process_nibble(*src++ >> 4, , );
-   W16(dst, sample); dst += 2;
-   }
+W8_16(dst, sample, bytesPerSample); dst += bytesPerSample;
+}
 /* we have now to realign the source pointer on block */
 src = in_src + adsi->pwfxSrc->nBlockAlign;
 }
@@ -735,13 +754,14 @@
 else if (adsi->pwfxSrc->wFormatTag == WAVE_FORMAT_IMA_ADPCM &&
  adsi->pwfxDst->wFormatTag == WAVE_FORMAT_PCM)
 {
-   /* resampling or mono <=> stereo not available
+/* resampling or mono <=> stereo not available
  * ADPCM algo only define 16 bit per sample output
+ * (The API seems to still allow 8 bit per sample output)
  */
-   if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec ||
-   adsi->pwfxSrc->nChannels != adsi->pwfxDst->nChannels ||
-adsi->pwfxDst->wBitsPerSample != 16)
-   goto theEnd;
+if (adsi->pwfxSrc->nSamplesPerSec != adsi->pwfxDst->nSamplesPerSec ||
+adsi->pwfxSrc->nChannels != adsi->pwfxDst->nChannels ||
+(adsi->pwfxDst->wBitsPerSample != 16 && 
adsi->pwfxDst->wBitsPerSample != 8))
+goto theEnd;
 
 nspb = ((LPIMAADPCMWAVEFORMAT)adsi->pwfxSrc)->wSamplesPerBlock;
 TRACE("spb=%u\n", nspb);
@@ -754,11 +774,16 @@
 if nspb - 1) / 2) + 4) * adsi->pwfxSrc->nChannels < 
adsi->pwfxSrc->nBlockAlign)
 goto theEnd;
 
-   /* adpcm decoding... */
-   if (adsi->pwfxDst->wBitsPerSample == 16 && adsi->pwfxDst->nChannels == 
2)
-   

[ros-diffs] [akhaldi] 71551: [IEFRAME] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:18:20 2016
New Revision: 71551

URL: http://svn.reactos.org/svn/reactos?rev=71551=rev
Log:
[IEFRAME] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/ieframe/client.c
trunk/reactos/dll/win32/ieframe/ieframe.h
trunk/reactos/dll/win32/ieframe/intshcut.c
trunk/reactos/dll/win32/ieframe/navigate.c
trunk/reactos/dll/win32/ieframe/oleobject.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/ieframe/client.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/client.c?rev=71551=71550=71551=diff
==
--- trunk/reactos/dll/win32/ieframe/client.c[iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ieframe/client.c[iso-8859-1] Sun Jun  5 
19:18:20 2016
@@ -381,8 +381,10 @@
 if(FAILED(hres))
 return hres;
 
-IOleDocument_CreateView(oledoc, (IOleInPlaceSite*) 
>IOleInPlaceSiteEx_iface, NULL, 0, >view);
+hres = IOleDocument_CreateView(oledoc, (IOleInPlaceSite*) 
>IOleInPlaceSiteEx_iface, NULL, 0, >view);
 IOleDocument_Release(oledoc);
+if(FAILED(hres))
+return hres;
 
 GetClientRect(This->hwnd, );
 IOleDocumentView_SetRect(This->view, );
@@ -657,6 +659,11 @@
 return IWebBrowser2_QueryInterface(This->wb, riid, ppv);
 }
 
+if(IsEqualGUID(_ITargetFrame, guidService)) {
+TRACE("(%p)->(IID_ITargetFrame %s %p)\n", This, debugstr_guid(riid), 
ppv);
+return IWebBrowser2_QueryInterface(This->wb, riid, ppv);
+}
+
 if(IsEqualGUID(_IWebBrowserApp, guidService)) {
 TRACE("IWebBrowserApp service\n");
 return IWebBrowser2_QueryInterface(This->wb, riid, ppv);

Modified: trunk/reactos/dll/win32/ieframe/ieframe.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/ieframe.h?rev=71551=71550=71551=diff
==
--- trunk/reactos/dll/win32/ieframe/ieframe.h   [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ieframe/ieframe.h   [iso-8859-1] Sun Jun  5 
19:18:20 2016
@@ -72,6 +72,7 @@
 
 typedef struct {
 IHlinkFrameIHlinkFrame_iface;
+ITargetFrame   ITargetFrame_iface;
 ITargetFrame2  ITargetFrame2_iface;
 ITargetFramePriv2 ITargetFramePriv2_iface;
 IWebBrowserPriv2IE9 IWebBrowserPriv2IE9_iface;
@@ -206,6 +207,7 @@
 INT version;
 
 IOleClientSite *client;
+IOleClientSite *client_closed;
 IOleContainer *container;
 IOleInPlaceSiteEx *inplace;
 

Modified: trunk/reactos/dll/win32/ieframe/intshcut.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ieframe/intshcut.c?rev=71551=71550=71551=diff
==
--- trunk/reactos/dll/win32/ieframe/intshcut.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/ieframe/intshcut.c  [iso-8859-1] Sun Jun  5 
19:18:20 2016
@@ -404,135 +404,119 @@
 return This->isDirty ? S_OK : S_FALSE;
 }
 
-/* A helper function:  Allocate and fill rString.  Return number of bytes 
read. */
-static DWORD get_profile_string(LPCWSTR lpAppName, LPCWSTR lpKeyName,
+/* Returns allocated profile string and a standard return code. */
+static HRESULT get_profile_string(LPCWSTR lpAppName, LPCWSTR lpKeyName,
 LPCWSTR lpFileName, WCHAR **rString )
 {
 DWORD r = 0;
 DWORD len = 128;
 WCHAR *buffer;
 
+*rString = NULL;
 buffer = CoTaskMemAlloc(len * sizeof(*buffer));
-if (buffer != NULL)
-{
+if (!buffer)
+return E_OUTOFMEMORY;
+
+r = GetPrivateProfileStringW(lpAppName, lpKeyName, NULL, buffer, len, 
lpFileName);
+while (r == len-1)
+{
+WCHAR *realloc_buf;
+
+len *= 2;
+realloc_buf = CoTaskMemRealloc(buffer, len * sizeof(*buffer));
+if (realloc_buf == NULL)
+{
+CoTaskMemFree(buffer);
+return E_OUTOFMEMORY;
+}
+buffer = realloc_buf;
+
 r = GetPrivateProfileStringW(lpAppName, lpKeyName, NULL, buffer, len, 
lpFileName);
-while (r == len-1)
-{
-WCHAR *realloc_buf;
-
-len *= 2;
-realloc_buf = CoTaskMemRealloc(buffer, len * sizeof(*buffer));
-if (realloc_buf == NULL)
-{
-CoTaskMemFree(buffer);
-*rString = NULL;
-return 0;
-}
-buffer = realloc_buf;
-
-r = GetPrivateProfileStringW(lpAppName, lpKeyName, NULL, buffer, 
len, lpFileName);
-}
 }
 
 *rString = buffer;
-return r;
+return r ? S_OK : E_FAIL;
 }
 
 static HRESULT WINAPI PersistFile_Load(IPersistFile *pFile, LPCOLESTR 
pszFileName, DWORD dwMode)
 {
-WCHAR str_header[] = 
{'I','n','t','e','r','n','e','t','S','h','o','r','t','c','u','t',0};
-WCHAR str_URL[] = {'U','R','L',0};
-WCHAR str_iconfile[] = 

[ros-diffs] [akhaldi] 71550: [PSDK] Update htiface.idl and htiframe.idl. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:17:37 2016
New Revision: 71550

URL: http://svn.reactos.org/svn/reactos?rev=71550=rev
Log:
[PSDK] Update htiface.idl and htiframe.idl. CORE-11368

Modified:
trunk/reactos/sdk/include/psdk/htiface.idl
trunk/reactos/sdk/include/psdk/htiframe.idl

Modified: trunk/reactos/sdk/include/psdk/htiface.idl
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/htiface.idl?rev=71550=71549=71550=diff
==
--- trunk/reactos/sdk/include/psdk/htiface.idl  [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/psdk/htiface.idl  [iso-8859-1] Sun Jun  5 
19:17:37 2016
@@ -65,6 +65,24 @@
 
 HRESULT SetFrameSrc([in] LPCWSTR pszFrameSrc);
 HRESULT GetFrameSrc([out] LPWSTR *ppszFrameSrc);
+HRESULT GetFramesContainer([out] IOleContainer **ppContainer);
+HRESULT SetFrameOptions([in] DWORD dwFlags);
+HRESULT GetFrameOptions([out] DWORD *pdwFlags);
+
+HRESULT SetFrameMargins(
+[in] DWORD dwWidth,
+[in] DWORD dwHeight);
+
+HRESULT GetFrameMargins(
+[out] DWORD *pdwWidth,
+[out] DWORD *pdwHeight);
+
+HRESULT RemoteNavigate(
+[in] ULONG cLength,
+[in, size_is(cLength)] ULONG *pulData);
+
+HRESULT OnChildFrameActivate([in] IUnknown *pUnkChildFrame);
+HRESULT OnChildFrameDeactivate([in] IUnknown *pUnkChildFrame);
 }
 
 /*

Modified: trunk/reactos/sdk/include/psdk/htiframe.idl
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/htiframe.idl?rev=71550=71549=71550=diff
==
--- trunk/reactos/sdk/include/psdk/htiframe.idl [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/psdk/htiframe.idl [iso-8859-1] Sun Jun  5 
19:17:37 2016
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006 Jacek Caban for CodeWeavers
+ * Copyright 2006,2011 Jacek Caban for CodeWeavers
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public




[ros-diffs] [akhaldi] 71549: [ICCVID] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:11:42 2016
New Revision: 71549

URL: http://svn.reactos.org/svn/reactos?rev=71549=rev
Log:
[ICCVID] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/iccvid/iccvid.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/iccvid/iccvid.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/iccvid/iccvid.c?rev=71549=71548=71549=diff
==
--- trunk/reactos/dll/win32/iccvid/iccvid.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/iccvid/iccvid.c [iso-8859-1] Sun Jun  5 
19:11:42 2016
@@ -95,6 +95,10 @@
 return HeapFree( GetProcessHeap(), 0, ptr );
 }
 
+static inline int get_stride(int width, int depth)
+{
+return ((depth * width + 31) >> 3) & ~3;
+}
 
 /*  */
 static unsigned char *in_buffer, uiclip[1024], *uiclp = NULL;
@@ -463,7 +467,7 @@
 break;
 }
 
-frm_stride = out_width * bpp;
+frm_stride = get_stride(out_width, bpp * 8);
 frm_ptr = output;
 
 if(frame.length != size)
@@ -848,9 +852,9 @@
 if( out )
 {
 memcpy( out, in, size );
+out->bmiHeader.biBitCount = 24;
 out->bmiHeader.biCompression = BI_RGB;
-out->bmiHeader.biSizeImage = in->bmiHeader.biHeight
-   * in->bmiHeader.biWidth *4;
+out->bmiHeader.biSizeImage = get_stride(in->bmiHeader.biWidth, 24) * 
in->bmiHeader.biHeight;
 return ICERR_OK;
 }
 return size;

Modified: trunk/reactos/media/doc/README.WINE
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=71549=71548=71549=diff
==
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun  5 19:11:42 2016
@@ -73,7 +73,7 @@
 reactos/dll/win32/hlink   # Synced to WineStaging-1.9.4
 reactos/dll/win32/hnetcfg # Synced to WineStaging-1.9.11
 reactos/dll/win32/httpapi # Synced to WineStaging-1.9.4
-reactos/dll/win32/iccvid  # Synced to WineStaging-1.9.4
+reactos/dll/win32/iccvid  # Synced to WineStaging-1.9.11
 reactos/dll/win32/ieframe # Synced to WineStaging-1.9.4
 reactos/dll/win32/imaadp32.acm# Synced to WineStaging-1.9.4
 reactos/dll/win32/imagehlp# Synced to WineStaging-1.9.4




[ros-diffs] [akhaldi] 71548: [HNETCFG] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:10:33 2016
New Revision: 71548

URL: http://svn.reactos.org/svn/reactos?rev=71548=rev
Log:
[HNETCFG] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/hnetcfg/port.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/hnetcfg/port.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hnetcfg/port.c?rev=71548=71547=71548=diff
==
--- trunk/reactos/dll/win32/hnetcfg/port.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/hnetcfg/port.c  [iso-8859-1] Sun Jun  5 
19:10:33 2016
@@ -512,7 +512,7 @@
 fw_ports *This = impl_from_INetFwOpenPorts( iface );
 
 FIXME("%p, %p\n", This, port);
-return E_NOTIMPL;
+return S_OK;
 }
 
 static HRESULT WINAPI fw_ports_Remove(

Modified: trunk/reactos/media/doc/README.WINE
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=71548=71547=71548=diff
==
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun  5 19:10:33 2016
@@ -71,7 +71,7 @@
 reactos/dll/win32/gdiplus # Synced to WineStaging-1.9.11
 reactos/dll/win32/hhctrl.ocx  # Synced to WineStaging-1.9.4
 reactos/dll/win32/hlink   # Synced to WineStaging-1.9.4
-reactos/dll/win32/hnetcfg # Synced to WineStaging-1.9.4
+reactos/dll/win32/hnetcfg # Synced to WineStaging-1.9.11
 reactos/dll/win32/httpapi # Synced to WineStaging-1.9.4
 reactos/dll/win32/iccvid  # Synced to WineStaging-1.9.4
 reactos/dll/win32/ieframe # Synced to WineStaging-1.9.4




[ros-diffs] [akhaldi] 71547: [GDIPLUS_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:09:10 2016
New Revision: 71547

URL: http://svn.reactos.org/svn/reactos?rev=71547=rev
Log:
[GDIPLUS_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/rostests/winetests/gdiplus/graphicspath.c
trunk/rostests/winetests/gdiplus/image.c
trunk/rostests/winetests/gdiplus/metafile.c

Modified: trunk/rostests/winetests/gdiplus/graphicspath.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/graphicspath.c?rev=71547=71546=71547=diff
==
--- trunk/rostests/winetests/gdiplus/graphicspath.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/gdiplus/graphicspath.c [iso-8859-1] Sun Jun  5 
19:09:10 2016
@@ -1018,6 +1018,9 @@
 status = GdipFlattenPath(path, NULL, 1.0);
 expect(Ok, status);
 
+status = GdipTransformPath(path, 0);
+expect(Ok, status);
+
 status = GdipAddPathEllipse(path, 0.0, 0.0, 100.0, 50.0);
 expect(Ok, status);
 

Modified: trunk/rostests/winetests/gdiplus/image.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/image.c?rev=71547=71546=71547=diff
==
--- trunk/rostests/winetests/gdiplus/image.c[iso-8859-1] (original)
+++ trunk/rostests/winetests/gdiplus/image.c[iso-8859-1] Sun Jun  5 
19:09:10 2016
@@ -1466,36 +1466,36 @@
 
 stat = GdipGetImageBounds(img, , );
 expect(Ok, stat);
-todo_wine expect(UnitPixel, unit);
+expect(UnitPixel, unit);
 expectf(0.0, bounds.X);
 expectf(0.0, bounds.Y);
-todo_wine expectf(320.0, bounds.Width);
-todo_wine expectf(320.0, bounds.Height);
+expectf(320.0, bounds.Width);
+expectf(320.0, bounds.Height);
 
 stat = GdipGetImageHorizontalResolution(img, );
 expect(Ok, stat);
-todo_wine expectf(1440.0, res);
+expectf(1440.0, res);
 
 stat = GdipGetImageVerticalResolution(img, );
 expect(Ok, stat);
-todo_wine expectf(1440.0, res);
+expectf(1440.0, res);
 
 memset(, 0, sizeof(header));
 stat = GdipGetMetafileHeaderFromMetafile((GpMetafile*)img, );
 expect(Ok, stat);
 if (stat == Ok)
 {
-todo_wine expect(MetafileTypeWmfPlaceable, header.Type);
+expect(MetafileTypeWmfPlaceable, header.Type);
 todo_wine expect(sizeof(wmfimage)-sizeof(WmfPlaceableFileHeader), 
header.Size);
 todo_wine expect(0x300, header.Version);
 expect(0, header.EmfPlusFlags);
-todo_wine expectf(1440.0, header.DpiX);
-todo_wine expectf(1440.0, header.DpiY);
+expectf(1440.0, header.DpiX);
+expectf(1440.0, header.DpiY);
 expect(0, header.X);
 expect(0, header.Y);
-todo_wine expect(320, header.Width);
-todo_wine expect(320, header.Height);
-todo_wine expect(1, U(header).WmfHeader.mtType);
+expect(320, header.Width);
+expect(320, header.Height);
+expect(1, U(header).WmfHeader.mtType);
 expect(0, header.EmfPlusHeaderSize);
 expect(0, header.LogicalDpiX);
 expect(0, header.LogicalDpiY);
@@ -1543,17 +1543,17 @@
 expect(Ok, stat);
 if (stat == Ok)
 {
-todo_wine expect(MetafileTypeWmfPlaceable, header.Type);
+expect(MetafileTypeWmfPlaceable, header.Type);
 todo_wine expect(sizeof(wmfimage)-sizeof(WmfPlaceableFileHeader), 
header.Size);
 todo_wine expect(0x300, header.Version);
 expect(0, header.EmfPlusFlags);
-todo_wine expectf(1440.0, header.DpiX);
-todo_wine expectf(1440.0, header.DpiY);
+expectf(1440.0, header.DpiX);
+expectf(1440.0, header.DpiY);
 expect(0, header.X);
 expect(0, header.Y);
-todo_wine expect(320, header.Width);
-todo_wine expect(320, header.Height);
-todo_wine expect(1, U(header).WmfHeader.mtType);
+expect(320, header.Width);
+expect(320, header.Height);
+expect(1, U(header).WmfHeader.mtType);
 expect(0, header.EmfPlusHeaderSize);
 expect(0, header.LogicalDpiX);
 expect(0, header.LogicalDpiY);

Modified: trunk/rostests/winetests/gdiplus/metafile.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/metafile.c?rev=71547=71546=71547=diff
==
--- trunk/rostests/winetests/gdiplus/metafile.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/gdiplus/metafile.c [iso-8859-1] Sun Jun  5 
19:09:10 2016
@@ -867,6 +867,117 @@
 expect(Ok, stat);
 }
 
+static void test_nullframerect(void) {
+GpStatus stat;
+GpMetafile *metafile;
+GpGraphics *graphics;
+HDC hdc, metafile_dc;
+static const WCHAR description[] = {'w','i','n','e','t','e','s','t',0};
+GpBrush *brush;
+HBRUSH hbrush, holdbrush;
+GpRectF bounds;
+GpUnit unit;
+
+hdc = CreateCompatibleDC(0);
+
+   

[ros-diffs] [akhaldi] 71546: [GDIPLUS] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:08:07 2016
New Revision: 71546

URL: http://svn.reactos.org/svn/reactos?rev=71546=rev
Log:
[GDIPLUS] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/gdiplus/gdiplus.spec
trunk/reactos/dll/win32/gdiplus/gdiplus_private.h
trunk/reactos/dll/win32/gdiplus/graphics.c
trunk/reactos/dll/win32/gdiplus/graphicspath.c
trunk/reactos/dll/win32/gdiplus/image.c
trunk/reactos/dll/win32/gdiplus/metafile.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/gdiplus/gdiplus.spec
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/gdiplus.spec?rev=71546=71545=71546=diff
==
--- trunk/reactos/dll/win32/gdiplus/gdiplus.spec[iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdiplus/gdiplus.spec[iso-8859-1] Sun Jun  5 
19:08:07 2016
@@ -303,7 +303,7 @@
 303 stdcall GdipGetMetafileHeaderFromFile(wstr ptr)
 304 stdcall GdipGetMetafileHeaderFromMetafile(ptr ptr)
 305 stdcall GdipGetMetafileHeaderFromStream(ptr ptr)
-306 stub GdipGetMetafileHeaderFromWmf
+306 stdcall GdipGetMetafileHeaderFromWmf(ptr ptr ptr)
 307 stdcall GdipGetNearestColor(ptr ptr)
 308 stdcall GdipGetPageScale(ptr ptr)
 309 stdcall GdipGetPageUnit(ptr ptr)

Modified: trunk/reactos/dll/win32/gdiplus/gdiplus_private.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/gdiplus_private.h?rev=71546=71545=71546=diff
==
--- trunk/reactos/dll/win32/gdiplus/gdiplus_private.h   [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdiplus/gdiplus_private.h   [iso-8859-1] Sun Jun  5 
19:08:07 2016
@@ -327,7 +327,6 @@
 };
 
 struct GpImage{
-IPicture *picture;
 IWICBitmapDecoder *decoder;
 ImageType type;
 GUID format;
@@ -351,6 +350,7 @@
 BYTE *comment_data;
 DWORD comment_data_size;
 DWORD comment_data_length;
+IStream *record_stream;
 
 /* playback */
 GpGraphics *playback_graphics;

Modified: trunk/reactos/dll/win32/gdiplus/graphics.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/graphics.c?rev=71546=71545=71546=diff
==
--- trunk/reactos/dll/win32/gdiplus/graphics.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdiplus/graphics.c  [iso-8859-1] Sun Jun  5 
19:08:07 2016
@@ -2893,23 +2893,7 @@
 srcheight = units_to_pixels(srcheight, srcUnit, image->yres);
 TRACE("src pixels: %f,%f %fx%f\n", srcx, srcy, srcwidth, srcheight);
 
-if (image->picture)
-{
-if (!graphics->hdc)
-{
-FIXME("graphics object has no HDC\n");
-}
-
-if(IPicture_Render(image->picture, graphics->hdc,
-pti[0].x, pti[0].y, pti[1].x - pti[0].x, pti[2].y - pti[0].y,
-srcx, srcy, srcwidth, srcheight, NULL) != S_OK)
-{
-if(callback)
-callback(callbackData);
-return GenericError;
-}
-}
-else if (image->type == ImageTypeBitmap)
+if (image->type == ImageTypeBitmap)
 {
 GpBitmap* bitmap = (GpBitmap*)image;
 BOOL do_resampling = FALSE;
@@ -6432,13 +6416,6 @@
   brush, positions, flags, matrix);
 }
 
-GpStatus WINGDIPAPI GdipRecordMetafileStream(IStream *stream, HDC hdc, EmfType 
type, GDIPCONST GpRect *frameRect,
-MetafileFrameUnit frameUnit, GDIPCONST 
WCHAR *desc, GpMetafile **metafile)
-{
-FIXME("(%p %p %d %p %d %p %p): stub\n", stream, hdc, type, frameRect, 
frameUnit, desc, metafile);
-return NotImplemented;
-}
-
 /*
  * GdipIsVisibleClipEmpty [GDIPLUS.@]
  */

Modified: trunk/reactos/dll/win32/gdiplus/graphicspath.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/graphicspath.c?rev=71546=71545=71546=diff
==
--- trunk/reactos/dll/win32/gdiplus/graphicspath.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdiplus/graphicspath.c  [iso-8859-1] Sun Jun  5 
19:08:07 2016
@@ -1202,11 +1202,9 @@
 if(path->pathdata.Count == 0)
 return Ok;
 
-if(matrix){
-stat = GdipTransformPath(path, matrix);
-if (stat != Ok)
-return stat;
-}
+stat = GdipTransformPath(path, matrix);
+if(stat != Ok)
+return stat;
 
 pt = path->pathdata.Points[0];
 if(!init_path_list(, pt.X, pt.Y))
@@ -1663,7 +1661,7 @@
 if(!path)
 return InvalidParameter;
 
-if(path->pathdata.Count == 0)
+if(path->pathdata.Count == 0 || !matrix)
 return Ok;
 
 return GdipTransformMatrixPoints(matrix, path->pathdata.Points,

Modified: trunk/reactos/dll/win32/gdiplus/image.c

[ros-diffs] [akhaldi] 71545: [DBGHELP] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:05:55 2016
New Revision: 71545

URL: http://svn.reactos.org/svn/reactos?rev=71545=rev
Log:
[DBGHELP] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/dbghelp/crc32.c
trunk/reactos/dll/win32/dbghelp/dbghelp.spec
trunk/reactos/dll/win32/dbghelp/dbghelp_private.h
trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff
trunk/reactos/dll/win32/dbghelp/elf_module.c
trunk/reactos/dll/win32/dbghelp/macho_module.c
trunk/reactos/dll/win32/dbghelp/module.c
trunk/reactos/dll/win32/dbghelp/msc.c
trunk/reactos/dll/win32/dbghelp/pe_module.c
trunk/reactos/dll/win32/dbghelp/rosstubs.c
trunk/reactos/dll/win32/dbghelp/symbol.c
trunk/reactos/dll/win32/dbghelp/type.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/dbghelp/crc32.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/crc32.c?rev=71545=71544=71545=diff
==
--- trunk/reactos/dll/win32/dbghelp/crc32.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/crc32.c [iso-8859-1] Sun Jun  5 
19:05:55 2016
@@ -53,7 +53,7 @@
 /* order from highest-order term to lowest-order term.  UARTs transmit */
 /* characters in order from LSB to MSB.  By storing the CRC this way,  */
 /* we hand it to the UART in the order low-byte to high-byte; the UART */
-/* sends each low-bit to hight-bit; and the result is transmission bit */
+/* sends each low-bit to high-bit; and the result is transmission bit  */
 /* by bit from highest- to lowest-order term without requiring any bit */
 /* shuffling on our part.  Reception works similarly.  */
 

Modified: trunk/reactos/dll/win32/dbghelp/dbghelp.spec
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dbghelp.spec?rev=71545=71544=71545=diff
==
--- trunk/reactos/dll/win32/dbghelp/dbghelp.spec[iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/dbghelp.spec[iso-8859-1] Sun Jun  5 
19:05:55 2016
@@ -7,8 +7,8 @@
 @ stdcall EnumDirTreeW(long wstr wstr ptr ptr ptr)
 @ stdcall EnumerateLoadedModules(long ptr ptr)
 @ stdcall EnumerateLoadedModules64(long ptr ptr)
-@ stdcall EnumerateLoadedModulesEx(ptr ptr ptr)
-@ stdcall EnumerateLoadedModulesExW(ptr ptr ptr)
+@ stdcall EnumerateLoadedModulesEx(long ptr ptr) EnumerateLoadedModules64
+@ stdcall EnumerateLoadedModulesExW(long ptr ptr) EnumerateLoadedModulesW64
 @ stdcall EnumerateLoadedModulesW64(long ptr ptr)
 @ stdcall ExtensionApiVersion()
 @ stdcall FindDebugInfoFile(str str ptr)

Modified: trunk/reactos/dll/win32/dbghelp/dbghelp_private.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dbghelp_private.h?rev=71545=71544=71545=diff
==
--- trunk/reactos/dll/win32/dbghelp/dbghelp_private.h   [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/dbghelp_private.h   [iso-8859-1] Sun Jun  5 
19:05:55 2016
@@ -150,9 +150,6 @@
 void hash_table_iter_init(const struct hash_table* ht,
   struct hash_table_iter* hti, const char* name) 
DECLSPEC_HIDDEN;
 void*hash_table_iter_up(struct hash_table_iter* hti) DECLSPEC_HIDDEN;
-
-#define GET_ENTRY(__i, __t, __f) \
-((__t*)((char*)(__i) - FIELD_OFFSET(__t,__f)))
 
 
 extern unsigned dbghelp_options DECLSPEC_HIDDEN;

Modified: trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff?rev=71545=71544=71545=diff
==
--- trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff[iso-8859-1] (original)
+++ trunk/reactos/dll/win32/dbghelp/dbghelp_ros.diff[iso-8859-1] Sun Jun  5 
19:05:55 2016
@@ -1,7 +1,7 @@
 diff -pudN e:\wine\dlls\dbghelp/cpu_i386.c 
e:\reactos\dll\win32\dbghelp/cpu_i386.c
 e:\wine\dlls\dbghelp/cpu_i386.c2015-07-14 15:44:34.399098500 +0100
-+++ e:\reactos\dll\win32\dbghelp/cpu_i386.c2015-07-19 09:09:09.912044200 
+0100
-@@ -33,7 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
+--- e:\wine\dlls\dbghelp/cpu_i386.c2016-05-31 18:01:33 +0100
 e:\reactos\dll\win32\dbghelp/cpu_i386.c2015-11-21 10:14:57 +0100
+@@ -30,7 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
  
  #define IS_VM86_MODE(ctx) (ctx->EFlags & V86_FLAG)
  
@@ -10,7 +10,7 @@
  static ADDRESS_MODE get_selector_type(HANDLE hThread, const CONTEXT* ctx, 
WORD sel)
  {
  LDT_ENTRY le;
-@@ -72,6 +69,7 @@ static BOOL i386_build_addr(HANDLE hThre
+@@ -69,6 +69,7 @@ static BOOL i386_build_addr(HANDLE hThre
  }
  #endif
  
@@ -18,7 +18,7 @@
  static BOOL i386_get_addr(HANDLE hThread, const CONTEXT* ctx,
enum cpu_addr ca, ADDRESS64* addr)
  {
-@@ -85,8 +83,9 @@ static BOOL 

[ros-diffs] [akhaldi] 71544: [CRYPT32_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:01:41 2016
New Revision: 71544

URL: http://svn.reactos.org/svn/reactos?rev=71544=rev
Log:
[CRYPT32_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/rostests/winetests/crypt32/chain.c

Modified: trunk/rostests/winetests/crypt32/chain.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/crypt32/chain.c?rev=71544=71543=71544=diff
==
--- trunk/rostests/winetests/crypt32/chain.c[iso-8859-1] (original)
+++ trunk/rostests/winetests/crypt32/chain.c[iso-8859-1] Sun Jun  5 
19:01:41 2016
@@ -125,8 +125,10 @@
 CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, selfSignedCert,
  sizeof(selfSignedCert), CERT_STORE_ADD_ALWAYS, NULL);
 ret = pCertCreateCertificateChainEngine(pConfig, );
-ok(!ret && GetLastError() == CRYPT_E_NOT_FOUND,
- "Expected CRYPT_E_NOT_FOUND, got %08x\n", GetLastError());
+/* ERROR_FILE_NOT_FOUND used in Windows 10 */
+ok(!ret && ((GetLastError() == CRYPT_E_NOT_FOUND) ||
+(GetLastError() == ERROR_FILE_NOT_FOUND)),
+"Expected CRYPT_E_NOT_FOUND or ERROR_FILE_NOT_FOUND, got %08x\n", 
GetLastError());
 
 CertCloseStore(store, 0);
 }
@@ -4668,7 +4670,7 @@
 CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
  fooPolicyCheckWithoutMatchingName, , );
 /* The Battle.Net chain checks a certificate with a domain component
- * containg a terminating NULL.
+ * containing a terminating NULL.
  */
 sslPolicyPara.pwszServerName = battle_dot_net;
 CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,




[ros-diffs] [akhaldi] 71543: [CRYPT32] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 19:00:43 2016
New Revision: 71543

URL: http://svn.reactos.org/svn/reactos?rev=71543=rev
Log:
[CRYPT32] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/crypt32/collectionstore.c
trunk/reactos/dll/win32/crypt32/crypt32.spec
trunk/reactos/dll/win32/crypt32/msg.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/crypt32/collectionstore.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/collectionstore.c?rev=71543=71542=71543=diff
==
--- trunk/reactos/dll/win32/crypt32/collectionstore.c   [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/collectionstore.c   [iso-8859-1] Sun Jun  5 
19:00:43 2016
@@ -520,7 +520,6 @@
 entry->store = sibling;
 entry->dwUpdateFlags = dwUpdateFlags;
 entry->dwPriority = dwPriority;
-list_init(>entry);
 TRACE("%p: adding %p, priority %d\n", collection, entry, dwPriority);
 EnterCriticalSection(>cs);
 if (dwPriority)

Modified: trunk/reactos/dll/win32/crypt32/crypt32.spec
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crypt32.spec?rev=71543=71542=71543=diff
==
--- trunk/reactos/dll/win32/crypt32/crypt32.spec[iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/crypt32.spec[iso-8859-1] Sun Jun  5 
19:00:43 2016
@@ -160,7 +160,7 @@
 @ stdcall CryptMsgOpenToEncode(long long long ptr str ptr)
 @ stdcall CryptMsgSignCTL(long ptr long ptr long ptr ptr)
 @ stdcall CryptMsgUpdate(ptr ptr long long)
-@ stub CryptMsgVerifyCountersignatureEncoded
+@ stdcall CryptMsgVerifyCountersignatureEncoded(ptr long ptr long ptr long ptr)
 @ stdcall CryptMsgVerifyCountersignatureEncodedEx(ptr long ptr long ptr long 
long ptr long ptr)
 @ stdcall CryptProtectData(ptr wstr ptr ptr ptr long ptr)
 @ stdcall CryptProtectMemory(ptr long long)

Modified: trunk/reactos/dll/win32/crypt32/msg.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/msg.c?rev=71543=71542=71543=diff
==
--- trunk/reactos/dll/win32/crypt32/msg.c   [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/msg.c   [iso-8859-1] Sun Jun  5 
19:00:43 2016
@@ -3725,6 +3725,17 @@
 return ret;
 }
 
+BOOL WINAPI CryptMsgVerifyCountersignatureEncoded(HCRYPTPROV_LEGACY hCryptProv,
+ DWORD dwEncodingType, BYTE *pbSignerInfo, DWORD cbSignerInfo,
+ PBYTE pbSignerInfoCountersignature, DWORD cbSignerInfoCountersignature,
+ CERT_INFO *pciCountersigner)
+{
+FIXME("(%08lx, %08x, %p, %d, %p, %d, %p): stub\n", hCryptProv,
+ dwEncodingType, pbSignerInfo, cbSignerInfo, pbSignerInfoCountersignature,
+ cbSignerInfoCountersignature, pciCountersigner);
+return FALSE;
+}
+
 BOOL WINAPI CryptMsgVerifyCountersignatureEncodedEx(HCRYPTPROV_LEGACY 
hCryptProv,
  DWORD dwEncodingType, PBYTE pbSignerInfo, DWORD cbSignerInfo,
  PBYTE pbSignerInfoCountersignature, DWORD cbSignerInfoCountersignature,

Modified: trunk/reactos/media/doc/README.WINE
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=71543=71542=71543=diff
==
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun  5 19:00:43 2016
@@ -58,7 +58,7 @@
 reactos/dll/win32/comdlg32# Synced to WineStaging-1.9.11
 reactos/dll/win32/compstui# Synced to WineStaging-1.9.4
 reactos/dll/win32/credui  # Synced to WineStaging-1.9.4
-reactos/dll/win32/crypt32 # Synced to WineStaging-1.9.4
+reactos/dll/win32/crypt32 # Synced to WineStaging-1.9.11
 reactos/dll/win32/cryptdlg# Synced to WineStaging-1.9.4
 reactos/dll/win32/cryptdll# Synced to WineStaging-1.9.4
 reactos/dll/win32/cryptnet# Synced to WineStaging-1.9.4




[ros-diffs] [akhaldi] 71542: [COMDLG32] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 18:59:07 2016
New Revision: 71542

URL: http://svn.reactos.org/svn/reactos?rev=71542=rev
Log:
[COMDLG32] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/comdlg32/filedlg.c
trunk/reactos/dll/win32/comdlg32/fontdlg.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/comdlg32/filedlg.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/filedlg.c?rev=71542=71541=71542=diff
==
--- trunk/reactos/dll/win32/comdlg32/filedlg.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comdlg32/filedlg.c  [iso-8859-1] Sun Jun  5 
18:59:07 2016
@@ -434,6 +434,13 @@
   ret = FALSE;
   }
 
+  /* set the lpstrFileTitle */
+  if (ret && ofn->lpstrFile && ofn->lpstrFileTitle)
+  {
+  LPSTR lpstrFileTitle = PathFindFileNameA(ofn->lpstrFile);
+  lstrcpynA(ofn->lpstrFileTitle, lpstrFileTitle, ofn->nMaxFileTitle);
+  }
+
   if (lpstrSavDir)
   {
   SetCurrentDirectoryA(lpstrSavDir);
@@ -524,6 +531,13 @@
   break;
   default :
   ret = FALSE;
+  }
+
+  /* set the lpstrFileTitle */
+  if (ret && ofn->lpstrFile && ofn->lpstrFileTitle)
+  {
+  LPWSTR lpstrFileTitle = PathFindFileNameW(ofn->lpstrFile);
+  lstrcpynW(ofn->lpstrFileTitle, lpstrFileTitle, ofn->nMaxFileTitle);
   }
 
   if (lpstrSavDir)
@@ -2706,23 +2720,6 @@
   fodInfos->ofnInfos->nFileExtension = (*lpszTemp) ? (lpszTemp - 
tempFileA) + 1 : 0;
   }
 
-  /* set the lpstrFileTitle */
-  if(fodInfos->ofnInfos->lpstrFileTitle)
- {
-LPWSTR lpstrFileTitle = PathFindFileNameW(lpstrPathAndFile);
-if(fodInfos->unicode)
-{
-  LPOPENFILENAMEW ofn = fodInfos->ofnInfos;
- lstrcpynW(ofn->lpstrFileTitle, lpstrFileTitle, 
ofn->nMaxFileTitle);
-}
-else
-{
-  LPOPENFILENAMEA ofn = (LPOPENFILENAMEA)fodInfos->ofnInfos;
-  WideCharToMultiByte(CP_ACP, 0, lpstrFileTitle, -1,
-ofn->lpstrFileTitle, ofn->nMaxFileTitle, NULL, NULL);
-}
- }
-
   /* copy currently selected filter to lpstrCustomFilter */
   if (fodInfos->ofnInfos->lpstrCustomFilter)
   {

Modified: trunk/reactos/dll/win32/comdlg32/fontdlg.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comdlg32/fontdlg.c?rev=71542=71541=71542=diff
==
--- trunk/reactos/dll/win32/comdlg32/fontdlg.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comdlg32/fontdlg.c  [iso-8859-1] Sun Jun  5 
18:59:07 2016
@@ -1156,9 +1156,7 @@
 MapWindowPoints( 0, hDlg, (LPPOINT) , 2);
 hdc = BeginPaint( hDlg,  );
 
-TRACE("erase %d, rect=(%d,%d)-(%d,%d)\n", ps.fErase,
-  ps.rcPaint.left, ps.rcPaint.top,
-  ps.rcPaint.right, ps.rcPaint.bottom);
+TRACE("erase %d, rect=%s\n", ps.fErase, wine_dbgstr_rect());
 
 /* Paint frame */
 DrawEdge( hdc, , EDGE_SUNKEN, BF_RECT|BF_ADJUST );

Modified: trunk/reactos/media/doc/README.WINE
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=71542=71541=71542=diff
==
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun  5 18:59:07 2016
@@ -55,7 +55,7 @@
 reactos/dll/win32/clusapi # Synced to WineStaging-1.9.4
 reactos/dll/win32/comcat  # Synced to WineStaging-1.9.4
 reactos/dll/win32/comctl32# Synced to WineStaging-1.9.11
-reactos/dll/win32/comdlg32# Synced to WineStaging-1.9.4
+reactos/dll/win32/comdlg32# Synced to WineStaging-1.9.11
 reactos/dll/win32/compstui# Synced to WineStaging-1.9.4
 reactos/dll/win32/credui  # Synced to WineStaging-1.9.4
 reactos/dll/win32/crypt32 # Synced to WineStaging-1.9.4




[ros-diffs] [akhaldi] 71541: [COMCTL32_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 18:56:37 2016
New Revision: 71541

URL: http://svn.reactos.org/svn/reactos?rev=71541=rev
Log:
[COMCTL32_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368

Added:
trunk/rostests/winetests/comctl32/animate.c   (with props)
Modified:
trunk/rostests/winetests/comctl32/CMakeLists.txt
trunk/rostests/winetests/comctl32/datetime.c
trunk/rostests/winetests/comctl32/header.c
trunk/rostests/winetests/comctl32/listview.c
trunk/rostests/winetests/comctl32/monthcal.c
trunk/rostests/winetests/comctl32/progress.c
trunk/rostests/winetests/comctl32/testlist.c
trunk/rostests/winetests/comctl32/toolbar.c
trunk/rostests/winetests/comctl32/tooltips.c

Modified: trunk/rostests/winetests/comctl32/CMakeLists.txt
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/CMakeLists.txt?rev=71541=71540=71541=diff
==
--- trunk/rostests/winetests/comctl32/CMakeLists.txt[iso-8859-1] (original)
+++ trunk/rostests/winetests/comctl32/CMakeLists.txt[iso-8859-1] Sun Jun  5 
18:56:37 2016
@@ -4,6 +4,7 @@
 add_definitions(-DUSE_WINE_TODOS)
 
 list(APPEND SOURCE
+animate.c
 button.c
 comboex.c
 datetime.c

Added: trunk/rostests/winetests/comctl32/animate.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/animate.c?rev=71541
==
--- trunk/rostests/winetests/comctl32/animate.c (added)
+++ trunk/rostests/winetests/comctl32/animate.c [iso-8859-1] Sun Jun  5 
18:56:37 2016
@@ -0,0 +1,182 @@
+/* Unit tests for the animate control.
+ *
+ * Copyright 2016 Bruno Jesus
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include 
+
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winuser.h"
+#include "commctrl.h"
+
+#include "wine/test.h"
+
+#define SEARCHING_AVI_INDEX 151 /* From shell32 resource library */
+#define INVALID_AVI_INDEX 0x
+
+static HWND hAnimateParentWnd, hAnimateWnd;
+static const char animateTestClass[] = "AnimateTestClass";
+static WNDPROC animate_wndproc;
+static HANDLE shell32;
+
+/* try to make sure pending X events have been processed before continuing */
+static void flush_events(void)
+{
+MSG msg;
+int diff = 100;
+DWORD time = GetTickCount() + diff;
+
+while (diff > 0)
+{
+if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min(10,diff), 
QS_ALLINPUT ) == WAIT_TIMEOUT) break;
+while (PeekMessageA( , 0, 0, 0, PM_REMOVE )) DispatchMessageA( 
 );
+diff = time - GetTickCount();
+}
+}
+
+static LRESULT CALLBACK animate_test_wnd_proc(HWND hWnd, UINT msg, WPARAM 
wParam, LPARAM lParam)
+{
+switch(msg)
+{
+case WM_DESTROY:
+PostQuitMessage(0);
+break;
+
+default:
+return DefWindowProcA(hWnd, msg, wParam, lParam);
+}
+return 0L;
+}
+
+static void update_window(HWND hWnd)
+{
+UpdateWindow(hWnd);
+ok(!GetUpdateRect(hWnd, NULL, FALSE), "GetUpdateRect must return zero 
after UpdateWindow\n");
+}
+
+static void create_animate(DWORD parent_style, DWORD animate_style)
+{
+WNDCLASSA wc;
+RECT rect;
+BOOL ret;
+
+wc.style = CS_HREDRAW | CS_VREDRAW;
+wc.cbClsExtra = 0;
+wc.cbWndExtra = 0;
+wc.hInstance = GetModuleHandleA(NULL);
+wc.hIcon = NULL;
+wc.hCursor = LoadCursorA(NULL, (LPCSTR)IDC_ARROW);
+wc.hbrBackground = GetSysColorBrush(COLOR_WINDOW);
+wc.lpszMenuName = NULL;
+wc.lpszClassName = animateTestClass;
+wc.lpfnWndProc = animate_test_wnd_proc;
+RegisterClassA();
+
+SetRect(, 0, 0, 200, 200);
+ret = AdjustWindowRect(, WS_OVERLAPPEDWINDOW, FALSE);
+ok(ret, "got %d\n", ret);
+
+hAnimateParentWnd = CreateWindowExA(0, animateTestClass, "Animate Test", 
WS_OVERLAPPEDWINDOW | parent_style,
+  CW_USEDEFAULT, CW_USEDEFAULT, rect.right - rect.left, rect.bottom - 
rect.top, NULL, NULL, GetModuleHandleA(NULL), 0);
+ok(hAnimateParentWnd != NULL, "failed to create parent wnd\n");
+
+GetClientRect(hAnimateParentWnd, );
+hAnimateWnd = CreateWindowExA(0, ANIMATE_CLASSA, NULL, WS_CHILD | 
WS_VISIBLE | animate_style,
+  0, 0, rect.right, 

[ros-diffs] [akhaldi] 71540: [COMCTL32] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 18:52:20 2016
New Revision: 71540

URL: http://svn.reactos.org/svn/reactos?rev=71540=rev
Log:
[COMCTL32] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/comctl32/CMakeLists.txt
trunk/reactos/dll/win32/comctl32/animate.c
trunk/reactos/dll/win32/comctl32/comboex.c
trunk/reactos/dll/win32/comctl32/comctl32_ros.diff
trunk/reactos/dll/win32/comctl32/datetime.c
trunk/reactos/dll/win32/comctl32/header.c
trunk/reactos/dll/win32/comctl32/imagelist.c
trunk/reactos/dll/win32/comctl32/listview.c
trunk/reactos/dll/win32/comctl32/monthcal.c
trunk/reactos/dll/win32/comctl32/pager.c
trunk/reactos/dll/win32/comctl32/progress.c
trunk/reactos/dll/win32/comctl32/propsheet.c
trunk/reactos/dll/win32/comctl32/rebar.c
trunk/reactos/dll/win32/comctl32/status.c
trunk/reactos/dll/win32/comctl32/syslink.c
trunk/reactos/dll/win32/comctl32/tab.c
trunk/reactos/dll/win32/comctl32/toolbar.c
trunk/reactos/dll/win32/comctl32/tooltips.c
trunk/reactos/dll/win32/comctl32/trackbar.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/comctl32/CMakeLists.txt
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/CMakeLists.txt?rev=71540=71539=71540=diff
==
--- trunk/reactos/dll/win32/comctl32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/CMakeLists.txt [iso-8859-1] Sun Jun  5 
18:52:20 2016
@@ -4,8 +4,8 @@
 -D_WINE
 -D_COMCTL32_)
 
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
+remove_definitions(-D_WIN32_WINNT=0x502 -DWINVER=0x502)
+add_definitions(-D_WIN32_WINNT=0x600 -DWINVER=0x600)
 
 include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
 spec2def(comctl32.dll comctl32.spec ADD_IMPORTLIB)

Modified: trunk/reactos/dll/win32/comctl32/animate.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/animate.c?rev=71540=71539=71540=diff
==
--- trunk/reactos/dll/win32/comctl32/animate.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/animate.c  [iso-8859-1] Sun Jun  5 
18:52:20 2016
@@ -303,10 +303,7 @@
 HBITMAP hbmOld2 = SelectObject(hdcFinal, hbmFinal);
 RECT rect;
 
-rect.left = 0;
-rect.top = 0;
-rect.right = nWidth;
-rect.bottom = nHeight;
+SetRect(, 0, 0, nWidth, nHeight);
 
 if(!infoPtr->hbrushBG)
 infoPtr->hbrushBG = GetCurrentObject(hDC, OBJ_BRUSH);

Modified: trunk/reactos/dll/win32/comctl32/comboex.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comboex.c?rev=71540=71539=71540=diff
==
--- trunk/reactos/dll/win32/comctl32/comboex.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/comboex.c  [iso-8859-1] Sun Jun  5 
18:52:20 2016
@@ -1301,7 +1301,7 @@
RECT exrc, cbrc, edrc;
GetWindowRect (infoPtr->hwndSelf, );
GetWindowRect (infoPtr->hwndCombo, );
-   edrc.left = edrc.top = edrc.right = edrc.bottom = -1;
+SetRect(, -1, -1, -1, -1);
if (infoPtr->hwndEdit) GetWindowRect (infoPtr->hwndEdit, );
 TRACE("window rects ex=(%s), cb=(%s), ed=(%s)\n",
   wine_dbgstr_rect(), wine_dbgstr_rect(),
@@ -1456,10 +1456,7 @@
x = xbase + xioff;
y = dis->rcItem.top +
(dis->rcItem.bottom - dis->rcItem.top - txtsize.cy) / 2;
-   rect.left = x;
-   rect.right = x + txtsize.cx;
-   rect.top = dis->rcItem.top + 1;
-   rect.bottom = dis->rcItem.bottom - 1;
+SetRect(, x, dis->rcItem.top + 1, x + txtsize.cx, 
dis->rcItem.bottom - 1);
 TRACE("drawing item %d text, rect=(%s)\n",
   dis->itemID, wine_dbgstr_rect());
ExtTextOutW (dis->hDC, x, y, ETO_OPAQUE | ETO_CLIPPED,

Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl32_ros.diff?rev=71540=71539=71540=diff
==
--- trunk/reactos/dll/win32/comctl32/comctl32_ros.diff  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/comctl32_ros.diff  [iso-8859-1] Sun Jun  5 
18:52:20 2016
@@ -1,28 +1,87 @@
+diff -pudN e:\wine\dlls\comctl32/comctl32.h 
e:\reactos\dll\win32\comctl32/comctl32.h
+--- e:\wine\dlls\comctl32/comctl32.h   2016-05-31 18:00:02 +0100
 e:\reactos\dll\win32\comctl32/comctl32.h   2014-03-05 11:47:40 +0100
+@@ -53,67 +53,6 @@
+ extern HMODULE COMCTL32_hModule DECLSPEC_HIDDEN;
+ extern HBRUSH  COMCTL32_hPattern55AABrush DECLSPEC_HIDDEN;
+ 
+-/* 

[ros-diffs] [akhaldi] 71539: [PSDK] Add missing MCS_SHORTDAYSOFWEEK.

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 18:45:07 2016
New Revision: 71539

URL: http://svn.reactos.org/svn/reactos?rev=71539=rev
Log:
[PSDK] Add missing MCS_SHORTDAYSOFWEEK.

Modified:
trunk/reactos/sdk/include/psdk/commctrl.h

Modified: trunk/reactos/sdk/include/psdk/commctrl.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/commctrl.h?rev=71539=71538=71539=diff
==
--- trunk/reactos/sdk/include/psdk/commctrl.h   [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/psdk/commctrl.h   [iso-8859-1] Sun Jun  5 
18:45:07 2016
@@ -4275,6 +4275,7 @@
 #define MCS_NOTODAYCIRCLE  0x0008
 #define MCS_NOTODAY0x0010
 #define MCS_NOTRAILINGDATES0x0040
+#define MCS_SHORTDAYSOFWEEK0x0080
 
 #define GMR_VISIBLE 0
 #define GMR_DAYSTATE 1




[ros-diffs] [akhaldi] 71538: [AVIFIL32] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 18:38:02 2016
New Revision: 71538

URL: http://svn.reactos.org/svn/reactos?rev=71538=rev
Log:
[AVIFIL32] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/dll/win32/avifil32/api.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/dll/win32/avifil32/api.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/avifil32/api.c?rev=71538=71537=71538=diff
==
--- trunk/reactos/dll/win32/avifil32/api.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/avifil32/api.c  [iso-8859-1] Sun Jun  5 
18:38:02 2016
@@ -1014,14 +1014,16 @@
 return AVIERR_ERROR;
   }
   for (n = 0;RegEnumKeyW(hKey, n, szFileExt, 
sizeof(szFileExt)/sizeof(szFileExt[0])) == ERROR_SUCCESS;n++) {
+WCHAR clsidW[40];
+
 /* get CLSID to extension */
-size = sizeof(szValue);
-if (RegQueryValueW(hKey, szFileExt, szValue, ) != ERROR_SUCCESS)
+size = sizeof(clsidW);
+if (RegQueryValueW(hKey, szFileExt, clsidW, ) != ERROR_SUCCESS)
   break;
 
 /* search if the CLSID is already known */
 for (i = 1; i <= count; i++) {
-  if (lstrcmpW(lp[i].szClsid, szValue) == 0)
+  if (lstrcmpW(lp[i].szClsid, clsidW) == 0)
break; /* a new one */
 }
 
@@ -1036,7 +1038,7 @@
break;
   }
 
-  lstrcpyW(lp[i].szClsid, szValue);
+  lstrcpyW(lp[i].szClsid, clsidW);
 
   count++;
 }

Modified: trunk/reactos/media/doc/README.WINE
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=71538=71537=71538=diff
==
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun  5 18:38:02 2016
@@ -48,7 +48,7 @@
 reactos/dll/win32/atl # Synced to WineStaging-1.9.4
 reactos/dll/win32/atl80   # Synced to WineStaging-1.9.4
 reactos/dll/win32/atl100  # Synced to WineStaging-1.9.4
-reactos/dll/win32/avifil32# Synced to WineStaging-1.9.4
+reactos/dll/win32/avifil32# Synced to WineStaging-1.9.11
 reactos/dll/win32/bcrypt  # Synced to WineStaging-1.9.4
 reactos/dll/win32/browseui# Out of sync
 reactos/dll/win32/cabinet # Synced to WineStaging-1.9.4




[ros-diffs] [akhaldi] 71537: [WORDPAD] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 18:35:43 2016
New Revision: 71537

URL: http://svn.reactos.org/svn/reactos?rev=71537=rev
Log:
[WORDPAD] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/base/applications/wordpad/registry.c
trunk/reactos/base/applications/wordpad/wordpad.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/base/applications/wordpad/registry.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wordpad/registry.c?rev=71537=71536=71537=diff
==
--- trunk/reactos/base/applications/wordpad/registry.c  [iso-8859-1] (original)
+++ trunk/reactos/base/applications/wordpad/registry.c  [iso-8859-1] Sun Jun  5 
18:35:43 2016
@@ -156,9 +156,9 @@
 {
 LPWSTR pos_basename;
 LPWSTR truncpos1, truncpos2;
-WCHAR myDocs[MAX_STRING_LEN];
-
-SHGetFolderPathW(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, 
(LPWSTR));
+WCHAR myDocs[MAX_PATH];
+
+SHGetFolderPathW(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, myDocs);
 pos_basename = file_basename(file);
 truncpos1 = NULL;
 truncpos2 = NULL;

Modified: trunk/reactos/base/applications/wordpad/wordpad.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/wordpad/wordpad.c?rev=71537=71536=71537=diff
==
--- trunk/reactos/base/applications/wordpad/wordpad.c   [iso-8859-1] (original)
+++ trunk/reactos/base/applications/wordpad/wordpad.c   [iso-8859-1] Sun Jun  5 
18:35:43 2016
@@ -1229,7 +1229,7 @@
 if (pFr->lpstrFindWhat != custom_data->findBuffer)
 {
 lstrcpynW(custom_data->findBuffer, pFr->lpstrFindWhat,
-  _countof(custom_data->findBuffer));
+  sizeof(custom_data->findBuffer) / sizeof(WCHAR));
 pFr->lpstrFindWhat = custom_data->findBuffer;
 }
 

Modified: trunk/reactos/media/doc/README.WINE
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=71537=71536=71537=diff
==
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jun  5 18:35:43 2016
@@ -240,7 +240,7 @@
 reactos/base/applications/notepad   # Forked at Wine-20041201
 reactos/base/applications/regedit   # Out of sync
 reactos/base/applications/winhlp32  # Synced to WineStaging-1.9.11
-reactos/base/applications/wordpad   # Synced to WineStaging-1.9.4
+reactos/base/applications/wordpad   # Synced to WineStaging-1.9.11
 reactos/base/services/rpcss # Synced to WineStaging-1.9.4
 reactos/base/shell/progman  # Forked at WineStaging-1.9.4
 reactos/base/system/expand  # Synced to WineStaging-1.9.4




[ros-diffs] [akhaldi] 71536: [WINHLP32] Sync with Wine Staging 1.9.11. CORE-11368

2016-06-05 Thread akhaldi
Author: akhaldi
Date: Sun Jun  5 18:34:33 2016
New Revision: 71536

URL: http://svn.reactos.org/svn/reactos?rev=71536=rev
Log:
[WINHLP32] Sync with Wine Staging 1.9.11. CORE-11368

Modified:
trunk/reactos/base/applications/winhlp32/callback.c
trunk/reactos/base/applications/winhlp32/hlpfile.c
trunk/reactos/base/applications/winhlp32/hlpfile.h
trunk/reactos/base/applications/winhlp32/macro.c
trunk/reactos/base/applications/winhlp32/macro.lex.l
trunk/reactos/base/applications/winhlp32/macro.lex.yy.c
trunk/reactos/base/applications/winhlp32/winhelp.c
trunk/reactos/media/doc/README.WINE

Modified: trunk/reactos/base/applications/winhlp32/callback.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32/callback.c?rev=71536=71535=71536=diff
==
--- trunk/reactos/base/applications/winhlp32/callback.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/callback.c [iso-8859-1] Sun Jun  5 
18:34:33 2016
@@ -30,7 +30,7 @@
 {
 unsignedmode = 0;
 
-WINE_FIXME("(%s %x)\n", wine_dbgstr_a(name), flags);
+WINE_FIXME("(%s %x)\n", debugstr_a(name), flags);
 switch (flags)
 {
 case 0: mode = GENERIC_READ | GENERIC_WRITE; break;
@@ -50,7 +50,7 @@
 
 static HANDLE CALLBACK WHD_OpenBag(HANDLE fs, LPSTR name, BYTE flags)
 {
-WINE_FIXME("(%p %s %x)\n", fs, name, flags);
+WINE_FIXME("(%p %s %x)\n", fs, debugstr_a(name), flags);
 return NULL;
 }
 

Modified: trunk/reactos/base/applications/winhlp32/hlpfile.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/winhlp32/hlpfile.c?rev=71536=71535=71536=diff
==
--- trunk/reactos/base/applications/winhlp32/hlpfile.c  [iso-8859-1] (original)
+++ trunk/reactos/base/applications/winhlp32/hlpfile.c  [iso-8859-1] Sun Jun  5 
18:34:33 2016
@@ -361,7 +361,7 @@
 
 if (!hlpfile) return 0;
 
-WINE_TRACE("<%s>[%x]\n", hlpfile->lpszPath, offset);
+WINE_TRACE("<%s>[%x]\n", debugstr_a(hlpfile->lpszPath), offset);
 
 if (offset == 0x) return NULL;
 page = NULL;
@@ -376,7 +376,7 @@
 }
 if (!found)
 WINE_ERR("Page of offset %u not found in file %s\n",
- offset, hlpfile->lpszPath);
+ offset, debugstr_a(hlpfile->lpszPath));
 return found;
 }
 
@@ -429,7 +429,7 @@
 if (!hlpfile) return NULL;
 if (!lHash) return HLPFILE_Contents(hlpfile, relative);
 
-WINE_TRACE("<%s>[%x]\n", hlpfile->lpszPath, lHash);
+WINE_TRACE("<%s>[%x]\n", debugstr_a(hlpfile->lpszPath), lHash);
 
 /* For win 3.0 files hash values are really page numbers */
 if (hlpfile->version <= 16)
@@ -441,7 +441,7 @@
 ptr = HLPFILE_BPTreeSearch(hlpfile->Context, LongToPtr(lHash), 
comp_PageByHash);
 if (!ptr)
 {
-WINE_ERR("Page of hash %x not found in file %s\n", lHash, 
hlpfile->lpszPath);
+WINE_ERR("Page of hash %x not found in file %s\n", lHash, 
debugstr_a(hlpfile->lpszPath));
 return NULL;
 }
 
@@ -458,7 +458,7 @@
 
 if (!hlpfile) return 0;
 
-WINE_TRACE("<%s>[%x]\n", hlpfile->lpszPath, lMap);
+WINE_TRACE("<%s>[%x]\n", debugstr_a(hlpfile->lpszPath), lMap);
 
 for (i = 0; i < hlpfile->wMapLen; i++)
 {
@@ -466,7 +466,7 @@
 return HLPFILE_PageByOffset(hlpfile, hlpfile->Map[i].offset, 
relative);
 }
 
-WINE_ERR("Page of Map %x not found in file %s\n", lMap, hlpfile->lpszPath);
+WINE_ERR("Page of Map %x not found in file %s\n", lMap, 
debugstr_a(hlpfile->lpszPath));
 return NULL;
 }
 
@@ -480,7 +480,7 @@
 int leaf, void** next)
 {
 *next = (char *)p+strlen(p)+(leaf?5:3);
-WINE_TRACE("Comparing '%s' with '%s'\n", (char *)p, (const char *)key);
+WINE_TRACE("Comparing %s with %s\n", debugstr_a((char *)p), 
debugstr_a((const char *)key));
 return strcmp(p, key);
 }
 
@@ -492,25 +492,37 @@
 {
 BYTE *ptr;
 
-WINE_TRACE("looking for file '%s'\n", name);
+WINE_TRACE("looking for file %s\n", debugstr_a(name));
 ptr = HLPFILE_BPTreeSearch(hlpfile->file_buffer + 
GET_UINT(hlpfile->file_buffer, 4),
name, comp_FindSubFile);
+if (!ptr)
+{   /* Subfiles with bitmap images are usually prefixed with '|', but 
sometimes not.
+   Unfortunately, there is no consensus among different pieces of 
unofficial
+   documentation. So remove leading '|' and try again. */
+CHAR c = *name++;
+if (c == '|')
+{
+WINE_TRACE("not found. try %s\n", debugstr_a(name));
+ptr = HLPFILE_BPTreeSearch(hlpfile->file_buffer + 
GET_UINT(hlpfile->file_buffer, 4),
+   name, comp_FindSubFile);
+}
+}
 if (!ptr) return FALSE;
 *subbuf = hlpfile->file_buffer + GET_UINT(ptr, strlen(name)+1);
 if (*subbuf >= 

[ros-diffs] [hbelusca] 71535: [EXPLORER]: Also, sending direct WM_CLOSE messages to the traybar should not close it but instead popup the shutdown dialog. Addendum to r71533. CORE-4351 CORE-8864

2016-06-05 Thread hbelusca
Author: hbelusca
Date: Sun Jun  5 14:29:28 2016
New Revision: 71535

URL: http://svn.reactos.org/svn/reactos?rev=71535=rev
Log:
[EXPLORER]: Also, sending direct WM_CLOSE messages to the traybar should not 
close it but instead popup the shutdown dialog. Addendum to r71533.
CORE-4351 CORE-8864

Modified:
trunk/reactos/base/shell/explorer/traywnd.cpp

Modified: trunk/reactos/base/shell/explorer/traywnd.cpp
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/traywnd.cpp?rev=71535=71534=71535=diff
==
--- trunk/reactos/base/shell/explorer/traywnd.cpp   [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/traywnd.cpp   [iso-8859-1] Sun Jun  5 
14:29:28 2016
@@ -2610,9 +2610,10 @@
 
 LRESULT OnDoExitWindows(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& 
bHandled)
 {
-/* 
+/*
  * TWM_DOEXITWINDOWS is send by the CDesktopBrowser to us
- * to show the shutdown dialog.
+ * to show the shutdown dialog. Also a WM_CLOSE message sent
+ * by apps should show the dialog.
  */
 return DoExitWindows();
 }
@@ -2868,6 +2869,7 @@
 MESSAGE_HANDLER(WM_APP_TRAYDESTROY, OnAppTrayDestroy)
 MESSAGE_HANDLER(TWM_OPENSTARTMENU, OnOpenStartMenu)
 MESSAGE_HANDLER(TWM_DOEXITWINDOWS, OnDoExitWindows)
+MESSAGE_HANDLER(WM_CLOSE, OnDoExitWindows)
 MESSAGE_HANDLER(WM_HOTKEY, OnHotkey)
 ALT_MSG_MAP(1)
 END_MSG_MAP()




[ros-diffs] [hbelusca] 71533: [SHELL32]: In some rare cases, pressing Alt-F4 in ReactOS when the desktop was on focus, just removed the desktop icons. The underlying "progman" window was indeed killed

2016-06-05 Thread hbelusca
Author: hbelusca
Date: Sun Jun  5 14:10:14 2016
New Revision: 71533

URL: http://svn.reactos.org/svn/reactos?rev=71533=rev
Log:
[SHELL32]: In some rare cases, pressing Alt-F4 in ReactOS when the desktop was 
on focus, just removed the desktop icons. The underlying "progman" window was 
indeed killed. Sending a WM_CLOSE message to it should not close it directly, 
but instead prompt the user with the Shutdown dialog. Tests on Windows show 
that it's indeed the case.
This fix completes r65557.
CORE-4351 CORE-8864

Modified:
trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp

Modified: trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp?rev=71533=71532=71533=diff
==
--- trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
[iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
[iso-8859-1] Sun Jun  5 14:10:14 2016
@@ -536,6 +536,9 @@
 break;
 }
 
+case WM_CLOSE:
+return pThis->_NotifyTray(TWM_DOEXITWINDOWS, 0, 0);
+
 case WM_EXPLORER_OPEN_NEW_WINDOW:
 TRACE("Proxy Desktop message 1035 received.\n");
 SHOnCWMCommandLine((HANDLE)lParam);




[ros-diffs] [hbelusca] 71532: [SHELL32]: Experiments on Win2k3 reveal that the shell_defview window can be moved if the desktop workarea rectangle changes of size and origin.

2016-06-05 Thread hbelusca
Author: hbelusca
Date: Sun Jun  5 13:17:55 2016
New Revision: 71532

URL: http://svn.reactos.org/svn/reactos?rev=71532=rev
Log:
[SHELL32]: Experiments on Win2k3 reveal that the shell_defview window can be 
moved if the desktop workarea rectangle changes of size and origin.

Modified:
trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp

Modified: trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp?rev=71532=71531=71532=diff
==
--- trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
[iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
[iso-8859-1] Sun Jun  5 13:17:55 2016
@@ -498,7 +498,7 @@
  rcWorkArea.left, rcWorkArea.top,
  rcWorkArea.right - rcWorkArea.left,
  rcWorkArea.bottom - rcWorkArea.top,
- SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER | 
SWP_NOOWNERZORDER);
+ SWP_NOACTIVATE | SWP_NOZORDER | 
SWP_NOOWNERZORDER);
 }
 break;
 }




[ros-diffs] [hbelusca] 71531: [SHELL32] - Use #ifdef __REACTOS__ instead of the #if (as done elsewhere in the code). - The listview control hosted in a shelldll_defview has its caption named "FolderVi

2016-06-05 Thread hbelusca
Author: hbelusca
Date: Sun Jun  5 13:15:36 2016
New Revision: 71531

URL: http://svn.reactos.org/svn/reactos?rev=71531=rev
Log:
[SHELL32]
- Use #ifdef __REACTOS__ instead of the #if (as done elsewhere in the code).
- The listview control hosted in a shelldll_defview has its caption named 
"FolderView".

Modified:
trunk/reactos/dll/win32/shell32/CDefView.cpp
trunk/reactos/dll/win32/shell32/wine/control.c

Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView.cpp?rev=71531=71530=71531=diff
==
--- trunk/reactos/dll/win32/shell32/CDefView.cpp[iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CDefView.cpp[iso-8859-1] Sun Jun  5 
13:15:36 2016
@@ -558,7 +558,7 @@
 dwExStyle &= ~WS_EX_CLIENTEDGE;
 
 RECT rcListView = {0,0,0,0};
-m_ListView.Create(m_hWnd, rcListView, NULL,dwStyle, dwExStyle, 
ID_LISTVIEW);
+m_ListView.Create(m_hWnd, rcListView, L"FolderView", dwStyle, dwExStyle, 
ID_LISTVIEW);
 
 if (!m_ListView)
 return FALSE;

Modified: trunk/reactos/dll/win32/shell32/wine/control.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/wine/control.c?rev=71531=71530=71531=diff
==
--- trunk/reactos/dll/win32/shell32/wine/control.c  [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/wine/control.c  [iso-8859-1] Sun Jun  5 
13:15:36 2016
@@ -112,7 +112,7 @@
*/
applet->proc(hWnd, CPL_INQUIRE, i, (LPARAM));
applet->info[i].data = info.lData;
-#if __REACTOS__
+#ifdef __REACTOS__
applet->info[i].idIcon = info.idIcon;
 #endif
 




[ros-diffs] [apriyadarshi] 71530: Added INF File for driver installation with minimal configuration. Device Detection and Initialization working -- tested on VMware. StorPortAllocatePool not working,

2016-06-05 Thread apriyadarshi
Author: apriyadarshi
Date: Sun Jun  5 12:40:49 2016
New Revision: 71530

URL: http://svn.reactos.org/svn/reactos?rev=71530=rev
Log:
Added INF File for driver installation with minimal configuration.
Device Detection and Initialization working -- tested on VMware.
StorPortAllocatePool not working, so asked Storport to allocate all memory just 
after loading up the driver -- Bad idea (will change it later).

Added:
branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.inf
Modified:
branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c
branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.h

Modified: branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c
URL: 
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c?rev=71530=71529=71530=diff
==
--- branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c [iso-8859-1] 
(original)
+++ branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.c [iso-8859-1] 
Sun Jun  5 12:40:49 2016
@@ -99,6 +99,7 @@
 portCount++;
 portImplemented &= (portImplemented-1);
 }
+StorPortDebugPrint(0, "\tPort Count: %d\n", portCount);
 
 nonCachedExtensionSize =sizeof(AHCI_COMMAND_HEADER) * AlignedNCS + 
//should be 1K aligned
 sizeof(AHCI_RECEIVED_FIS);
@@ -118,6 +119,8 @@
 
 
 // allocate memory for port extension
+/* --> Allocate memory for port extension, but right now it is returning 
STOR_STATUS_NOT_IMPLEMENTED
+so, for testing purpose, I allocated during driver entry itself.
 status = StorPortAllocatePool(
 adapterExtension, 
 portCount * sizeof(AHCI_PORT_EXTENSION),
@@ -125,24 +128,24 @@
 (PVOID*));
 
 if (status != STOR_STATUS_SUCCESS){
-StorPortDebugPrint(0, "\tstatus != STOR_STATUS_SUCCESS\n");
+StorPortDebugPrint(0, "\tstatus : %x\n", status);
 return FALSE;
 }
 
 AhciZeroMemory((PCHAR)portsExtension, portCount * 
sizeof(AHCI_PORT_EXTENSION));
-
+*/
 nonCachedExtensionSize /= portCount;
 currentCount = 0;
 for (index = 0; index < 32; index++)
 {
 if ((adapterExtension->PortImplemented & (1<PortExtension[index] = 
(PAHCI_PORT_EXTENSION)((PCHAR)portsExtension + sizeof(AHCI_PORT_EXTENSION) * 
currentCount);
-
-adapterExtension->PortExtension[index]->PortNumber = index;
-adapterExtension->PortExtension[index]->AdapterExtension = 
adapterExtension;
-adapterExtension->PortExtension[index]->CommandList = 
(PAHCI_COMMAND_HEADER)(nonCachedExtension + 
(currentCount*nonCachedExtensionSize));
-adapterExtension->PortExtension[index]->ReceivedFIS = 
(PAHCI_RECEIVED_FIS)((PCHAR)adapterExtension->PortExtension[index]->CommandList 
+ sizeof(AHCI_COMMAND_HEADER) * AlignedNCS);
+//adapterExtension->PortExtension[index] = 
(PAHCI_PORT_EXTENSION)((PCHAR)portsExtension + sizeof(AHCI_PORT_EXTENSION) * 
currentCount);
+
+adapterExtension->PortExtension[index].PortNumber = index;
+adapterExtension->PortExtension[index].AdapterExtension = 
adapterExtension;
+adapterExtension->PortExtension[index].CommandList = 
(PAHCI_COMMAND_HEADER)(nonCachedExtension + 
(currentCount*nonCachedExtensionSize));
+adapterExtension->PortExtension[index].ReceivedFIS = 
(PAHCI_RECEIVED_FIS)((PCHAR)adapterExtension->PortExtension[index].CommandList 
+ sizeof(AHCI_COMMAND_HEADER) * AlignedNCS);
 currentCount++;
 }
 }
@@ -401,6 +404,10 @@
 ConfigInfo->SynchronizationModel = StorSynchronizeFullDuplex;
 ConfigInfo->ScatterGather = TRUE;
 
+// Turn IE -- Interrupt Enabled
+ghc |= 0x2;
+StorPortWriteRegisterUlong(adapterExtension, >GHC, ghc);
+
 // allocate necessary resource for each port
 if (!AhciAllocateResourceForAdapter(adapterExtension, ConfigInfo)){
 StorPortDebugPrint(0, "\tAhciAllocateResourceForAdapter() == FALSE\n");
@@ -410,12 +417,8 @@
 for (index = 0; index < 32; index++)
 {
 if ((adapterExtension->PortImplemented & (1<PortExtension[index]);
-}
-
-// Turn IE -- Interrupt Enabled
-ghc |= 0x2;
-StorPortWriteRegisterUlong(adapterExtension, >GHC, ghc);
+AhciPortInitialize(>PortExtension[index]);
+}
 
 return SP_RETURN_FOUND;
 }// -- AhciHwFindAdapter();
@@ -475,7 +478,7 @@
 RegistryPath,
 ,
 NULL);
-StorPortDebugPrint(0, "\tstatus:%d\n", status);
+StorPortDebugPrint(0, "\tstatus:%x\n", status);
 return status;
 }// -- DriverEntry();
 

Modified: branches/GSoC_2016/AHCI/drivers/storage/storahci/storahci.h
URL: 

[ros-diffs] [mjansen] 71529: [WIN32SS] Remember the last process that changed the displaymode with CDS_FULLSCREEN, restore mode after it quits. CORE-11358 #resolve

2016-06-05 Thread mjansen
Author: mjansen
Date: Sun Jun  5 11:16:02 2016
New Revision: 71529

URL: http://svn.reactos.org/svn/reactos?rev=71529=rev
Log:
[WIN32SS] Remember the last process that changed the displaymode with 
CDS_FULLSCREEN, restore mode after it quits. CORE-11358 #resolve

Modified:
trunk/reactos/win32ss/user/ntuser/display.c
trunk/reactos/win32ss/user/ntuser/main.c

Modified: trunk/reactos/win32ss/user/ntuser/display.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/display.c?rev=71529=71528=71529=diff
==
--- trunk/reactos/win32ss/user/ntuser/display.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/display.c [iso-8859-1] Sun Jun  5 
11:16:02 2016
@@ -10,6 +10,7 @@
 DBG_DEFAULT_CHANNEL(UserDisplay);
 
 BOOL gbBaseVideo = 0;
+static PPROCESSINFO gpFullscreen = NULL;
 
 static const PWCHAR KEY_VIDEO = 
L"\\Registry\\Machine\\HARDWARE\\DEVICEMAP\\VIDEO";
 
@@ -650,6 +651,16 @@
 return Status;
 }
 
+VOID
+UserUpdateFullscreen(
+DWORD flags)
+{
+if (flags & CDS_FULLSCREEN)
+gpFullscreen = gptiCurrent->ppi;
+else
+gpFullscreen = NULL;
+}
+
 LONG
 APIENTRY
 UserChangeDisplaySettings(
@@ -773,6 +784,8 @@
 
 goto leave;
 }
+
+UserUpdateFullscreen(flags);
 
 /* Update the system metrics */
 InitMetrics();
@@ -809,6 +822,18 @@
 return lResult;
 }
 
+VOID
+UserDisplayNotifyShutdown(
+PPROCESSINFO ppiCurrent)
+{
+if (ppiCurrent == gpFullscreen)
+{
+UserChangeDisplaySettings(NULL, NULL, 0, NULL);
+if (gpFullscreen)
+ERR("Failed to restore display mode!\n");
+}
+}
+
 LONG
 APIENTRY
 NtUserChangeDisplaySettings(

Modified: trunk/reactos/win32ss/user/ntuser/main.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/main.c?rev=71529=71528=71529=diff
==
--- trunk/reactos/win32ss/user/ntuser/main.c[iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/main.c[iso-8859-1] Sun Jun  5 
11:16:02 2016
@@ -677,6 +677,9 @@
 return Status;
 }
 
+VOID
+UserDisplayNotifyShutdown(PPROCESSINFO ppiCurrent);
+
 NTSTATUS
 NTAPI
 ExitThreadCallback(PETHREAD Thread)
@@ -805,6 +808,11 @@
 
gptiForeground = NULL;
 }
+
+/* Restore display mode when we are the last thread, and we changed the 
display mode */
+if (ppiCurrent->cThreads == 0)
+UserDisplayNotifyShutdown(ppiCurrent);
+
 
 // Fixes CORE-6384 & CORE-7030.
 /*if (ptiLastInput == ptiCurrent)




[ros-diffs] [pschweitzer] 71528: |SHELL32] Don't blindly delete notification item while there are still ongoing user APC. To do so, we use reference count, and attempt to release in various places: af

2016-06-05 Thread pschweitzer
Author: pschweitzer
Date: Sun Jun  5 09:26:00 2016
New Revision: 71528

URL: http://svn.reactos.org/svn/reactos?rev=71528=rev
Log:
|SHELL32]
Don't blindly delete notification item while there are still ongoing user APC.
To do so, we use reference count, and attempt to release in various places: 
after APC ended, and on notification unregistration.
This avoids race condition with item between usage and freeing and thus 
use-afree-free (leading to explorer crash) while browsing rapidly accross 
directories.

CORE-10941 #resolve

Modified:
trunk/reactos/dll/win32/shell32/wine/changenotify.c

Modified: trunk/reactos/dll/win32/shell32/wine/changenotify.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/wine/changenotify.c?rev=71528=71527=71528=diff
==
--- trunk/reactos/dll/win32/shell32/wine/changenotify.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/wine/changenotify.c [iso-8859-1] Sun Jun  5 
09:26:00 2016
@@ -58,6 +58,7 @@
 OVERLAPPED overlapped; /* Overlapped structure */
 BYTE *buffer; /* Async buffer to fill */
 BYTE *backBuffer; /* Back buffer to swap buffer into */
+struct _NOTIFICATIONLIST * pParent;
 } SHChangeNotifyEntryInternal, *LPNOTIFYREGISTER;
 #else
 typedef SHChangeNotifyEntry *LPNOTIFYREGISTER;
@@ -74,6 +75,9 @@
LONG wEventMask;/* subscribed events */
DWORD dwFlags;  /* client flags */
ULONG id;
+#ifdef __REACTOS__
+volatile LONG wQueuedCount;
+#endif
 } NOTIFICATIONLIST, *LPNOTIFICATIONLIST;
 
 #ifdef __REACTOS__
@@ -156,8 +160,21 @@
 static void DeleteNode(LPNOTIFICATIONLIST item)
 {
 UINT i;
+#ifdef __REACTOS__
+LONG queued;
+#endif
 
 TRACE("item=%p\n", item);
+
+#ifdef __REACTOS__
+queued = InterlockedCompareExchange(>wQueuedCount, 0, 0);
+if (queued != 0)
+{
+TRACE("Not freeing, still %d queued events\n", queued);
+return;
+}
+TRACE("Freeing for real!\n");
+#endif
 
 /* remove item from list */
 list_remove( >entry );
@@ -235,6 +252,7 @@
 item->cidl = cItems;
 #ifdef __REACTOS__
 item->apidl = SHAlloc(sizeof(SHChangeNotifyEntryInternal) * cItems);
+item->wQueuedCount = 0;
 #else
 item->apidl = SHAlloc(sizeof(SHChangeNotifyEntry) * cItems);
 #endif
@@ -249,11 +267,15 @@
 item->apidl[i].buffer = SHAlloc(BUFFER_SIZE);
 item->apidl[i].backBuffer = SHAlloc(BUFFER_SIZE);
 item->apidl[i].overlapped.hEvent = >apidl[i];
+item->apidl[i].pParent = item;
 
 if (fSources & SHCNRF_InterruptLevel)
 {
 if (_OpenDirectory( >apidl[i] ))
+{
+InterlockedIncrement(>wQueuedCount);
 QueueUserAPC( _AddDirectoryProc, m_hThread, (ULONG_PTR) 
>apidl[i] );
+}
 else
 {
 CHAR buffer[MAX_PATH];
@@ -714,7 +736,11 @@
item->pidl,
NULL);
 
+#ifdef __REACTOS__
+goto quit;
+#else
 return;
+#endif
 }
 
 /*
@@ -731,12 +757,21 @@
 _BeginRead(item);
 
 _ProcessNotification(item);
+
+#ifdef __REACTOS__
+quit:
+InterlockedDecrement(>pParent->wQueuedCount);
+DeleteNode(item->pParent);
+#endif
 }
 
 static VOID _BeginRead(LPNOTIFYREGISTER item )
 {
 TRACE("_BeginRead %p \n", item->hDirectory);
 
+#ifdef __REACTOS__
+InterlockedIncrement(>pParent->wQueuedCount);
+#endif
 /* This call needs to be reissued after every APC. */
 if (!ReadDirectoryChangesW(item->hDirectory, // handle to directory
item->buffer, // read results buffer
@@ -746,12 +781,20 @@
NULL, // bytes returned
>overlapped, // overlapped buffer
_NotificationCompletion)) // completion routine
+#ifdef __REACTOS__
+{
+#endif
 ERR("ReadDirectoryChangesW failed. (%p, %p, %p, %p) Code: %u \n",
 item->hDirectory,
 item->buffer,
 >overlapped,
 _NotificationCompletion,
 GetLastError());
+#ifdef __REACTOS__
+InterlockedDecrement(>pParent->wQueuedCount);
+DeleteNode(item->pParent);
+}
+#endif
 }
 
 DWORD _MapAction(DWORD dwAction, BOOL isDir)




[ros-diffs] [dquintana] 71527: [SHELL32] Sorry, I'm still half asleep. I did need functional changes.

2016-06-05 Thread dquintana
Author: dquintana
Date: Sun Jun  5 09:06:33 2016
New Revision: 71527

URL: http://svn.reactos.org/svn/reactos?rev=71527=rev
Log:
[SHELL32]
Sorry, I'm still half asleep. I did need functional changes.

Modified:
trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp

Modified: trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp?rev=71527=71526=71527=diff
==
--- trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
[iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
[iso-8859-1] Sun Jun  5 09:06:33 2016
@@ -584,7 +584,7 @@
 HANDLE WINAPI SHCreateDesktop(IShellDesktopTray *ShellDesk)
 {
 HWND hWndDesk;
-DWORD x, y, cx, cy;
+int x, y, cx, cy;
 
 if (ShellDesk == NULL)
 {
@@ -603,9 +603,9 @@
 cx = GetSystemMetrics(SM_CXVIRTUALSCREEN);
 cy = GetSystemMetrics(SM_CYVIRTUALSCREEN);
 
-if (IsRectEmpty())
-{
-x = rcDesk.top = 0;
+if (!cx || !cy)
+{
+x = y = 0;
 cx = GetSystemMetrics(SM_CXSCREEN);
 cy = GetSystemMetrics(SM_CYSCREEN);
 }




[ros-diffs] [dquintana] 71526: [SHELL32] Replace confusing usage of RECT with some actual variables. No functional changes.

2016-06-05 Thread dquintana
Author: dquintana
Date: Sun Jun  5 08:56:57 2016
New Revision: 71526

URL: http://svn.reactos.org/svn/reactos?rev=71526=rev
Log:
[SHELL32]
Replace confusing usage of RECT with some actual variables. No functional 
changes.

Modified:
trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp

Modified: trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp?rev=71526=71525=71526=diff
==
--- trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
[iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
[iso-8859-1] Sun Jun  5 08:56:57 2016
@@ -584,7 +584,7 @@
 HANDLE WINAPI SHCreateDesktop(IShellDesktopTray *ShellDesk)
 {
 HWND hWndDesk;
-RECT rcDesk;
+DWORD x, y, cx, cy;
 
 if (ShellDesk == NULL)
 {
@@ -598,21 +598,21 @@
 return NULL;
 }
 
-rcDesk.left   = GetSystemMetrics(SM_XVIRTUALSCREEN);
-rcDesk.top= GetSystemMetrics(SM_YVIRTUALSCREEN);
-rcDesk.right  = GetSystemMetrics(SM_CXVIRTUALSCREEN);
-rcDesk.bottom = GetSystemMetrics(SM_CYVIRTUALSCREEN);
+x  = GetSystemMetrics(SM_XVIRTUALSCREEN);
+y  = GetSystemMetrics(SM_YVIRTUALSCREEN);
+cx = GetSystemMetrics(SM_CXVIRTUALSCREEN);
+cy = GetSystemMetrics(SM_CYVIRTUALSCREEN);
 
 if (IsRectEmpty())
 {
-rcDesk.left = rcDesk.top = 0;
-rcDesk.right  = GetSystemMetrics(SM_CXSCREEN);
-rcDesk.bottom = GetSystemMetrics(SM_CYSCREEN);
+x = rcDesk.top = 0;
+cx = GetSystemMetrics(SM_CXSCREEN);
+cy = GetSystemMetrics(SM_CYSCREEN);
 }
 
 hWndDesk = CreateWindowExW(WS_EX_TOOLWINDOW, szProgmanClassName, 
szProgmanWindowName,
 WS_POPUP | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
-rcDesk.left, rcDesk.top, rcDesk.right, rcDesk.bottom,
+x, y, cx, cy,
 NULL, NULL, shell32_hInstance, (LPVOID)ShellDesk);
 if (hWndDesk != NULL)
 return (HANDLE)GetWindowLongPtrW(hWndDesk, 0);