mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against a71128513767d44a8f42e10895578b650061bdce.
[ntdll-NtUnmapViewOfSection] Removed patch to fix behavior of UnmapViewOfFile for Win9x (accepted upstream). [shell32-FolderItems_Stub_Iface] Removed patch to implement stubbed FolderItems interface (fixed upstream).
This commit is contained in:
parent
5125d3edeb
commit
cbd440689d
@ -1,112 +0,0 @@
|
||||
From fcbd459e01f674633462156e45c77397e5af3e34 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 16 May 2016 18:50:55 +0200
|
||||
Subject: ntdll: NtUnmapViewOfSection must succeed for all offsets within the
|
||||
mapped range.
|
||||
|
||||
---
|
||||
dlls/kernel32/tests/virtual.c | 27 ++++++++++++++++++++++++++-
|
||||
dlls/ntdll/tests/info.c | 6 +++---
|
||||
dlls/ntdll/virtual.c | 3 +--
|
||||
3 files changed, 30 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c
|
||||
index 37206b5..552cbb4 100644
|
||||
--- a/dlls/kernel32/tests/virtual.c
|
||||
+++ b/dlls/kernel32/tests/virtual.c
|
||||
@@ -435,7 +435,7 @@ static void test_MapViewOfFile(void)
|
||||
SetLastError(0xdeadbeef);
|
||||
file = CreateFileA( testfile, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 );
|
||||
ok( file != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError() );
|
||||
- SetFilePointer( file, 4096, NULL, FILE_BEGIN );
|
||||
+ SetFilePointer( file, 12288, NULL, FILE_BEGIN );
|
||||
SetEndOfFile( file );
|
||||
|
||||
/* read/write mapping */
|
||||
@@ -994,6 +994,31 @@ static void test_MapViewOfFile(void)
|
||||
ok(info.State == MEM_FREE, "%#x != MEM_FREE\n", info.State);
|
||||
ok(info.Type == 0, "%#x != 0\n", info.Type);
|
||||
|
||||
+ mapping = CreateFileMappingA( file, NULL, PAGE_READONLY, 0, 12288, NULL );
|
||||
+ ok( mapping != 0, "CreateFileMappingA failed with error %u\n", GetLastError() );
|
||||
+
|
||||
+ ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 12288 );
|
||||
+ ok( ptr != NULL, "MapViewOfFile failed with error %u\n", GetLastError() );
|
||||
+
|
||||
+ ret = UnmapViewOfFile( (char *)ptr + 100 );
|
||||
+ ok( ret, "UnmapViewOfFile failed with error %u\n", GetLastError() );
|
||||
+ if (!ret) UnmapViewOfFile( ptr );
|
||||
+
|
||||
+ ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 12288 );
|
||||
+ ok( ptr != NULL, "MapViewOfFile failed with error %u\n", GetLastError() );
|
||||
+
|
||||
+ ret = UnmapViewOfFile( (char *)ptr + 4096 );
|
||||
+ ok( ret, "UnmapViewOfFile failed with error %u\n", GetLastError() );
|
||||
+ if (!ret) UnmapViewOfFile( ptr );
|
||||
+
|
||||
+ ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 12288 );
|
||||
+ ok( ptr != NULL, "MapViewOfFile failed with error %u\n", GetLastError() );
|
||||
+
|
||||
+ ret = UnmapViewOfFile( (char *)ptr + 4096 + 100 );
|
||||
+ ok( ret, "UnmapViewOfFile failed with error %u\n", GetLastError() );
|
||||
+ if (!ret) UnmapViewOfFile( ptr );
|
||||
+
|
||||
+ CloseHandle(mapping);
|
||||
CloseHandle(file);
|
||||
DeleteFileA(testfile);
|
||||
}
|
||||
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
|
||||
index be355fb..19c7d66 100644
|
||||
--- a/dlls/ntdll/tests/info.c
|
||||
+++ b/dlls/ntdll/tests/info.c
|
||||
@@ -1643,7 +1643,7 @@ static void test_mapprotection(void)
|
||||
status = pNtSetInformationProcess( GetCurrentProcess(), ProcessExecuteFlags, &flags, sizeof(flags) );
|
||||
ok( (status == STATUS_SUCCESS) || (status == STATUS_INVALID_INFO_CLASS), "Expected STATUS_SUCCESS, got %08x\n", status);
|
||||
|
||||
- size.u.LowPart = 0x1000;
|
||||
+ size.u.LowPart = 0x2000;
|
||||
size.u.HighPart = 0;
|
||||
status = pNtCreateSection ( &h,
|
||||
STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ | SECTION_MAP_WRITE | SECTION_MAP_EXECUTE,
|
||||
@@ -1657,7 +1657,7 @@ static void test_mapprotection(void)
|
||||
|
||||
offset.u.LowPart = 0;
|
||||
offset.u.HighPart = 0;
|
||||
- count = 0x1000;
|
||||
+ count = 0x2000;
|
||||
addr = NULL;
|
||||
status = pNtMapViewOfSection ( h, GetCurrentProcess(), &addr, 0, 0, &offset, &count, ViewShare, 0, PAGE_READWRITE);
|
||||
ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status);
|
||||
@@ -1680,7 +1680,7 @@ static void test_mapprotection(void)
|
||||
ok( retlen == sizeof(info), "Expected STATUS_SUCCESS, got %08x\n", status);
|
||||
ok((info.Protect & ~PAGE_NOCACHE) == PAGE_READWRITE, "addr.Protect is not PAGE_READWRITE, but 0x%x\n", info.Protect);
|
||||
|
||||
- status = pNtUnmapViewOfSection (GetCurrentProcess(), addr);
|
||||
+ status = pNtUnmapViewOfSection( GetCurrentProcess(), (char *)addr + 0x1050 );
|
||||
ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status);
|
||||
pNtClose (h);
|
||||
|
||||
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
|
||||
index 5c43d26..27daf96 100644
|
||||
--- a/dlls/ntdll/virtual.c
|
||||
+++ b/dlls/ntdll/virtual.c
|
||||
@@ -2723,7 +2723,6 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
|
||||
struct file_view *view;
|
||||
NTSTATUS status = STATUS_NOT_MAPPED_VIEW;
|
||||
sigset_t sigset;
|
||||
- void *base = ROUND_ADDR( addr, page_mask );
|
||||
|
||||
if (process != NtCurrentProcess())
|
||||
{
|
||||
@@ -2740,7 +2739,7 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
|
||||
}
|
||||
|
||||
server_enter_uninterrupted_section( &csVirtual, &sigset );
|
||||
- if ((view = VIRTUAL_FindView( base, 0 )) && (base == view->base) && !(view->protect & VPROT_VALLOC))
|
||||
+ if ((view = VIRTUAL_FindView( addr, 0 )) && !(view->protect & VPROT_VALLOC))
|
||||
{
|
||||
delete_view( view );
|
||||
status = STATUS_SUCCESS;
|
||||
--
|
||||
2.8.0
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 6ca6102f0f4c52dee00013a8e1d0d924f4b6c5a7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 14 May 2016 17:21:54 +0200
|
||||
Subject: kernel32: Fail in UnmapViewOfFile on Win 9X when addr is not a base
|
||||
address of a mapping.
|
||||
|
||||
---
|
||||
dlls/kernel32/virtual.c | 14 +++++++++++++-
|
||||
1 file changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/kernel32/virtual.c b/dlls/kernel32/virtual.c
|
||||
index 32f2d65..7e9c2f3 100644
|
||||
--- a/dlls/kernel32/virtual.c
|
||||
+++ b/dlls/kernel32/virtual.c
|
||||
@@ -576,7 +576,19 @@ LPVOID WINAPI MapViewOfFileEx( HANDLE handle, DWORD access,
|
||||
*/
|
||||
BOOL WINAPI UnmapViewOfFile( LPCVOID addr )
|
||||
{
|
||||
- NTSTATUS status = NtUnmapViewOfSection( GetCurrentProcess(), (void *)addr );
|
||||
+ NTSTATUS status;
|
||||
+
|
||||
+ if (GetVersion() & 0x80000000)
|
||||
+ {
|
||||
+ MEMORY_BASIC_INFORMATION info;
|
||||
+ if (!VirtualQuery( addr, &info, sizeof(info) ) || info.AllocationBase != addr)
|
||||
+ {
|
||||
+ SetLastError( ERROR_INVALID_ADDRESS );
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ status = NtUnmapViewOfSection( GetCurrentProcess(), (void *)addr );
|
||||
if (status) SetLastError( RtlNtStatusToDosError(status) );
|
||||
return !status;
|
||||
}
|
||||
--
|
||||
2.8.0
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [2905] UnmapViewOfFile should fail on Win9x when addr is not the base address of a mapping
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "adde9fadebe07c30ecc9f12685751fb78b3473c5"
|
||||
echo "a71128513767d44a8f42e10895578b650061bdce"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -220,7 +220,6 @@ patch_enable_all ()
|
||||
enable_ntdll_NtQueryEaFile="$1"
|
||||
enable_ntdll_NtQuerySection="$1"
|
||||
enable_ntdll_NtSetLdtEntries="$1"
|
||||
enable_ntdll_NtUnmapViewOfSection="$1"
|
||||
enable_ntdll_OSX_TEB_x86_64="$1"
|
||||
enable_ntdll_Pipe_SpecialCharacters="$1"
|
||||
enable_ntdll_ProcessQuotaLimits="$1"
|
||||
@ -298,7 +297,6 @@ patch_enable_all ()
|
||||
enable_shell32_Context_Menu="$1"
|
||||
enable_shell32_Default_Path="$1"
|
||||
enable_shell32_File_Property_Dialog="$1"
|
||||
enable_shell32_FolderItems_Stub_Iface="$1"
|
||||
enable_shell32_IDragSourceHelper="$1"
|
||||
enable_shell32_Icons="$1"
|
||||
enable_shell32_Microsoft_Windows_Themes="$1"
|
||||
@ -835,9 +833,6 @@ patch_enable ()
|
||||
ntdll-NtSetLdtEntries)
|
||||
enable_ntdll_NtSetLdtEntries="$2"
|
||||
;;
|
||||
ntdll-NtUnmapViewOfSection)
|
||||
enable_ntdll_NtUnmapViewOfSection="$2"
|
||||
;;
|
||||
ntdll-OSX_TEB_x86_64)
|
||||
enable_ntdll_OSX_TEB_x86_64="$2"
|
||||
;;
|
||||
@ -1069,9 +1064,6 @@ patch_enable ()
|
||||
shell32-File_Property_Dialog)
|
||||
enable_shell32_File_Property_Dialog="$2"
|
||||
;;
|
||||
shell32-FolderItems_Stub_Iface)
|
||||
enable_shell32_FolderItems_Stub_Iface="$2"
|
||||
;;
|
||||
shell32-IDragSourceHelper)
|
||||
enable_shell32_IDragSourceHelper="$2"
|
||||
;;
|
||||
@ -4966,23 +4958,6 @@ if test "$enable_ntdll_NtSetLdtEntries" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-NtUnmapViewOfSection
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#2905] UnmapViewOfFile should fail on Win9x when addr is not the base address of a mapping
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/kernel32/tests/virtual.c, dlls/kernel32/virtual.c, dlls/ntdll/tests/info.c, dlls/ntdll/virtual.c
|
||||
# |
|
||||
if test "$enable_ntdll_NtUnmapViewOfSection" -eq 1; then
|
||||
patch_apply ntdll-NtUnmapViewOfSection/0001-ntdll-NtUnmapViewOfSection-must-succeed-for-all-offs.patch
|
||||
patch_apply ntdll-NtUnmapViewOfSection/0002-kernel32-Fail-in-UnmapViewOfFile-on-Win-9X-when-addr.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "ntdll: NtUnmapViewOfSection must succeed for all offsets within the mapped range.", 1 },';
|
||||
echo '+ { "Michael Müller", "kernel32: Fail in UnmapViewOfFile on Win 9X when addr is not a base address of a mapping.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-OSX_TEB_x86_64
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -6196,18 +6171,6 @@ if test "$enable_shell32_File_Property_Dialog" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset shell32-FolderItems_Stub_Iface
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/shell32/shell32_main.h, dlls/shell32/shelldispatch.c
|
||||
# |
|
||||
if test "$enable_shell32_FolderItems_Stub_Iface" -eq 1; then
|
||||
patch_apply shell32-FolderItems_Stub_Iface/0001-shell32-Implement-FolterImpl_Items-and-stubbed-Folde.patch
|
||||
(
|
||||
echo '+ { "Christian Costa", "shell32: Implement FolderImpl_Items and stubbed FolderItems interface.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset shell32-IDragSourceHelper
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -1,290 +0,0 @@
|
||||
From 668d55704db4f9ccbc91cf38eaa912448305e285 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Thu, 3 Sep 2015 12:08:54 -0300
|
||||
Subject: shell32: Implement FolderImpl_Items and stubbed FolderItems
|
||||
interface.
|
||||
|
||||
---
|
||||
dlls/shell32/shell32_main.h | 1 +
|
||||
dlls/shell32/shelldispatch.c | 224 ++++++++++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 222 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h
|
||||
index 492f79f..9142681 100644
|
||||
--- a/dlls/shell32/shell32_main.h
|
||||
+++ b/dlls/shell32/shell32_main.h
|
||||
@@ -235,6 +235,7 @@ enum tid_t {
|
||||
IShellFolderViewDual3_tid,
|
||||
Folder3_tid,
|
||||
FolderItem2_tid,
|
||||
+ FolderItems_tid,
|
||||
FolderItemVerb_tid,
|
||||
FolderItemVerbs_tid,
|
||||
LAST_tid
|
||||
diff --git a/dlls/shell32/shelldispatch.c b/dlls/shell32/shelldispatch.c
|
||||
index f5eca28..130047a 100644
|
||||
--- a/dlls/shell32/shelldispatch.c
|
||||
+++ b/dlls/shell32/shelldispatch.c
|
||||
@@ -48,6 +48,7 @@ static const IID * const tid_ids[] =
|
||||
&IID_IShellFolderViewDual3,
|
||||
&IID_Folder3,
|
||||
&IID_FolderItem2,
|
||||
+ &IID_FolderItems,
|
||||
&IID_FolderItemVerb,
|
||||
&IID_FolderItemVerbs
|
||||
};
|
||||
@@ -71,6 +72,12 @@ typedef struct {
|
||||
} FolderItemImpl;
|
||||
|
||||
typedef struct {
|
||||
+ FolderItems FolderItems_iface;
|
||||
+ LONG ref;
|
||||
+ VARIANT dir;
|
||||
+} FolderItemsImpl;
|
||||
+
|
||||
+typedef struct {
|
||||
FolderItemVerbs FolderItemVerbs_iface;
|
||||
LONG ref;
|
||||
|
||||
@@ -102,6 +109,11 @@ static inline FolderItemImpl *impl_from_FolderItem(FolderItem2 *iface)
|
||||
return CONTAINING_RECORD(iface, FolderItemImpl, FolderItem2_iface);
|
||||
}
|
||||
|
||||
+static inline FolderItemsImpl *impl_from_FolderItems(FolderItems *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, FolderItemsImpl, FolderItems_iface);
|
||||
+}
|
||||
+
|
||||
static inline FolderItemVerbsImpl *impl_from_FolderItemVerbs(FolderItemVerbs *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, FolderItemVerbsImpl, FolderItemVerbs_iface);
|
||||
@@ -939,6 +951,211 @@ static HRESULT FolderItem_Constructor(VARIANT *dir, FolderItem **ppfi)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static HRESULT WINAPI FolderItemsImpl_QueryInterface(FolderItems *iface,
|
||||
+ REFIID riid, LPVOID *ppv)
|
||||
+{
|
||||
+ FolderItemsImpl *This = impl_from_FolderItems(iface);
|
||||
+
|
||||
+ TRACE("(%p,%p,%p)\n", iface, riid, ppv);
|
||||
+
|
||||
+ if (!ppv) return E_INVALIDARG;
|
||||
+
|
||||
+ if (IsEqualIID(&IID_IUnknown, riid) ||
|
||||
+ IsEqualIID(&IID_IDispatch, riid) ||
|
||||
+ IsEqualIID(&IID_FolderItems, riid))
|
||||
+ *ppv = &This->FolderItems_iface;
|
||||
+ else
|
||||
+ {
|
||||
+ FIXME("not implemented for %s\n", shdebugstr_guid(riid));
|
||||
+ *ppv = NULL;
|
||||
+ return E_NOINTERFACE;
|
||||
+ }
|
||||
+ IUnknown_AddRef((IUnknown*)*ppv);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI FolderItemsImpl_AddRef(FolderItems *iface)
|
||||
+{
|
||||
+ FolderItemsImpl *This = impl_from_FolderItems(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p), new refcount=%i\n", iface, ref);
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI FolderItemsImpl_Release(FolderItems *iface)
|
||||
+{
|
||||
+ FolderItemsImpl *This = impl_from_FolderItems(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p), new refcount=%i\n", iface, ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ VariantClear(&This->dir);
|
||||
+ HeapFree(GetProcessHeap(), 0, This);
|
||||
+ }
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI FolderItemsImpl_GetTypeInfoCount(FolderItems *iface,
|
||||
+ UINT *pctinfo)
|
||||
+{
|
||||
+ TRACE("(%p,%p)\n", iface, pctinfo);
|
||||
+
|
||||
+ *pctinfo = 1;
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI FolderItemsImpl_GetTypeInfo(FolderItems *iface, UINT iTInfo,
|
||||
+ LCID lcid, ITypeInfo **ppTInfo)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ TRACE("(%p,%u,%d,%p)\n", iface, iTInfo, lcid, ppTInfo);
|
||||
+
|
||||
+ hr = get_typeinfo(FolderItems_tid, ppTInfo);
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ ITypeInfo_AddRef(*ppTInfo);
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI FolderItemsImpl_GetIDsOfNames(FolderItems *iface,
|
||||
+ REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid,
|
||||
+ DISPID *rgDispId)
|
||||
+{
|
||||
+ ITypeInfo *ti;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ TRACE("(%p,%p,%p,%u,%d,%p)\n", iface, riid, rgszNames, cNames, lcid,
|
||||
+ rgDispId);
|
||||
+
|
||||
+ hr = get_typeinfo(FolderItems_tid, &ti);
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ hr = ITypeInfo_GetIDsOfNames(ti, rgszNames, cNames, rgDispId);
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI FolderItemsImpl_Invoke(FolderItems *iface,
|
||||
+ DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags,
|
||||
+ DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo,
|
||||
+ UINT *puArgErr)
|
||||
+{
|
||||
+ FolderItemsImpl *This = impl_from_FolderItems(iface);
|
||||
+ ITypeInfo *ti;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ TRACE("(%p,%d,%p,%d,%u,%p,%p,%p,%p)\n", iface, dispIdMember, riid, lcid,
|
||||
+ wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||
+
|
||||
+ hr = get_typeinfo(FolderItems_tid, &ti);
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ hr = ITypeInfo_Invoke(ti, This, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI FolderItemsImpl_get_Count(FolderItems *iface, LONG *plCount)
|
||||
+{
|
||||
+ FIXME("(%p,%p): stub\n", iface, plCount);
|
||||
+
|
||||
+ if (!plCount)
|
||||
+ return E_POINTER;
|
||||
+
|
||||
+ *plCount = 0;
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI FolderItemsImpl_get_Application(FolderItems *iface, IDispatch **ppid)
|
||||
+{
|
||||
+ FIXME("(%p,%p): stub\n", iface, ppid);
|
||||
+
|
||||
+ if (!ppid)
|
||||
+ return E_POINTER;
|
||||
+
|
||||
+ *ppid = NULL;
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI FolderItemsImpl_get_Parent(FolderItems *iface, IDispatch **ppid)
|
||||
+{
|
||||
+ FIXME("(%p,%p): stub\n", iface, ppid);
|
||||
+
|
||||
+ if (!ppid)
|
||||
+ return E_POINTER;
|
||||
+
|
||||
+ *ppid = NULL;
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI FolderItemsImpl_Item(FolderItems *iface, VARIANT index, FolderItem **ppid)
|
||||
+{
|
||||
+ FIXME("(%p,%s,%p): stub\n", iface, debugstr_variant(&index), ppid);
|
||||
+
|
||||
+ if (!ppid)
|
||||
+ return E_POINTER;
|
||||
+
|
||||
+ *ppid = NULL;
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI FolderItemsImpl__NewEnum(FolderItems *iface, IUnknown **ppunk)
|
||||
+{
|
||||
+ FIXME("(%p,%p): stub\n", iface, ppunk);
|
||||
+
|
||||
+ if (!ppunk)
|
||||
+ return E_POINTER;
|
||||
+
|
||||
+ *ppunk = NULL;
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const FolderItemsVtbl FolderItemsImpl_Vtbl = {
|
||||
+ FolderItemsImpl_QueryInterface,
|
||||
+ FolderItemsImpl_AddRef,
|
||||
+ FolderItemsImpl_Release,
|
||||
+ FolderItemsImpl_GetTypeInfoCount,
|
||||
+ FolderItemsImpl_GetTypeInfo,
|
||||
+ FolderItemsImpl_GetIDsOfNames,
|
||||
+ FolderItemsImpl_Invoke,
|
||||
+ FolderItemsImpl_get_Count,
|
||||
+ FolderItemsImpl_get_Application,
|
||||
+ FolderItemsImpl_get_Parent,
|
||||
+ FolderItemsImpl_Item,
|
||||
+ FolderItemsImpl__NewEnum
|
||||
+};
|
||||
+
|
||||
+static HRESULT FolderItems_Constructor(VARIANT *dir, FolderItems **ppfi)
|
||||
+{
|
||||
+ FolderItemsImpl *This;
|
||||
+ HRESULT ret;
|
||||
+
|
||||
+ TRACE("%s\n", debugstr_variant(dir));
|
||||
+
|
||||
+ *ppfi = NULL;
|
||||
+
|
||||
+ This = HeapAlloc(GetProcessHeap(), 0, sizeof(FolderItemsImpl));
|
||||
+ if (!This) return E_OUTOFMEMORY;
|
||||
+ This->FolderItems_iface.lpVtbl = &FolderItemsImpl_Vtbl;
|
||||
+ This->ref = 1;
|
||||
+
|
||||
+ VariantInit(&This->dir);
|
||||
+ ret = VariantCopy(&This->dir, dir);
|
||||
+ if (FAILED(ret))
|
||||
+ {
|
||||
+ HeapFree(GetProcessHeap(), 0, This);
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ }
|
||||
+
|
||||
+ *ppfi = (FolderItems*)&This->FolderItems_iface;
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static HRESULT WINAPI FolderImpl_QueryInterface(Folder3 *iface, REFIID riid,
|
||||
LPVOID *ppv)
|
||||
{
|
||||
@@ -1091,10 +1308,11 @@ static HRESULT WINAPI FolderImpl_get_ParentFolder(Folder3 *iface, Folder **ppsf)
|
||||
|
||||
static HRESULT WINAPI FolderImpl_Items(Folder3 *iface, FolderItems **ppid)
|
||||
{
|
||||
- FIXME("(%p,%p)\n", iface, ppid);
|
||||
+ FolderImpl *This = impl_from_Folder(iface);
|
||||
|
||||
- *ppid = NULL;
|
||||
- return E_NOTIMPL;
|
||||
+ TRACE("(%p,%p)\n", iface, ppid);
|
||||
+
|
||||
+ return FolderItems_Constructor(&This->dir, ppid);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI FolderImpl_ParseName(Folder3 *iface, BSTR name, FolderItem **item)
|
||||
--
|
||||
2.5.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: Implement FolderImpl_Items and stubbed FolderItems interface
|
@ -144,7 +144,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
|
||||
return;
|
||||
|
||||
@@ -461,8 +477,12 @@ void buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *co
|
||||
@@ -460,8 +476,12 @@ void buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *co
|
||||
data->buffer_object = buffer->buffer_object;
|
||||
if (!buffer->buffer_object)
|
||||
{
|
||||
@ -157,7 +157,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
{
|
||||
buffer_create_buffer_object(buffer, context);
|
||||
if (buffer->buffer_object)
|
||||
@@ -500,7 +520,9 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *c
|
||||
@@ -499,7 +519,9 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *c
|
||||
|
||||
if (!wined3d_resource_allocate_sysmem(&buffer->resource))
|
||||
ERR("Failed to allocate system memory.\n");
|
||||
@ -167,7 +167,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
|
||||
buffer_bind(buffer, context);
|
||||
GL_EXTCALL(glGetBufferSubData(buffer->buffer_type_hint, 0, buffer->resource.size, buffer->resource.heap_memory));
|
||||
@@ -674,6 +696,7 @@ drop_query:
|
||||
@@ -673,6 +695,7 @@ drop_query:
|
||||
/* The caller provides a GL context */
|
||||
static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined3d_gl_info *gl_info, DWORD flags)
|
||||
{
|
||||
@ -175,7 +175,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
UINT start = 0, len = 0;
|
||||
|
||||
/* This potentially invalidates the element array buffer binding, but the
|
||||
@@ -697,6 +720,45 @@ static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined
|
||||
@@ -696,6 +719,45 @@ static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined
|
||||
GL_EXTCALL(glBufferParameteriAPPLE(This->buffer_type_hint, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_TRUE));
|
||||
checkGLcall("glBufferParameteriAPPLE(This->buffer_type_hint, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_TRUE)");
|
||||
This->flags &= ~WINED3D_BUFFER_APPLESYNC;
|
||||
@ -221,7 +221,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
}
|
||||
|
||||
while (This->modified_areas)
|
||||
@@ -705,12 +767,33 @@ static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined
|
||||
@@ -704,12 +766,33 @@ static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined
|
||||
start = This->maps[This->modified_areas].offset;
|
||||
len = This->maps[This->modified_areas].size;
|
||||
|
||||
@ -255,7 +255,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
{
|
||||
buffer->flags &= ~(WINED3D_BUFFER_SYNC | WINED3D_BUFFER_DISCARD);
|
||||
}
|
||||
@@ -729,6 +812,14 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
|
||||
@@ -728,6 +811,14 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
|
||||
|
||||
TRACE("buffer %p.\n", buffer);
|
||||
|
||||
@ -270,7 +270,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
buffer_mark_used(buffer);
|
||||
|
||||
if (!buffer->buffer_object)
|
||||
@@ -904,6 +995,7 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
|
||||
@@ -903,6 +994,7 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
|
||||
|
||||
void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
|
||||
{
|
||||
@ -278,7 +278,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
struct wined3d_device *device = buffer->resource.device;
|
||||
|
||||
if (buffer->resource.map_count)
|
||||
@@ -913,6 +1005,12 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
|
||||
@@ -912,6 +1004,12 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
|
||||
}
|
||||
|
||||
wined3d_cs_emit_buffer_preload(device->cs, buffer);
|
||||
@ -291,7 +291,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
}
|
||||
|
||||
struct wined3d_resource * CDECL wined3d_buffer_get_resource(struct wined3d_buffer *buffer)
|
||||
@@ -926,6 +1024,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
|
||||
@@ -925,6 +1023,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
|
||||
{
|
||||
LONG count;
|
||||
BYTE *base;
|
||||
@ -299,7 +299,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
struct wined3d_device *device = buffer->resource.device;
|
||||
struct wined3d_context *context;
|
||||
|
||||
@@ -949,6 +1048,10 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
|
||||
@@ -948,6 +1047,10 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
|
||||
{
|
||||
wined3d_cs_emit_create_vbo(device->cs, buffer);
|
||||
}
|
||||
@ -310,7 +310,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
|
||||
flags = wined3d_resource_sanitize_map_flags(&buffer->resource, flags);
|
||||
/* Filter redundant WINED3D_MAP_DISCARD maps. The 3DMark2001 multitexture
|
||||
@@ -957,7 +1060,11 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
|
||||
@@ -956,7 +1059,11 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
|
||||
* previous contents of the buffer. The r600g driver only does this when
|
||||
* the buffer is currently in use, while the proprietary NVIDIA driver
|
||||
* appears to do this unconditionally. */
|
||||
@ -322,7 +322,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
flags &= ~WINED3D_MAP_DISCARD;
|
||||
count = ++buffer->resource.map_count;
|
||||
|
||||
@@ -968,6 +1075,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
|
||||
@@ -967,6 +1074,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
|
||||
* being uploaded in that case. Two such applications are Port Royale
|
||||
* and Darkstar One. */
|
||||
if (flags & WINED3D_MAP_DISCARD)
|
||||
@ -330,7 +330,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
wined3d_cs_emit_buffer_invalidate_bo_range(device->cs, buffer, 0, 0);
|
||||
else if (!(flags & WINED3D_MAP_READONLY))
|
||||
wined3d_cs_emit_buffer_invalidate_bo_range(device->cs, buffer, offset, size);
|
||||
@@ -985,6 +1093,19 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
|
||||
@@ -984,6 +1092,19 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
|
||||
wined3d_cs_emit_glfinish(device->cs);
|
||||
device->cs->ops->finish(device->cs);
|
||||
}
|
||||
@ -350,7 +350,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
|
||||
context = context_acquire(device, NULL);
|
||||
gl_info = context->gl_info;
|
||||
@@ -1030,6 +1151,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
|
||||
@@ -1029,6 +1150,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
|
||||
buffer_get_sysmem(buffer, context);
|
||||
}
|
||||
TRACE("New pointer is %p.\n", buffer->resource.heap_memory);
|
||||
@ -358,7 +358,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
}
|
||||
context_release(context);
|
||||
}
|
||||
@@ -1069,6 +1191,21 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
|
||||
@@ -1068,6 +1190,21 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
|
||||
}
|
||||
|
||||
base = buffer->map_ptr ? buffer->map_ptr : buffer->resource.map_heap_memory;
|
||||
@ -380,7 +380,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
*data = base + offset;
|
||||
|
||||
TRACE("Returning memory at %p (base %p, offset %u).\n", *data, base, offset);
|
||||
@@ -1131,6 +1268,7 @@ void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer)
|
||||
@@ -1130,6 +1267,7 @@ void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer)
|
||||
}
|
||||
|
||||
GL_EXTCALL(glUnmapBuffer(buffer->buffer_type_hint));
|
||||
@ -388,7 +388,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
if (wined3d_settings.cs_multithreaded)
|
||||
gl_info->gl_ops.gl.p_glFinish();
|
||||
else if (wined3d_settings.strict_draw_ordering)
|
||||
@@ -1139,6 +1277,18 @@ void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer)
|
||||
@@ -1138,6 +1276,18 @@ void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer)
|
||||
|
||||
buffer_clear_dirty_areas(buffer);
|
||||
buffer->map_ptr = NULL;
|
||||
@ -407,7 +407,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1331,7 +1481,9 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
|
||||
@@ -1330,7 +1480,9 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
|
||||
return hr;
|
||||
}
|
||||
buffer->buffer_type_hint = bind_hint;
|
||||
@ -417,7 +417,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
|
||||
TRACE("size %#x, usage %#x, format %s, memory @ %p, iface @ %p.\n", buffer->resource.size, buffer->resource.usage,
|
||||
debug_d3dformat(buffer->resource.format->id), buffer->resource.heap_memory, buffer);
|
||||
@@ -1367,9 +1519,11 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
|
||||
@@ -1366,9 +1518,11 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
|
||||
buffer->flags |= WINED3D_BUFFER_USE_BO;
|
||||
}
|
||||
|
||||
@ -429,7 +429,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
if (!(buffer->maps = HeapAlloc(GetProcessHeap(), 0, sizeof(*buffer->maps))))
|
||||
{
|
||||
ERR("Out of memory.\n");
|
||||
@@ -1497,6 +1651,7 @@ HRESULT CDECL wined3d_buffer_create_ib(struct wined3d_device *device, UINT size,
|
||||
@@ -1496,6 +1650,7 @@ HRESULT CDECL wined3d_buffer_create_ib(struct wined3d_device *device, UINT size,
|
||||
|
||||
return WINED3D_OK;
|
||||
}
|
||||
@ -437,7 +437,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
|
||||
void buffer_swap_mem(struct wined3d_buffer *buffer, BYTE *mem)
|
||||
{
|
||||
@@ -1504,3 +1659,4 @@ void buffer_swap_mem(struct wined3d_buffer *buffer, BYTE *mem)
|
||||
@@ -1503,3 +1658,4 @@ void buffer_swap_mem(struct wined3d_buffer *buffer, BYTE *mem)
|
||||
buffer->resource.heap_memory = mem;
|
||||
buffer->flags |= WINED3D_BUFFER_DISCARD;
|
||||
}
|
||||
@ -6176,7 +6176,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -4481,7 +4481,11 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
@@ -4494,7 +4494,11 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
|
||||
float y_offset = context->render_offscreen
|
||||
? (center_offset - (2.0f * y) - h) / h
|
||||
: (center_offset - (2.0f * y) - h) / -h;
|
||||
@ -6188,7 +6188,7 @@ diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE;
|
||||
float z_scale = zenable ? 2.0f : 0.0f;
|
||||
float z_offset = zenable ? -1.0f : 0.0f;
|
||||
@@ -5278,7 +5282,11 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
@@ -5291,7 +5295,11 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user