Rebase against bc282905d9491b9f9fe4ae4b69a8ccdf99c5aaa8.

This commit is contained in:
Zebediah Figura
2020-06-23 18:07:36 -05:00
parent 8402c95961
commit 7766c17912
36 changed files with 524 additions and 1918 deletions

View File

@@ -1,4 +1,4 @@
From ed999d4430c1aca8f90f26670d3615cdaaab300d Mon Sep 17 00:00:00 2001
From 44e752d89a76ba4a686f5d6b822d95c427b35bc0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 5 Aug 2017 01:45:29 +0200
Subject: [PATCH] ntdll: Add function to create new tokens for elevation
@@ -28,12 +28,12 @@ index 0d19e12768f..e313d5807b3 100644
@ cdecl wine_get_version() NTDLL_wine_get_version
@ cdecl wine_get_build_id() NTDLL_wine_get_build_id
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 47800db41b1..12e7b721cb5 100644
index e2e4d378085..14cd0bafdc0 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -86,6 +86,9 @@ extern int __wine_main_argc;
extern char **__wine_main_argv;
extern WCHAR **__wine_main_wargv;
@@ -73,6 +73,9 @@ extern void init_user_process_params( SIZE_T data_size ) DECLSPEC_HIDDEN;
extern char **build_envp( const WCHAR *envW ) DECLSPEC_HIDDEN;
extern NTSTATUS restart_process( RTL_USER_PROCESS_PARAMETERS *params, NTSTATUS status ) DECLSPEC_HIDDEN;
+/* token */
+extern HANDLE CDECL __wine_create_default_token(BOOL admin);

View File

@@ -1,373 +0,0 @@
From 7d82a3f5a5bcdbf2b362c456080e59f882842b85 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 26 Jul 2019 09:51:05 +1000
Subject: [PATCH] directmanipulation: Implement IDirectManipulationManager2
CreateViewport
---
dlls/directmanipulation/directmanipulation.c | 341 ++++++++++++++++++-
1 file changed, 339 insertions(+), 2 deletions(-)
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
index 629a41c845..86e9556e70 100644
--- a/dlls/directmanipulation/directmanipulation.c
+++ b/dlls/directmanipulation/directmanipulation.c
@@ -177,6 +177,334 @@ static HRESULT create_update_manager(IDirectManipulationUpdateManager **obj)
return S_OK;
}
+struct directviewport
+{
+ IDirectManipulationViewport2 IDirectManipulationViewport2_iface;
+ LONG ref;
+};
+
+static inline struct directviewport *impl_from_IDirectManipulationViewport2(IDirectManipulationViewport2 *iface)
+{
+ return CONTAINING_RECORD(iface, struct directviewport, IDirectManipulationViewport2_iface);
+}
+
+static HRESULT WINAPI viewport_QueryInterface(IDirectManipulationViewport2 *iface, REFIID riid, void **ppv)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv);
+
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
+ IsEqualGUID(riid, &IID_IDirectManipulationViewport) ||
+ IsEqualGUID(riid, &IID_IDirectManipulationViewport2))
+ {
+ IDirectManipulationViewport2_AddRef(&This->IDirectManipulationViewport2_iface);
+ *ppv = &This->IDirectManipulationViewport2_iface;
+ return S_OK;
+ }
+
+ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI viewport_AddRef(IDirectManipulationViewport2 *iface)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p) ref=%u\n", This, ref);
+
+ return ref;
+}
+
+static ULONG WINAPI viewport_Release(IDirectManipulationViewport2 *iface)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p) ref=%u\n", This, ref);
+
+ if (!ref)
+ {
+ heap_free(This);
+ }
+ return ref;
+}
+
+static HRESULT WINAPI viewport_Enable(IDirectManipulationViewport2 *iface)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_Disable(IDirectManipulationViewport2 *iface)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetContact(IDirectManipulationViewport2 *iface, UINT32 id)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, id);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_ReleaseContact(IDirectManipulationViewport2 *iface, UINT32 id)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, id);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_ReleaseAllContacts(IDirectManipulationViewport2 *iface)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_GetStatus(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_STATUS *status)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p\n", This, status);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_GetTag(IDirectManipulationViewport2 *iface, REFIID riid, void **object, UINT32 *id)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %s, %p, %p\n", This, debugstr_guid(riid), object, id);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetTag(IDirectManipulationViewport2 *iface, IUnknown *object, UINT32 id)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p, %p\n", This, object, id);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_GetViewportRect(IDirectManipulationViewport2 *iface, RECT *viewport)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p\n", This, viewport);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetViewportRect(IDirectManipulationViewport2 *iface, const RECT *viewport)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p\n", This, viewport);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_ZoomToRect(IDirectManipulationViewport2 *iface, const float left,
+ const float top, const float right, const float bottom, BOOL animate)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %f, %f, %f, %f, %d\n", This, left, top, right, bottom, animate);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetViewportTransform(IDirectManipulationViewport2 *iface,
+ const float *matrix, DWORD count)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p, %d\n", This, matrix, count);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SyncDisplayTransform(IDirectManipulationViewport2 *iface,
+ const float *matrix, DWORD count)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p, %d\n", This, matrix, count);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_GetPrimaryContent(IDirectManipulationViewport2 *iface, REFIID riid, void **object)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %s, %p\n", This, debugstr_guid(riid), object);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_AddContent(IDirectManipulationViewport2 *iface, IDirectManipulationContent *content)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p\n", This, content);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_RemoveContent(IDirectManipulationViewport2 *iface, IDirectManipulationContent *content)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p\n", This, content);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetViewportOptions(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_VIEWPORT_OPTIONS options)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, options);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_AddConfiguration(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_CONFIGURATION configuration)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, configuration);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_RemoveConfiguration(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_CONFIGURATION configuration)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, configuration);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_ActivateConfiguration(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_CONFIGURATION configuration)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, configuration);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetManualGesture(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_GESTURE_CONFIGURATION configuration)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, configuration);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetChaining(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_MOTION_TYPES enabledTypes)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, enabledTypes);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_AddEventHandler(IDirectManipulationViewport2 *iface, HWND window,
+ IDirectManipulationViewportEventHandler *eventHandler, DWORD *cookie)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p, %p, %p\n", This, window, eventHandler, cookie);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_RemoveEventHandler(IDirectManipulationViewport2 *iface, DWORD cookie)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, cookie);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetInputMode(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_INPUT_MODE mode)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, mode);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_SetUpdateMode(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_INPUT_MODE mode)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, mode);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_Stop(IDirectManipulationViewport2 *iface)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_Abandon(IDirectManipulationViewport2 *iface)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p\n", This);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_AddBehavior(IDirectManipulationViewport2 *iface, IUnknown *behavior, DWORD *cookie)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %p, %p\n", This, behavior, cookie);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_RemoveBehavior(IDirectManipulationViewport2 *iface, DWORD cookie)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p, %d\n", This, cookie);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI viewport_RemoveAllBehaviors(IDirectManipulationViewport2 *iface)
+{
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
+ FIXME("%p\n", This);
+ return E_NOTIMPL;
+}
+
+static const IDirectManipulationViewport2Vtbl viewportVtbl =
+{
+ viewport_QueryInterface,
+ viewport_AddRef,
+ viewport_Release,
+ viewport_Enable,
+ viewport_Disable,
+ viewport_SetContact,
+ viewport_ReleaseContact,
+ viewport_ReleaseAllContacts,
+ viewport_GetStatus,
+ viewport_GetTag,
+ viewport_SetTag,
+ viewport_GetViewportRect,
+ viewport_SetViewportRect,
+ viewport_ZoomToRect,
+ viewport_SetViewportTransform,
+ viewport_SyncDisplayTransform,
+ viewport_GetPrimaryContent,
+ viewport_AddContent,
+ viewport_RemoveContent,
+ viewport_SetViewportOptions,
+ viewport_AddConfiguration,
+ viewport_RemoveConfiguration,
+ viewport_ActivateConfiguration,
+ viewport_SetManualGesture,
+ viewport_SetChaining,
+ viewport_AddEventHandler,
+ viewport_RemoveEventHandler,
+ viewport_SetInputMode,
+ viewport_SetUpdateMode,
+ viewport_Stop,
+ viewport_Abandon,
+ viewport_AddBehavior,
+ viewport_RemoveBehavior,
+ viewport_RemoveAllBehaviors
+};
+
+static HRESULT create_viewport(IDirectManipulationViewport2 **obj)
+{
+ struct directviewport *object;
+
+ object = heap_alloc(sizeof(*object));
+ if(!object)
+ return E_OUTOFMEMORY;
+
+ object->IDirectManipulationViewport2_iface.lpVtbl = &viewportVtbl;
+ object->ref = 1;
+
+ *obj = &object->IDirectManipulationViewport2_iface;
+
+ return S_OK;
+}
+
static HRESULT WINAPI direct_manip_QueryInterface(IDirectManipulationManager2 *iface, REFIID riid, void **ppv)
{
if (IsEqualGUID(riid, &IID_IUnknown) ||
@@ -278,9 +606,18 @@ static HRESULT WINAPI direct_manip_GetUpdateManager(IDirectManipulationManager2
static HRESULT WINAPI direct_manip_CreateViewport(IDirectManipulationManager2 *iface, IDirectManipulationFrameInfoProvider *frame,
HWND window, REFIID riid, void **obj)
{
+ HRESULT hr = E_NOTIMPL;
struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
- FIXME("%p, %p, %p, %s, %p\n", This, frame, window, debugstr_guid(riid), obj);
- return E_NOTIMPL;
+ TRACE("%p, %p, %p, %s, %p\n", This, frame, window, debugstr_guid(riid), obj);
+
+ if(IsEqualGUID(riid, &IID_IDirectManipulationViewport) ||
+ IsEqualGUID(riid, &IID_IDirectManipulationViewport2) )
+ {
+ hr = create_viewport( (IDirectManipulationViewport2**)obj);
+ }
+ else
+ FIXME("Unsupported interface %s\n", debugstr_guid(riid));
+ return hr;
}
static HRESULT WINAPI direct_manip_CreateContent(IDirectManipulationManager2 *iface, IDirectManipulationFrameInfoProvider *frame,
--
2.17.1

View File

@@ -1,186 +0,0 @@
From 52d03476a908684bb201ae69032f39bf2a745190 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 23 Aug 2019 11:34:16 +1000
Subject: [PATCH 3/4] directmanipulation: Implement
IDirectManipulationViewport2 GetPrimaryContent
---
dlls/directmanipulation/directmanipulation.c | 155 ++++++++++++++++++-
1 file changed, 154 insertions(+), 1 deletion(-)
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
index f1e008bc7f..ca60e76db6 100644
--- a/dlls/directmanipulation/directmanipulation.c
+++ b/dlls/directmanipulation/directmanipulation.c
@@ -177,6 +177,142 @@ static HRESULT create_update_manager(IDirectManipulationUpdateManager **obj)
return S_OK;
}
+
+struct primarycontext
+{
+ IDirectManipulationPrimaryContent IDirectManipulationPrimaryContent_iface;
+ LONG ref;
+};
+
+static inline struct primarycontext *impl_from_IDirectManipulationPrimaryContent(IDirectManipulationPrimaryContent *iface)
+{
+ return CONTAINING_RECORD(iface, struct primarycontext, IDirectManipulationPrimaryContent_iface);
+}
+
+static HRESULT WINAPI primary_QueryInterface(IDirectManipulationPrimaryContent *iface, REFIID riid, void **ppv)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
+ TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv);
+
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
+ IsEqualGUID(riid, &IID_IDirectManipulationPrimaryContent))
+ {
+ IDirectManipulationPrimaryContent_AddRef(&This->IDirectManipulationPrimaryContent_iface);
+ *ppv = &This->IDirectManipulationPrimaryContent_iface;
+ return S_OK;
+ }
+
+ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI primary_AddRef(IDirectManipulationPrimaryContent *iface)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p) ref=%u\n", This, ref);
+
+ return ref;
+}
+
+static ULONG WINAPI primary_Release(IDirectManipulationPrimaryContent *iface)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p) ref=%u\n", This, ref);
+
+ if (!ref)
+ {
+ heap_free(This);
+ }
+ return ref;
+}
+
+static HRESULT WINAPI primary_SetSnapInterval(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_MOTION_TYPES motion,
+ float interval, float offset)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
+ FIXME("%p, %d, %f, %f\n", This, motion, interval, offset);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI primary_SetSnapPoints(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_MOTION_TYPES motion,
+ const float *points, DWORD count)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
+ FIXME("%p, %d, %p, %d\n", This, motion, points, count);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI primary_SetSnapType(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_MOTION_TYPES motion,
+ DIRECTMANIPULATION_SNAPPOINT_TYPE type)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
+ FIXME("%p, %d, %d\n", This, motion, type);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI primary_SetSnapCoordinate(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_MOTION_TYPES motion,
+ DIRECTMANIPULATION_SNAPPOINT_COORDINATE coordinate, float origin)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
+ FIXME("%p, %d, %d, %f\n", This, motion, coordinate, origin);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI primary_SetZoomBoundaries(IDirectManipulationPrimaryContent *iface, float minimum, float maximum)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
+ FIXME("%p, %f, %f\n", This, minimum, maximum);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI primary_SetHorizontalAlignment(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_HORIZONTALALIGNMENT alignment)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
+ FIXME("%p, %d\n", This, alignment);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI primary_SetVerticalAlignment(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_VERTICALALIGNMENT alignment)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
+ FIXME("%p, %d\n", This, alignment);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI primary_GetInertiaEndTransform(IDirectManipulationPrimaryContent *iface, float *matrix, DWORD count)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
+ FIXME("%p, %p, %d\n", This, matrix, count);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI primary_GetCenterPoint(IDirectManipulationPrimaryContent *iface, float *x, float *y)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
+ FIXME("%p, %p, %p\n", This, x, y);
+ return E_NOTIMPL;
+}
+
+static const IDirectManipulationPrimaryContentVtbl primaryVtbl =
+{
+ primary_QueryInterface,
+ primary_AddRef,
+ primary_Release,
+ primary_SetSnapInterval,
+ primary_SetSnapPoints,
+ primary_SetSnapType,
+ primary_SetSnapCoordinate,
+ primary_SetZoomBoundaries,
+ primary_SetHorizontalAlignment,
+ primary_SetVerticalAlignment,
+ primary_GetInertiaEndTransform,
+ primary_GetCenterPoint
+};
+
struct directviewport
{
IDirectManipulationViewport2 IDirectManipulationViewport2_iface;
@@ -327,7 +463,24 @@ static HRESULT WINAPI viewport_SyncDisplayTransform(IDirectManipulationViewport2
static HRESULT WINAPI viewport_GetPrimaryContent(IDirectManipulationViewport2 *iface, REFIID riid, void **object)
{
struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
- FIXME("%p, %s, %p\n", This, debugstr_guid(riid), object);
+ TRACE("%p, %s, %p\n", This, debugstr_guid(riid), object);
+ if(IsEqualGUID(riid, &IID_IDirectManipulationPrimaryContent))
+ {
+ struct primarycontext *primary;
+ TRACE("IDirectManipulationPrimaryContent\n");
+ primary = heap_alloc( sizeof(*primary));
+ if(!primary)
+ return E_OUTOFMEMORY;
+
+ primary->IDirectManipulationPrimaryContent_iface.lpVtbl = &primaryVtbl;
+ primary->ref = 1;
+
+ *object = &primary->IDirectManipulationPrimaryContent_iface;
+
+ return S_OK;
+ }
+ else
+ FIXME("Unsupported interface %s\n", debugstr_guid(riid));
return E_NOTIMPL;
}
--
2.17.1

View File

@@ -1,166 +0,0 @@
From b86977f6822d286b595c756c814c2cc986968050 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sun, 22 Dec 2019 19:35:25 +1100
Subject: [PATCH 1/2] directmanipulation: Support IDirectManipulationContent in
IDirectManipulationPrimaryContent interface
Based of patch by Gijs Vermeulen.
---
dlls/directmanipulation/directmanipulation.c | 110 ++++++++++++++++++-
1 file changed, 109 insertions(+), 1 deletion(-)
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
index ca60e76db6e..05601abbd45 100644
--- a/dlls/directmanipulation/directmanipulation.c
+++ b/dlls/directmanipulation/directmanipulation.c
@@ -177,10 +177,10 @@ static HRESULT create_update_manager(IDirectManipulationUpdateManager **obj)
return S_OK;
}
-
struct primarycontext
{
IDirectManipulationPrimaryContent IDirectManipulationPrimaryContent_iface;
+ IDirectManipulationContent IDirectManipulationContent_iface;
LONG ref;
};
@@ -189,6 +189,11 @@ static inline struct primarycontext *impl_from_IDirectManipulationPrimaryContent
return CONTAINING_RECORD(iface, struct primarycontext, IDirectManipulationPrimaryContent_iface);
}
+static inline struct primarycontext *impl_from_IDirectManipulationContent(IDirectManipulationContent *iface)
+{
+ return CONTAINING_RECORD(iface, struct primarycontext, IDirectManipulationContent_iface);
+}
+
static HRESULT WINAPI primary_QueryInterface(IDirectManipulationPrimaryContent *iface, REFIID riid, void **ppv)
{
struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
@@ -201,6 +206,12 @@ static HRESULT WINAPI primary_QueryInterface(IDirectManipulationPrimaryContent *
*ppv = &This->IDirectManipulationPrimaryContent_iface;
return S_OK;
}
+ else if(IsEqualGUID(riid, &IID_IDirectManipulationContent))
+ {
+ IUnknown_AddRef(iface);
+ *ppv = &This->IDirectManipulationContent_iface;
+ return S_OK;
+ }
FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
return E_NOINTERFACE;
@@ -313,6 +324,102 @@ static const IDirectManipulationPrimaryContentVtbl primaryVtbl =
primary_GetCenterPoint
};
+
+static HRESULT WINAPI content_QueryInterface(IDirectManipulationContent *iface, REFIID riid, void **ppv)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
+ TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv);
+
+ return IDirectManipulationPrimaryContent_QueryInterface(&This->IDirectManipulationPrimaryContent_iface,
+ riid, ppv);
+}
+
+static ULONG WINAPI content_AddRef(IDirectManipulationContent *iface)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
+ return IDirectManipulationPrimaryContent_AddRef(&This->IDirectManipulationPrimaryContent_iface);
+}
+
+static ULONG WINAPI content_Release(IDirectManipulationContent *iface)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
+ return IDirectManipulationPrimaryContent_Release(&This->IDirectManipulationPrimaryContent_iface);
+}
+
+static HRESULT WINAPI content_GetContentRect(IDirectManipulationContent *iface, RECT *size)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
+ FIXME("%p, %p\n", This, size);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI content_SetContentRect(IDirectManipulationContent *iface, const RECT *size)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
+ FIXME("%p, %p\n", This, size);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI content_GetViewport(IDirectManipulationContent *iface, REFIID riid, void **object)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
+ FIXME("%p, %p, %p\n", This, debugstr_guid(riid), object);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI content_GetTag(IDirectManipulationContent *iface, REFIID riid, void **object, UINT32 *id)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
+ FIXME("%p, %p, %p, %p\n", This, debugstr_guid(riid), object, id);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI content_SetTag(IDirectManipulationContent *iface, IUnknown *object, UINT32 id)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
+ FIXME("%p, %p, %d\n", This, object, id);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI content_GetOutputTransform(IDirectManipulationContent *iface,
+ float *matrix, DWORD count)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
+ FIXME("%p, %p, %d\n", This, matrix, count);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI content_GetContentTransform(IDirectManipulationContent *iface,
+ float *matrix, DWORD count)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
+ FIXME("%p, %p, %d\n", This, matrix, count);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI content_SyncContentTransform(IDirectManipulationContent *iface,
+ const float *matrix, DWORD count)
+{
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
+ FIXME("%p, %p, %d\n", This, matrix, count);
+ return E_NOTIMPL;
+}
+
+static const IDirectManipulationContentVtbl contentVtbl =
+{
+ content_QueryInterface,
+ content_AddRef,
+ content_Release,
+ content_GetContentRect,
+ content_SetContentRect,
+ content_GetViewport,
+ content_GetTag,
+ content_SetTag,
+ content_GetOutputTransform,
+ content_GetContentTransform,
+ content_SyncContentTransform
+};
+
struct directviewport
{
IDirectManipulationViewport2 IDirectManipulationViewport2_iface;
@@ -473,6 +580,7 @@ static HRESULT WINAPI viewport_GetPrimaryContent(IDirectManipulationViewport2 *i
return E_OUTOFMEMORY;
primary->IDirectManipulationPrimaryContent_iface.lpVtbl = &primaryVtbl;
+ primary->IDirectManipulationContent_iface.lpVtbl = &contentVtbl;
primary->ref = 1;
*object = &primary->IDirectManipulationPrimaryContent_iface;
--
2.24.0

View File

@@ -1,4 +1,4 @@
From 440f90abdcbe7e9a1d43e06900a4674e6fabd805 Mon Sep 17 00:00:00 2001
From cd8b9cfdbc4ab1c7120c411b65ac079eddd3a675 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 9 Jul 2019 14:13:28 +1000
Subject: [PATCH] user32: Improve GetKeyboardLayoutList
@@ -59,10 +59,10 @@ index 6d916c7d65d..b9e0dc60e7c 100644
if (baselayout != 0)
{
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 913fabfbd85..dd84ff5cbb2 100644
index 9ec829860af..56fbc558de2 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -3010,6 +3010,40 @@ static void test_UnregisterDeviceNotification(void)
@@ -3385,6 +3385,40 @@ static void test_UnregisterDeviceNotification(void)
ok(ret == FALSE, "Unregistering NULL Device Notification returned: %d\n", ret);
}
@@ -102,15 +102,15 @@ index 913fabfbd85..dd84ff5cbb2 100644
+
START_TEST(input)
{
POINT pos;
@@ -3033,6 +3067,7 @@ START_TEST(input)
char **argv;
@@ -3417,6 +3451,7 @@ START_TEST(input)
test_GetKeyState();
test_OemKeyScan();
test_GetRawInputData();
+ test_GetKeyboardLayoutList();
test_RegisterRawInputDevices();
test_rawinput(argv[0]);
if(pGetMouseMovePointsEx)
--
2.26.2
2.27.0

View File

@@ -1,13 +1,13 @@
From b1af584b5d5b8905bf4dd3ec6be9227e5221a744 Mon Sep 17 00:00:00 2001
From 250b8699aa64096bb4b38d454c03b57afe91a619 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 3 Apr 2017 05:30:27 +0200
Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data.
---
dlls/kernel32/tests/loader.c | 76 ++++++++++++++++++++++++++++++++++++
dlls/ntdll/loader.c | 65 ++++++++++++++++++++++++++++++
dlls/ntdll/loader.c | 64 ++++++++++++++++++++++++++++++
include/winternl.h | 2 +-
3 files changed, 142 insertions(+), 1 deletion(-)
3 files changed, 141 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index 59965984a67..95f18fb71e3 100644
@@ -115,10 +115,10 @@ index 59965984a67..95f18fb71e3 100644
test_Loader();
}
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index c90cdcc860b..63e1227cc55 100644
index 42cdc628021..df8e0c69185 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -128,6 +128,9 @@ struct file_id
@@ -121,6 +121,9 @@ struct file_id
BYTE ObjectId[16];
};
@@ -128,7 +128,7 @@ index c90cdcc860b..63e1227cc55 100644
/* internal representation of loaded modules */
typedef struct _wine_modref
{
@@ -467,6 +470,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
@@ -446,6 +449,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
}
}
@@ -181,7 +181,7 @@ index c90cdcc860b..63e1227cc55 100644
/*************************************************************************
* get_modref
*
@@ -1231,7 +1280,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
@@ -1188,7 +1237,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name
&wm->ldr.InLoadOrderLinks);
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList,
&wm->ldr.InMemoryOrderLinks);
@@ -194,15 +194,7 @@ index c90cdcc860b..63e1227cc55 100644
if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT))
{
@@ -1892,6 +1946,7 @@ static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRIN
/* the module has only been inserted in the load & memory order lists */
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
+ RemoveEntryList(&wm->ldr.HashLinks);
/* FIXME: free the modref */
return status;
}
@@ -2433,6 +2488,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam
@@ -1894,6 +1948,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
/* the module has only be inserted in the load & memory order lists */
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
@@ -210,7 +202,7 @@ index c90cdcc860b..63e1227cc55 100644
/* FIXME: there are several more dangling references
* left. Including dlls loaded by this dll before the
@@ -3652,6 +3708,7 @@ static void free_modref( WINE_MODREF *wm )
@@ -3226,6 +3281,7 @@ static void free_modref( WINE_MODREF *wm )
{
RemoveEntryList(&wm->ldr.InLoadOrderLinks);
RemoveEntryList(&wm->ldr.InMemoryOrderLinks);
@@ -218,7 +210,7 @@ index c90cdcc860b..63e1227cc55 100644
if (wm->ldr.InInitializationOrderLinks.Flink)
RemoveEntryList(&wm->ldr.InInitializationOrderLinks);
@@ -4372,6 +4429,7 @@ void __wine_process_init(void)
@@ -3945,6 +4001,7 @@ void __wine_process_init(void)
SIZE_T info_size;
TEB *teb;
PEB *peb;
@@ -226,7 +218,7 @@ index c90cdcc860b..63e1227cc55 100644
if (!unix_funcs) load_ntdll_so( ntdll_module, &__wine_spec_nt_header );
@@ -4388,6 +4446,10 @@ void __wine_process_init(void)
@@ -3961,6 +4018,10 @@ void __wine_process_init(void)
load_global_options();
version_init();
@@ -237,7 +229,7 @@ index c90cdcc860b..63e1227cc55 100644
/* setup the load callback and create ntdll modref */
RtlInitUnicodeString( &nt_name, ntdllW );
status = build_so_dll_module( params->DllPath.Buffer, &nt_name, ntdll_module, 0, &wm );
@@ -4463,6 +4525,9 @@ void __wine_process_init(void)
@@ -4034,6 +4095,9 @@ void __wine_process_init(void)
teb->Tib.StackLimit = stack.StackLimit;
teb->DeallocationStack = stack.DeallocationStack;

View File

@@ -1,4 +1,4 @@
From 4236b5607067148efa76cbe090d9efd58b297e32 Mon Sep 17 00:00:00 2001
From 6a2146342b48977513f83a59cd16d182850767a9 Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Mon, 30 Dec 2019 13:27:53 +0300
Subject: [PATCH] ntdll: Support x86_64 syscall emulation.
@@ -12,14 +12,14 @@ is used for trapping syscalls.
configure.ac | 1 +
dlls/ntdll/thread.c | 8 ++-
dlls/ntdll/unix/signal_x86_64.c | 105 ++++++++++++++++++++++++++++++++
dlls/ntdll/unix/thread.c | 8 ++-
dlls/ntdll/unix/unix_private.h | 6 +-
dlls/ntdll/unixlib.h | 3 +-
dlls/ntdll/unix/thread.c | 7 ++-
dlls/ntdll/unix/unix_private.h | 5 +-
dlls/ntdll/unixlib.h | 2 +-
tools/winebuild/spec32.c | 9 ++-
7 files changed, 134 insertions(+), 6 deletions(-)
7 files changed, 131 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 9c5f76669df..f245c2f1507 100644
index a78610c6490..eabd16b4732 100644
--- a/configure.ac
+++ b/configure.ac
@@ -464,6 +464,7 @@ AC_CHECK_HEADERS(\
@@ -31,10 +31,10 @@ index 9c5f76669df..f245c2f1507 100644
linux/types.h \
linux/ucdrom.h \
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 557747062e4..0d65546588f 100644
index 0eb7d901c4d..c5391fb0512 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -103,6 +103,12 @@ void __wine_syscall_dispatcher( void )
@@ -105,6 +105,12 @@ void __wine_syscall_dispatcher( void )
}
#endif
@@ -47,14 +47,14 @@ index 557747062e4..0d65546588f 100644
void *WINAPI __wine_fakedll_dispatcher( const char *module, ULONG ord )
{
UNICODE_STRING name;
@@ -146,7 +152,7 @@ void *WINAPI __wine_fakedll_dispatcher( const char *module, ULONG ord )
TEB *thread_init( SIZE_T *info_size, BOOL *suspend )
@@ -148,7 +154,7 @@ void *WINAPI __wine_fakedll_dispatcher( const char *module, ULONG ord )
TEB *thread_init( SIZE_T *info_size )
{
TEB *teb = unix_funcs->init_threading( &nb_threads, &__wine_ldt_copy, info_size, suspend, &server_cpus,
- &is_wow64, &server_start_time, __wine_syscall_dispatcher );
+ &is_wow64, &server_start_time, __wine_syscall_dispatcher, __wine_nb_syscalls );
teb->Spare2 = (ULONG_PTR)__wine_fakedll_dispatcher;
ULONG_PTR val;
- TEB *teb = unix_funcs->init_threading( &nb_threads, &__wine_ldt_copy, info_size, __wine_syscall_dispatcher );
+ TEB *teb = unix_funcs->init_threading( &nb_threads, &__wine_ldt_copy, info_size, __wine_syscall_dispatcher, __wine_nb_syscalls );
teb->Spare2 = (ULONG_PTR)__wine_fakedll_dispatcher;
peb = teb->Peb;
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 12ea74f7f5c..26097702985 100644
@@ -194,7 +194,7 @@ index 12ea74f7f5c..26097702985 100644
error:
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
index 196dc2d8c4e..dae792bd78b 100644
index ca5eba4da88..36126a56f45 100644
--- a/dlls/ntdll/unix/thread.c
+++ b/dlls/ntdll/unix/thread.c
@@ -58,6 +58,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(seh);
@@ -207,17 +207,16 @@ index 196dc2d8c4e..dae792bd78b 100644
static int *nb_threads;
static inline int get_unix_exit_code( NTSTATUS status )
@@ -85,7 +88,8 @@ static void pthread_exit_wrapper( int status )
@@ -84,7 +87,7 @@ static void pthread_exit_wrapper( int status )
/***********************************************************************
* init_threading
*/
TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size, BOOL *suspend,
- unsigned int *cpus, BOOL *wow64, timeout_t *start_time, void *syscall_handler )
+ unsigned int *cpus, BOOL *wow64, timeout_t *start_time, void *syscall_handler,
+ unsigned int syscall_count )
-TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size, void *syscall_handler )
+TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size, void *syscall_handler, unsigned int syscall_count )
{
TEB *teb;
SIZE_T info_size;
@@ -94,6 +98,8 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZ
BOOL suspend;
@@ -94,6 +97,8 @@ TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZ
*ldt_copy = &__wine_ldt_copy;
#endif
nb_threads = nb_threads_ptr;
@@ -227,20 +226,19 @@ index 196dc2d8c4e..dae792bd78b 100644
teb = virtual_alloc_first_teb();
teb->WOW32Reserved = syscall_handler;
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index df508e569f9..bcb80ddab85 100644
index 15be5d3715a..516a6cfa1fe 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -113,7 +113,8 @@ extern void CDECL server_release_fd( HANDLE handle, int unix_fd ) DECLSPEC_HIDDE
@@ -115,7 +115,7 @@ extern NTSTATUS CDECL server_handle_to_fd( HANDLE handle, unsigned int access, i
unsigned int *options ) DECLSPEC_HIDDEN;
extern void CDECL server_release_fd( HANDLE handle, int unix_fd ) DECLSPEC_HIDDEN;
extern void CDECL server_init_process_done( void *relay ) DECLSPEC_HIDDEN;
extern TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size,
BOOL *suspend, unsigned int *cpus, BOOL *wow64,
- timeout_t *start_time, void *syscall_handler ) DECLSPEC_HIDDEN;
+ timeout_t *start_time, void *syscall_handler,
+ unsigned int syscall_count ) DECLSPEC_HIDDEN;
-extern TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size, void *syscall_handler ) DECLSPEC_HIDDEN;
+extern TEB * CDECL init_threading( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size, void *syscall_handler, unsigned int syscall_count ) DECLSPEC_HIDDEN;
extern void CDECL DECLSPEC_NORETURN exit_thread( int status ) DECLSPEC_HIDDEN;
extern void CDECL DECLSPEC_NORETURN exit_process( int status ) DECLSPEC_HIDDEN;
extern NTSTATUS CDECL exec_process( UNICODE_STRING *path, UNICODE_STRING *cmdline, NTSTATUS status ) DECLSPEC_HIDDEN;
@@ -146,6 +147,9 @@ extern NTSTATUS exec_wineloader( char **argv, int socketfd, int is_child_64bit,
@@ -152,6 +152,9 @@ extern NTSTATUS exec_wineloader( char **argv, int socketfd, int is_child_64bit,
extern void start_server( BOOL debug ) DECLSPEC_HIDDEN;
extern ULONG_PTR get_image_address(void) DECLSPEC_HIDDEN;
@@ -251,16 +249,15 @@ index df508e569f9..bcb80ddab85 100644
extern void server_enter_uninterrupted_section( RTL_CRITICAL_SECTION *cs, sigset_t *sigset ) DECLSPEC_HIDDEN;
extern void server_leave_uninterrupted_section( RTL_CRITICAL_SECTION *cs, sigset_t *sigset ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index a9803478a37..e3bb8f7ce8e 100644
index b5b7cb07c80..f61e0ed8525 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -302,7 +302,8 @@ struct unix_funcs
@@ -304,7 +304,7 @@ struct unix_funcs
void (CDECL *virtual_set_large_address_space)(void);
/* thread/process functions */
TEB * (CDECL *init_threading)( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size,
- BOOL *suspend, unsigned int *cpus, BOOL *wow64, timeout_t *start_time, void *syscall_handler );
+ BOOL *suspend, unsigned int *cpus, BOOL *wow64, timeout_t *start_time,
+ void *syscall_handler, unsigned int syscall_count );
- TEB * (CDECL *init_threading)( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size, void *syscall_handler );
+ TEB * (CDECL *init_threading)( int *nb_threads_ptr, struct ldt_copy **ldt_copy, SIZE_T *size, void *syscall_handler, unsigned int syscall_count );
void (CDECL *exit_thread)( int status );
void (CDECL *exit_process)( int status );
NTSTATUS (CDECL *exec_process)( UNICODE_STRING *path, UNICODE_STRING *cmdline, NTSTATUS status );

View File

@@ -1,4 +1,4 @@
From 7421907b2ecc21493308aa31478b6828f4341e29 Mon Sep 17 00:00:00 2001
From ab4c2acb67c445abb2b6db274f6e94bd5f3877ba Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 22 May 2020 16:37:37 +1000
Subject: [PATCH] ntdll: NtQuerySystemInformation support
@@ -7,47 +7,48 @@ Subject: [PATCH] ntdll: NtQuerySystemInformation support
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49192
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/ntdll/nt.c | 21 +++++++++++++++++++++
include/winternl.h | 22 ++++++++++++++++++++++
2 files changed, 43 insertions(+)
dlls/ntdll/unix/system.c | 22 ++++++++++++++++++++++
include/winternl.h | 22 ++++++++++++++++++++++
2 files changed, 44 insertions(+)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 1d31f80a5f55..99b0d8dc0921 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -3179,6 +3179,27 @@ NTSTATUS WINAPI NtQuerySystemInformation(
memset(SystemInformation, 0, Length);
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
index c5b2018bf30..6a0f4778790 100644
--- a/dlls/ntdll/unix/system.c
+++ b/dlls/ntdll/unix/system.c
@@ -2151,6 +2151,28 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
ret = STATUS_SUCCESS;
break;
+ case SystemCodeIntegrityInformation:
+ {
+ SYSTEM_CODEINTEGRITY_INFORMATION *info = (SYSTEM_CODEINTEGRITY_INFORMATION*)SystemInformation;
+ SYSTEM_CODEINTEGRITY_INFORMATION *scii = info;
+
+ FIXME("SystemCodeIntegrityInformation, len %u, buffer %p, stub!\n", Length, info);
+ FIXME("SystemCodeIntegrityInformation, size %u, info %p, stub!\n", size, info);
+
+ if (Length < sizeof(SYSTEM_CODEINTEGRITY_INFORMATION))
+ if (size < sizeof(SYSTEM_CODEINTEGRITY_INFORMATION))
+ {
+ ret = STATUS_INFO_LENGTH_MISMATCH;
+ break;
+ }
+
+ if (!SystemInformation)
+ if (!info)
+ {
+ ret = STATUS_ACCESS_VIOLATION;
+ break;
+ }
+
+ info->CodeIntegrityOptions = CODEINTEGRITY_OPTION_ENABLED;
+ scii->CodeIntegrityOptions = CODEINTEGRITY_OPTION_ENABLED;
+ break;
+ }
+
default:
FIXME("(0x%08x,%p,0x%08x,%p) stub\n",
SystemInformationClass,SystemInformation,Length,ResultLength);
FIXME( "(0x%08x,%p,0x%08x,%p) stub\n", class, info, size, ret_size );
diff --git a/include/winternl.h b/include/winternl.h
index 640dbe5db354..1ae249c59404 100644
index 3ff15f28c15..bcc20b2d99e 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -972,10 +972,32 @@ typedef enum _SYSTEM_INFORMATION_CLASS {
@@ -986,10 +986,32 @@ typedef enum _SYSTEM_INFORMATION_CLASS {
SystemSuperfetchInformation = 79,
SystemMemoryListInformation = 80,
SystemFileCacheInformationEx = 81,
@@ -81,5 +82,5 @@ index 640dbe5db354..1ae249c59404 100644
ThreadBasicInformation = 0,
ThreadTimes,
--
2.26.2
2.27.0

View File

@@ -1,29 +1,30 @@
From 317b8941e2c36fd568799915c8023332b5054331 Mon Sep 17 00:00:00 2001
From a74718ea86178b8aa580d542bed872a313bdd546 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sat, 6 Apr 2019 21:31:55 -0500
Subject: [PATCH] ntdll: Add stub for
NtQuerySystemInformation(SystemExtendedProcessInformation).
---
dlls/ntdll/nt.c | 5 +++++
1 file changed, 5 insertions(+)
dlls/ntdll/unix/system.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index f42934969..c019a9c29 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -2768,6 +2768,11 @@ NTSTATUS WINAPI NtQuerySystemInformation(
}
}
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
index 68de16b7e5b..c5b2018bf30 100644
--- a/dlls/ntdll/unix/system.c
+++ b/dlls/ntdll/unix/system.c
@@ -2145,6 +2145,12 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
break;
}
+ case SystemExtendedProcessInformation:
+ FIXME("SystemExtendedProcessInformation, len %u, buffer %p, stub!\n", Length, SystemInformation);
+ memset(SystemInformation, 0, Length);
+ FIXME("SystemExtendedProcessInformation, size %u, info %p, stub!\n", size, info);
+ memset( info, 0, size );
+ ret = STATUS_SUCCESS;
+ break;
+
default:
FIXME("(0x%08x,%p,0x%08x,%p) stub\n",
SystemInformationClass,SystemInformation,Length,ResultLength);
FIXME( "(0x%08x,%p,0x%08x,%p) stub\n", class, info, size, ret_size );
--
2.20.1
2.27.0

View File

@@ -1,39 +1,38 @@
From e42cdb8305dcebca77afba4a56e59391f2cb4a38 Mon Sep 17 00:00:00 2001
From 0cb2647baa3ea72babb05e24d2f1fa23cdedb0a1 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 7 Jan 2016 06:01:01 +0100
Subject: ntdll: Return buffer filled with random values from
Subject: [PATCH] ntdll: Return buffer filled with random values from
SystemInterruptInformation.
---
dlls/ntdll/nt.c | 11 +++++++++++
1 file changed, 11 insertions(+)
dlls/ntdll/unix/system.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 9ee1923..fe3e8e8 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -2070,10 +2070,21 @@ NTSTATUS WINAPI NtQuerySystemInformation(
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
index 68de16b7e5b..5ba9fb41156 100644
--- a/dlls/ntdll/unix/system.c
+++ b/dlls/ntdll/unix/system.c
@@ -2003,8 +2003,20 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
case SystemInterruptInformation:
{
SYSTEM_INTERRUPT_INFORMATION sii;
+ int dev_random;
{
SYSTEM_INTERRUPT_INFORMATION sii = {{ 0 }};
+ int dev_random;
memset(&sii, 0, sizeof(sii));
len = sizeof(sii);
+ /* Some applications use the returned buffer for random number
+ * generation. Its unlikely that an app depends on the exact
+ * layout, so just fill with values from /dev/urandom. */
+ dev_random = open( "/dev/urandom", O_RDONLY );
+ if (dev_random != -1)
+ {
+ read( dev_random, &sii, sizeof(sii) );
+ close( dev_random );
+ }
len = sizeof(sii);
+
if ( Length >= len)
{
if (!SystemInformation) ret = STATUS_ACCESS_VIOLATION;
+ /* Some applications use the returned buffer for random number
+ * generation. Its unlikely that an app depends on the exact
+ * layout, so just fill with values from /dev/urandom. */
+ dev_random = open( "/dev/urandom", O_RDONLY );
+ if (dev_random != -1)
+ {
+ read( dev_random, &sii, sizeof(sii) );
+ close( dev_random );
+ }
+
if (size >= len)
{
if (!info) ret = STATUS_ACCESS_VIOLATION;
--
2.6.4
2.27.0

View File

@@ -1,4 +1,4 @@
From ee3f09c31baedd50ab53179249b482eb51fcb0f3 Mon Sep 17 00:00:00 2001
From e2f505d4c63dde39dbbcc215a7801020b04e3c25 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Mon, 6 Aug 2018 21:32:56 -0500
Subject: [PATCH] ntdll: Don't call LdrQueryProcessModuleInformation in
@@ -12,30 +12,30 @@ This makes the anticheat engine in League of Legends 8.15+ happy.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45550
---
dlls/ntdll/nt.c | 19 ++++++++++++++++---
dlls/ntdll/unix/system.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index af22e58..80d3ef8 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -2493,9 +2493,22 @@ NTSTATUS WINAPI NtQuerySystemInformation(
}
break;
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
index 68de16b7e5b..a57b040c533 100644
--- a/dlls/ntdll/unix/system.c
+++ b/dlls/ntdll/unix/system.c
@@ -1930,9 +1930,22 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
}
case SystemModuleInformation:
- /* FIXME: should be system-wide */
- if (!SystemInformation) ret = STATUS_ACCESS_VIOLATION;
- else ret = LdrQueryProcessModuleInformation( SystemInformation, Length, &len );
+ if (!SystemInformation)
- if (!info) ret = STATUS_ACCESS_VIOLATION;
- else ret = LdrQueryProcessModuleInformation( info, size, &len );
+ if (!info)
+ ret = STATUS_ACCESS_VIOLATION;
+ else if (Length < FIELD_OFFSET( SYSTEM_MODULE_INFORMATION, Modules[1] ))
+ else if (size < FIELD_OFFSET( SYSTEM_MODULE_INFORMATION, Modules[1] ))
+ {
+ len = FIELD_OFFSET( SYSTEM_MODULE_INFORMATION, Modules[1] );
+ ret = STATUS_INFO_LENGTH_MISMATCH;
+ }
+ else
+ {
+ SYSTEM_MODULE_INFORMATION *smi = SystemInformation;
+ SYSTEM_MODULE_INFORMATION *smi = info;
+
+ FIXME("returning fake driver list\n");
+ smi->ModulesCount = 1;
@@ -43,8 +43,8 @@ index af22e58..80d3ef8 100644
+ ret = STATUS_SUCCESS;
+ }
break;
case SystemHandleInformation:
{
--
2.7.4
2.27.0

View File

@@ -1,19 +1,19 @@
From 77f0bfa7bbd70231a661397236124088af1ad76f Mon Sep 17 00:00:00 2001
From b4fb299179bc4c04fd78909a21b24fd7a6667e4c Mon Sep 17 00:00:00 2001
From: Andrew Wesie <awesie@gmail.com>
Date: Fri, 12 Apr 2019 20:04:03 -0500
Subject: [PATCH] ntdll: Return ntdll.dll as the first entry for
SystemModuleInformation.
---
dlls/ntdll/nt.c | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
dlls/ntdll/unix/system.c | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 54626307ede..77db670623c 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -2493,6 +2493,33 @@ BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature )
return feature < PROCESSOR_FEATURE_MAX && user_shared_data->ProcessorFeatures[feature];
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
index a57b040c533..f118db8a89f 100644
--- a/dlls/ntdll/unix/system.c
+++ b/dlls/ntdll/unix/system.c
@@ -1630,6 +1630,32 @@ static void get_performance_info( SYSTEM_PERFORMANCE_INFORMATION *info )
info->TotalCommitLimit = (totalram + totalswap) / page_size;
}
+static void get_ntdll_system_module(SYSTEM_MODULE *sm)
@@ -42,11 +42,10 @@ index 54626307ede..77db670623c 100644
+ ptr = strrchr(str.Buffer, '\\');
+ sm->NameOffset = (ptr != NULL) ? (ptr - str.Buffer + 1) : 0;
+}
+
/******************************************************************************
* NtQuerySystemInformation [NTDLL.@]
* ZwQuerySystemInformation [NTDLL.@]
@@ -2829,7 +2856,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
* NtQuerySystemInformation (NTDLL.@)
@@ -1943,7 +1969,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
FIXME("returning fake driver list\n");
smi->ModulesCount = 1;

View File

@@ -1,33 +1,33 @@
From 120d2e0cf3f75c087be14f65953980f5605f652e Mon Sep 17 00:00:00 2001
From ab068a620223a6566c2a1d089fb4583992359bd2 Mon Sep 17 00:00:00 2001
From: Andrew Wesie <awesie@gmail.com>
Date: Fri, 12 Apr 2019 20:06:08 -0500
Subject: [PATCH] ntdll: Add stub for
NtQuerySystemInformation(SystemModuleInformationEx).
---
dlls/ntdll/nt.c | 21 +++++++++++++++++++++
include/winternl.h | 9 +++++++++
2 files changed, 30 insertions(+)
dlls/ntdll/unix/system.c | 22 ++++++++++++++++++++++
include/winternl.h | 9 +++++++++
2 files changed, 31 insertions(+)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 3ce1b344dbd..935c6abec7f 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -3008,6 +3008,27 @@ NTSTATUS WINAPI NtQuerySystemInformation(
ret = STATUS_SUCCESS;
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
index f118db8a89f..eecde7dcf97 100644
--- a/dlls/ntdll/unix/system.c
+++ b/dlls/ntdll/unix/system.c
@@ -1974,6 +1974,28 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
}
break;
+ case SystemModuleInformationEx:
+ if (!SystemInformation)
+ if (!info)
+ ret = STATUS_ACCESS_VIOLATION;
+ else if (Length < sizeof(SYSTEM_MODULE_INFORMATION_EX))
+ else if (size < sizeof(SYSTEM_MODULE_INFORMATION_EX))
+ {
+ len = sizeof(SYSTEM_MODULE_INFORMATION_EX);
+ ret = STATUS_INFO_LENGTH_MISMATCH;
+ }
+ else
+ {
+ SYSTEM_MODULE_INFORMATION_EX *info = SystemInformation;
+ SYSTEM_MODULE_INFORMATION_EX *info = info;
+
+ FIXME("info_class SystemModuleInformationEx stub!\n");
+ get_ntdll_system_module(&info->BaseInfo);
@@ -38,14 +38,15 @@ index 3ce1b344dbd..935c6abec7f 100644
+ ret = STATUS_SUCCESS;
+ }
+ break;
+
case SystemHandleInformation:
{
struct handle_info *info;
{
struct handle_info *handle_info;
diff --git a/include/winternl.h b/include/winternl.h
index d315d68be8f..d2d1001897d 100644
index 3ff15f28c15..879b0931fc5 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2478,6 +2478,15 @@ typedef struct _SYSTEM_MODULE_INFORMATION
@@ -2469,6 +2469,15 @@ typedef struct _SYSTEM_MODULE_INFORMATION
#define PROCESS_CREATE_FLAGS_SUSPENDED 0x00000200
#define PROCESS_CREATE_FLAGS_EXTENDED_UNKNOWN 0x00000400
@@ -62,5 +63,5 @@ index d315d68be8f..d2d1001897d 100644
#define THREAD_CREATE_FLAGS_SKIP_THREAD_ATTACH 0x00000002
#define THREAD_CREATE_FLAGS_HIDE_FROM_DEBUGGER 0x00000004
--
2.26.2
2.27.0

View File

@@ -1,28 +0,0 @@
From 263b120ed5f5e9464f240e42800ab63752d16b96 Mon Sep 17 00:00:00 2001
From: David Torok <dt@zeroitlab.com>
Date: Tue, 19 Nov 2019 23:01:46 +0100
Subject: [PATCH] ntdll: Stub NtQueryInformationThread(ThreadHideFromDebugger).
---
dlls/ntdll/unix/thread.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
index d26e0a98cac..e2a092e30a8 100644
--- a/dlls/ntdll/unix/thread.c
+++ b/dlls/ntdll/unix/thread.c
@@ -1063,6 +1063,11 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
#endif
}
+ case ThreadHideFromDebugger:
+ if (length != sizeof(BOOLEAN)) return STATUS_INFO_LENGTH_MISMATCH;
+ *(BOOLEAN *)data = TRUE;
+ if (ret_len) *ret_len = sizeof(BOOLEAN);
+ return STATUS_SUCCESS;
case ThreadPriority:
case ThreadBasePriority:
case ThreadImpersonationToken:
--
2.27.0

View File

@@ -1 +0,0 @@
Fixes: [48138] League of Legends 9.23: Crash after champ select

View File

@@ -1,4 +1,4 @@
From 9cdc9d195760a55263ba0bb7926e6e4d776cbd04 Mon Sep 17 00:00:00 2001
From 2efee8f30caa027977f7cfb91a84b748a5fd17cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 4 Oct 2014 02:53:22 +0200
Subject: [PATCH] ntdll: Setup a temporary signal handler during process
@@ -14,19 +14,19 @@ Subject: [PATCH] ntdll: Setup a temporary signal handler during process
6 files changed, 73 insertions(+)
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 4db78fec823..91b98c44b3f 100644
index 73c24eff549..8881d073684 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -1244,6 +1244,7 @@ void __wine_main( int argc, char *argv[], char *envp[] )
@@ -1761,6 +1761,7 @@ void __wine_main( int argc, char *argv[], char *envp[] )
#endif
virtual_init();
+ signal_init_early();
module = load_ntdll();
fixup_ntdll_imports( &__wine_spec_nt_header, module );
ntdll_module = load_ntdll();
fixup_ntdll_imports( &__wine_spec_nt_header );
diff --git a/dlls/ntdll/unix/signal_arm.c b/dlls/ntdll/unix/signal_arm.c
index faa2952a483..43e0fb848a3 100644
index e65b8a93d18..d7a9323a195 100644
--- a/dlls/ntdll/unix/signal_arm.c
+++ b/dlls/ntdll/unix/signal_arm.c
@@ -869,6 +869,12 @@ void signal_init_process(void)
@@ -43,7 +43,7 @@ index faa2952a483..43e0fb848a3 100644
/***********************************************************************
* init_thread_context
diff --git a/dlls/ntdll/unix/signal_arm64.c b/dlls/ntdll/unix/signal_arm64.c
index e2c52a1a4f6..f3c67e1f5f4 100644
index 7f8fb708ccd..574633dbd5d 100644
--- a/dlls/ntdll/unix/signal_arm64.c
+++ b/dlls/ntdll/unix/signal_arm64.c
@@ -791,6 +791,13 @@ void signal_init_process(void)
@@ -61,7 +61,7 @@ index e2c52a1a4f6..f3c67e1f5f4 100644
* init_thread_context
*/
diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c
index adf622ca673..44d0848a1ee 100644
index 2f5d397ed55..c29a006736a 100644
--- a/dlls/ntdll/unix/signal_i386.c
+++ b/dlls/ntdll/unix/signal_i386.c
@@ -1644,6 +1644,30 @@ static BOOL handle_interrupt( unsigned int interrupt, ucontext_t *sigcontext, st
@@ -131,7 +131,7 @@ index adf622ca673..44d0848a1ee 100644
/***********************************************************************
* init_thread_context
diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c
index 1bf8f5e8b8e..73c6ba4c34e 100644
index 88ee18461a2..dedc17bf60e 100644
--- a/dlls/ntdll/unix/signal_x86_64.c
+++ b/dlls/ntdll/unix/signal_x86_64.c
@@ -1415,6 +1415,12 @@ void signal_init_process(void)
@@ -148,10 +148,10 @@ index 1bf8f5e8b8e..73c6ba4c34e 100644
/***********************************************************************
* init_thread_context
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index 95d4e2c2441..d88cf97f4b7 100644
index 7dbfde43b34..fbcd200c420 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -193,6 +193,7 @@ extern NTSTATUS signal_alloc_thread( TEB *teb ) DECLSPEC_HIDDEN;
@@ -207,6 +207,7 @@ extern NTSTATUS signal_alloc_thread( TEB *teb ) DECLSPEC_HIDDEN;
extern void signal_free_thread( TEB *teb ) DECLSPEC_HIDDEN;
extern void signal_init_thread( TEB *teb ) DECLSPEC_HIDDEN;
extern void signal_init_process(void) DECLSPEC_HIDDEN;

View File

@@ -1,4 +1,4 @@
From 8fe1b6c64671ab1fc5af0099b23021eae0a046d7 Mon Sep 17 00:00:00 2001
From d1536aa5b9df87c3764dc2090bdde76f708fda94 Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Wed, 9 Sep 2015 05:31:18 +0800
Subject: [PATCH] ntdll: Initialize mod_name to zero.
@@ -8,11 +8,11 @@ Subject: [PATCH] ntdll: Initialize mod_name to zero.
1 file changed, 2 insertions(+)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 0568be63ad8..98472b060e1 100644
index 42cdc628021..ef1e28af2e7 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -1363,6 +1363,8 @@ static NTSTATUS MODULE_InitDLL( WINE_MODREF *wm, UINT reason, LPVOID lpReserved
if (wm->so_handle && reason == DLL_PROCESS_ATTACH) call_constructors( wm );
@@ -1299,6 +1299,8 @@ static NTSTATUS MODULE_InitDLL( WINE_MODREF *wm, UINT reason, LPVOID lpReserved
unix_funcs->init_builtin_dll( wm->ldr.DllBase );
if (!entry) return STATUS_SUCCESS;
+ memset( mod_name, 0, sizeof(mod_name) );
@@ -21,5 +21,5 @@ index 0568be63ad8..98472b060e1 100644
{
size_t len = min( wm->ldr.BaseDllName.Length, sizeof(mod_name)-sizeof(WCHAR) );
--
2.26.0
2.27.0

View File

@@ -1,4 +1,4 @@
From e25066ea9c9e0442d4c18c13818071c104a9c5d2 Mon Sep 17 00:00:00 2001
From f8c60f99727799ff3d5910e99155db0a356e4d77 Mon Sep 17 00:00:00 2001
From: Martin Storsjo <martin@martin.st>
Date: Wed, 16 Aug 2017 23:48:40 +0300
Subject: [PATCH] ntdll: Always restore TEB to x18 on aarch 64 on return from
@@ -20,24 +20,24 @@ Signed-off-by: Martin Storsjo <martin@martin.st>
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 0568be63ad8..b7612dcc9a7 100644
index 42cdc628021..7b92330e874 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -2036,7 +2036,13 @@ static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRIN
SERVER_END_REQ;
@@ -1924,7 +1924,13 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name,
/* setup relay debugging entry points */
- if (TRACE_ON(relay)) RELAY_SetupDLL( module );
if (image_info->image_flags & IMAGE_FLAGS_WineBuiltin)
{
- if (TRACE_ON(relay)) RELAY_SetupDLL( *module );
+#ifdef __aarch64__
+ /* Always enable relay entry points on aarch64, to allow restoring
+ * the TEB to x18. */
+ /* Always enable relay entry points on aarch64, to allow restoring
+ * the TEB to x18. */
+#else
+ if (TRACE_ON(relay))
+ if (TRACE_ON(relay))
+#endif
+ RELAY_SetupDLL( module );
*pwm = wm;
return STATUS_SUCCESS;
+ RELAY_SetupDLL( *module );
}
else
{
diff --git a/dlls/ntdll/relay.c b/dlls/ntdll/relay.c
index acccf088811..35dd4161d8b 100644
--- a/dlls/ntdll/relay.c
@@ -56,5 +56,5 @@ index acccf088811..35dd4161d8b 100644
}
--
2.26.0
2.27.0

View File

@@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "449b8c7e9212d0a80e28babff20f2755b7370872"
echo "bc282905d9491b9f9fe4ae4b69a8ccdf99c5aaa8"
}
# Show version information
@@ -196,7 +196,6 @@ patch_enable_all ()
enable_ntdll_SystemInterruptInformation="$1"
enable_ntdll_SystemModuleInformation="$1"
enable_ntdll_SystemRoot_Symlink="$1"
enable_ntdll_ThreadHideFromDebugger="$1"
enable_ntdll_Threading="$1"
enable_ntdll_WRITECOPY="$1"
enable_ntdll_Zero_mod_name="$1"
@@ -681,9 +680,6 @@ patch_enable ()
ntdll-SystemRoot_Symlink)
enable_ntdll_SystemRoot_Symlink="$2"
;;
ntdll-ThreadHideFromDebugger)
enable_ntdll_ThreadHideFromDebugger="$2"
;;
ntdll-Threading)
enable_ntdll_Threading="$2"
;;
@@ -1577,6 +1573,13 @@ if test "$enable_shell32_Progress_Dialog" -eq 1; then
enable_shell32_SHFileOperation_Move=1
fi
if test "$enable_server_Object_Types" -eq 1; then
if test "$enable_ntdll_SystemModuleInformation" -gt 1; then
abort "Patchset ntdll-SystemModuleInformation disabled, but server-Object_Types depends on that."
fi
enable_ntdll_SystemModuleInformation=1
fi
if test "$enable_server_Inherited_ACLs" -eq 1; then
if test "$enable_server_Stored_ACLs" -gt 1; then
abort "Patchset server-Stored_ACLs disabled, but server-Inherited_ACLs depends on that."
@@ -1645,12 +1648,16 @@ if test "$enable_ntdll_Syscall_Emulation" -eq 1; then
fi
if test "$enable_winebuild_Fake_Dlls" -eq 1; then
if test "$enable_ntdll_ApiSetMap" -gt 1; then
abort "Patchset ntdll-ApiSetMap disabled, but winebuild-Fake_Dlls depends on that."
fi
if test "$enable_ntdll_WRITECOPY" -gt 1; then
abort "Patchset ntdll-WRITECOPY disabled, but winebuild-Fake_Dlls depends on that."
fi
if test "$enable_ws2_32_WSACleanup" -gt 1; then
abort "Patchset ws2_32-WSACleanup disabled, but winebuild-Fake_Dlls depends on that."
fi
enable_ntdll_ApiSetMap=1
enable_ntdll_WRITECOPY=1
enable_ws2_32_WSACleanup=1
fi
@@ -2691,16 +2698,10 @@ fi
# | * dlls/directmanipulation/directmanipulation.c
# |
if test "$enable_directmanipulation_new_dll" -eq 1; then
patch_apply directmanipulation-new-dll/0011-directmanipulation-Implement-IDirectManipulationMana.patch
patch_apply directmanipulation-new-dll/0013-directmanipulation-Fake-success-from-IDirectManipula.patch
patch_apply directmanipulation-new-dll/0015-directmanipulation-Implement-IDirectManipulationView.patch
patch_apply directmanipulation-new-dll/0016-directmanipulation-Support-IDirectManipulationConten.patch
patch_apply directmanipulation-new-dll/0017-directmanipulation-Fake-success-in-some-functions.patch
(
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Implement IDirectManipulationManager2 CreateViewport.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Fake success from IDirectManipulationViewport2 ActivateConfiguration.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Implement IDirectManipulationViewport2 GetPrimaryContent.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Support IDirectManipulationContent in IDirectManipulationPrimaryContent interface.", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Fake success in some functions.", 1 },';
) >> "$patchlist"
fi
@@ -3916,7 +3917,7 @@ fi
# Patchset winebuild-Fake_Dlls
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ntdll-WRITECOPY, ws2_32-WSACleanup
# | * ntdll-ApiSetMap, ntdll-WRITECOPY, ws2_32-WSACleanup
# |
# | This patchset fixes the following Wine bugs:
# | * [#21232] Chromium-based browser engines (Chrome, Opera, Comodo Dragon, SRWare Iron) crash on startup unless '--no-
@@ -3968,7 +3969,7 @@ fi
# Patchset ntdll-Syscall_Emulation
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ntdll-WRITECOPY, ws2_32-WSACleanup, winebuild-Fake_Dlls
# | * ntdll-ApiSetMap, ntdll-WRITECOPY, ws2_32-WSACleanup, winebuild-Fake_Dlls
# |
# | This patchset fixes the following Wine bugs:
# | * [#48291] Detroit: Become Human crashes on launch
@@ -3991,7 +3992,7 @@ fi
# | SystemExtendedProcessInformation)
# |
# | Modified files:
# | * dlls/ntdll/nt.c
# | * dlls/ntdll/unix/system.c
# |
if test "$enable_ntdll_SystemExtendedProcessInformation" -eq 1; then
patch_apply ntdll-SystemExtendedProcessInformation/0001-ntdll-Add-stub-for-NtQuerySystemInformation-SystemEx.patch
@@ -4009,7 +4010,7 @@ fi
# | * [#49192] ntdll: NtQuerySystemInformation support SystemCodeIntegrityInformation
# |
# | Modified files:
# | * dlls/ntdll/nt.c, include/winternl.h
# | * dlls/ntdll/unix/system.c, include/winternl.h
# |
if test "$enable_ntdll_SystemCodeIntegrityInformation" -eq 1; then
patch_apply ntdll-SystemCodeIntegrityInformation/0001-ntdll-NtQuerySystemInformation-support-SystemCodeInt.patch
@@ -4024,7 +4025,7 @@ fi
# | * [#39123] Return buffer filled with random values from SystemInterruptInformation
# |
# | Modified files:
# | * dlls/ntdll/nt.c
# | * dlls/ntdll/unix/system.c
# |
if test "$enable_ntdll_SystemInterruptInformation" -eq 1; then
patch_apply ntdll-SystemInterruptInformation/0001-ntdll-Return-buffer-filled-with-random-values-from-S.patch
@@ -4042,7 +4043,7 @@ fi
# | NtQuerySystemInformation(SystemModuleInformationEx) in Windows Vista+ mode
# |
# | Modified files:
# | * dlls/ntdll/nt.c, include/winternl.h
# | * dlls/ntdll/unix/system.c, include/winternl.h
# |
if test "$enable_ntdll_SystemModuleInformation" -eq 1; then
patch_apply ntdll-SystemModuleInformation/0001-ntdll-Don-t-call-LdrQueryProcessModuleInformation-in.patch
@@ -4067,21 +4068,6 @@ if test "$enable_ntdll_SystemRoot_Symlink" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-ThreadHideFromDebugger
# |
# | This patchset fixes the following Wine bugs:
# | * [#48138] League of Legends 9.23: Crash after champ select
# |
# | Modified files:
# | * dlls/ntdll/unix/thread.c
# |
if test "$enable_ntdll_ThreadHideFromDebugger" -eq 1; then
patch_apply ntdll-ThreadHideFromDebugger/0001-ntdll-Stub-NtQueryInformationThread-ThreadHideFromDe.patch
(
printf '%s\n' '+ { "David Torok", "ntdll: Stub NtQueryInformationThread(ThreadHideFromDebugger).", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-Threading
# |
# | Modified files:
@@ -4429,21 +4415,19 @@ fi
# | * [#46967] GOG Galaxy doesn't run in virtual desktop.
# |
# | Modified files:
# | * dlls/user32/tests/winstation.c, programs/explorer/desktop.c, server/async.c, server/atom.c, server/change.c,
# | server/clipboard.c, server/completion.c, server/console.c, server/debugger.c, server/device.c, server/directory.c,
# | server/event.c, server/fd.c, server/file.c, server/handle.c, server/handle.h, server/hook.c, server/mailslot.c,
# | server/mapping.c, server/mutex.c, server/named_pipe.c, server/object.c, server/object.h, server/process.c,
# | server/queue.c, server/registry.c, server/request.c, server/semaphore.c, server/serial.c, server/signal.c,
# | server/snapshot.c, server/sock.c, server/symlink.c, server/thread.c, server/timer.c, server/token.c, server/winstation.c
# | * programs/explorer/desktop.c, server/async.c, server/atom.c, server/change.c, server/clipboard.c, server/completion.c,
# | server/console.c, server/debugger.c, server/device.c, server/directory.c, server/event.c, server/fd.c, server/file.c,
# | server/handle.c, server/handle.h, server/hook.c, server/mailslot.c, server/mapping.c, server/mutex.c,
# | server/named_pipe.c, server/object.c, server/object.h, server/process.c, server/queue.c, server/registry.c,
# | server/request.c, server/semaphore.c, server/serial.c, server/signal.c, server/snapshot.c, server/sock.c,
# | server/symlink.c, server/thread.c, server/timer.c, server/token.c, server/winstation.c
# |
if test "$enable_server_Desktop_Refcount" -eq 1; then
patch_apply server-Desktop_Refcount/0001-server-Introduce-a-new-alloc_handle-object-callback..patch
patch_apply server-Desktop_Refcount/0002-server-Track-desktop-handle-count-more-correctly.patch
patch_apply server-Desktop_Refcount/0004-server-Assign-random-name-when-no-name-was-passed-to.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "server: Introduce a new alloc_handle object callback.", 2 },';
printf '%s\n' '+ { "Sebastian Lackner", "server: Track desktop handle count more correctly.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "server: Assign random name when no name was passed to create_winstation.", 1 },';
) >> "$patchlist"
fi
@@ -4559,12 +4543,15 @@ fi
# Patchset server-Object_Types
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * ntdll-SystemModuleInformation
# |
# | This patchset fixes the following Wine bugs:
# | * [#44629] Process Hacker can't enumerate handles
# | * [#45374] Yet Another Process Monitor (.NET 2.0 app) reports System.AccessViolationException
# |
# | Modified files:
# | * dlls/ntdll/nt.c, dlls/ntdll/om.c, dlls/ntdll/tests/info.c, dlls/ntdll/tests/om.c, include/winternl.h,
# | * dlls/ntdll/om.c, dlls/ntdll/tests/info.c, dlls/ntdll/tests/om.c, dlls/ntdll/unix/system.c, include/winternl.h,
# | server/completion.c, server/directory.c, server/event.c, server/file.c, server/handle.c, server/mailslot.c,
# | server/main.c, server/mapping.c, server/mutex.c, server/named_pipe.c, server/object.c, server/object.h,
# | server/process.c, server/protocol.def, server/registry.c, server/semaphore.c, server/symlink.c, server/thread.c,
@@ -5330,15 +5317,12 @@ fi
# |
# | Modified files:
# | * dlls/dinput/device_private.h, dlls/dinput/dinput_main.c, dlls/dinput/mouse.c, dlls/dinput8/tests/device.c,
# | dlls/user32/input.c, dlls/user32/rawinput.c, dlls/user32/tests/input.c, dlls/user32/user32.spec,
# | dlls/wineandroid.drv/keyboard.c, dlls/wineandroid.drv/window.c, dlls/winemac.drv/ime.c, dlls/winemac.drv/keyboard.c,
# | dlls/winemac.drv/mouse.c, dlls/winex11.drv/event.c, dlls/winex11.drv/keyboard.c, dlls/winex11.drv/mouse.c,
# | dlls/winex11.drv/x11drv.h, dlls/winex11.drv/x11drv_main.c, include/winuser.h, server/protocol.def, server/queue.c
# | dlls/user32/input.c, dlls/user32/rawinput.c, dlls/user32/user32.spec, dlls/wineandroid.drv/keyboard.c,
# | dlls/wineandroid.drv/window.c, dlls/winemac.drv/ime.c, dlls/winemac.drv/keyboard.c, dlls/winemac.drv/mouse.c,
# | dlls/winex11.drv/event.c, dlls/winex11.drv/keyboard.c, dlls/winex11.drv/mouse.c, dlls/winex11.drv/x11drv.h,
# | dlls/winex11.drv/x11drv_main.c, include/winuser.h, server/protocol.def, server/queue.c
# |
if test "$enable_user32_rawinput_mouse" -eq 1; then
patch_apply user32-rawinput-mouse/0001-user32-tests-Add-rawinput-test-for-ClipCursor-intera.patch
patch_apply user32-rawinput-mouse/0002-user32-tests-Add-rawinput-test-for-cross-thread-inte.patch
patch_apply user32-rawinput-mouse/0003-user32-tests-Add-rawinput-test-for-cross-process-int.patch
patch_apply user32-rawinput-mouse/0004-server-Add-send_hardware_message-flags-for-rawinput-.patch
patch_apply user32-rawinput-mouse/0005-server-Broadcast-rawinput-message-if-request-flag-is.patch
patch_apply user32-rawinput-mouse/0006-user32-Add-__wine_send_input-flags-to-hint-raw-input.patch
@@ -5350,9 +5334,6 @@ if test "$enable_user32_rawinput_mouse" -eq 1; then
patch_apply user32-rawinput-mouse/0012-dinput8-Use-raw-input-interface-for-dinput8-mouse-de.patch
patch_apply user32-rawinput-mouse/0013-dinput-Fix-rawinput-events-sequence-number.patch
(
printf '%s\n' '+ { "Rémi Bernon", "user32/tests: Add rawinput test for ClipCursor interactions.", 1 },';
printf '%s\n' '+ { "Rémi Bernon", "user32/tests: Add rawinput test for cross-thread interactions.", 1 },';
printf '%s\n' '+ { "Rémi Bernon", "user32/tests: Add rawinput test for cross-process interactions.", 1 },';
printf '%s\n' '+ { "Rémi Bernon", "server: Add send_hardware_message flags for rawinput translation.", 1 },';
printf '%s\n' '+ { "Rémi Bernon", "server: Broadcast rawinput message if request flag is SEND_HWMSG_RAWINPUT.", 1 },';
printf '%s\n' '+ { "Rémi Bernon", "user32: Add __wine_send_input flags to hint raw input translation.", 1 },';

View File

@@ -1,79 +0,0 @@
From 64f380eeb8ba1de36b47b6035510373fd1edeaac Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 24 Feb 2016 19:18:52 +0100
Subject: [PATCH] server: Assign random name when no name was passed to
create_winstation.
---
dlls/user32/tests/winstation.c | 4 ++--
server/winstation.c | 23 ++++++++++++++++++++++-
2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/dlls/user32/tests/winstation.c b/dlls/user32/tests/winstation.c
index 4aa5565b96c..9eb3b433c11 100644
--- a/dlls/user32/tests/winstation.c
+++ b/dlls/user32/tests/winstation.c
@@ -225,8 +225,8 @@ static void test_handles(void)
memset( buffer, 0, sizeof(buffer) );
ret = GetUserObjectInformationA( w2, UOI_NAME, buffer, sizeof(buffer), &size );
ok( ret, "GetUserObjectInformationA failed with error %u\n", GetLastError() );
- todo_wine ok( !memcmp(buffer, "Service-0x0-", 12), "unexpected window station name '%s'\n", buffer );
- todo_wine ok( buffer[strlen(buffer) - 1] == '$', "unexpected window station name '%s'\n", buffer );
+ ok( !memcmp(buffer, "Service-0x0-", 12), "unexpected window station name '%s'\n", buffer );
+ ok( buffer[strlen(buffer) - 1] == '$', "unexpected window station name '%s'\n", buffer );
SetLastError( 0xdeadbeef );
w3 = OpenWindowStationA( "", TRUE, WINSTA_ALL_ACCESS );
diff --git a/server/winstation.c b/server/winstation.c
index b120859b39a..fee8980224c 100644
--- a/server/winstation.c
+++ b/server/winstation.c
@@ -38,6 +38,7 @@
#include "user.h"
#include "file.h"
#include "security.h"
+#include "unicode.h"
static struct list winstation_list = LIST_INIT(winstation_list);
@@ -114,9 +115,28 @@ static const struct object_ops desktop_ops =
static struct winstation *create_winstation( struct object *root, const struct unicode_str *name,
unsigned int attr, unsigned int flags )
{
+ static unsigned int id = 0x10000;
struct winstation *winstation;
+ struct unicode_str default_name;
+ char buffer[32];
- if ((winstation = create_named_object( root, &winstation_ops, name, attr, NULL )))
+ if (name->len)
+ {
+ winstation = create_named_object( root, &winstation_ops, name, attr, NULL );
+ goto done;
+ }
+
+ do
+ {
+ if (!++id) id = 1; /* avoid an id of 0 */
+ sprintf( buffer, "Service-0x0-%x$", id);
+ ascii_to_unicode_str( buffer, &default_name );
+ winstation = create_named_object( root, &winstation_ops, &default_name, attr & ~OBJ_OPENIF, NULL );
+ }
+ while (!winstation && get_error() == STATUS_OBJECT_NAME_COLLISION);
+
+done:
+ if (winstation)
{
if (get_error() != STATUS_OBJECT_NAME_EXISTS)
{
@@ -134,6 +154,7 @@ static struct winstation *create_winstation( struct object *root, const struct u
}
else clear_error();
}
+
return winstation;
}
--
2.25.1

Some files were not shown because too many files have changed in this diff Show More