winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 2021
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
728 discussions
Start a n
N
ew thread
Paul Gofman : ole32: Do not link OLE clipboard object lifecycle to OLE initialization state.
by Alexandre Julliard
26 Jul '21
26 Jul '21
Module: wine Branch: master Commit: 71aeb64c7350fc38b08ba797690a42ff618ce149 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=71aeb64c7350fc38b08ba797…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Mon Jul 26 11:28:13 2021 +0100 ole32: Do not link OLE clipboard object lifecycle to OLE initialization state. Fixes text paste in Origin launcher and overlay. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/clipboard.c | 111 +++++++++++++++++++++++++------------------ dlls/ole32/compobj.c | 1 + dlls/ole32/compobj_private.h | 2 + dlls/ole32/ole2.c | 12 ++--- dlls/ole32/tests/clipboard.c | 29 +++++++++-- 5 files changed, 98 insertions(+), 57 deletions(-) diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c index a1e68c64845..1cad47a6a47 100644 --- a/dlls/ole32/clipboard.c +++ b/dlls/ole32/clipboard.c @@ -170,7 +170,7 @@ typedef struct PresentationDataHeader } PresentationDataHeader; /* - * The one and only ole_clipbrd object which is created by OLEClipbrd_Initialize() + * The one and only ole_clipbrd object which is created by clipbrd_create() */ static ole_clipbrd* theOleClipboard; @@ -202,9 +202,6 @@ UINT ole_private_data_clipboard_format = 0; static UINT wine_marshal_clipboard_format; -/********************************************************* - * register_clipboard_formats - */ static void register_clipboard_formats(void) { ownerlink_clipboard_format = RegisterClipboardFormatW(L"OwnerLink"); @@ -222,56 +219,58 @@ static void register_clipboard_formats(void) wine_marshal_clipboard_format = RegisterClipboardFormatW(L"Wine Marshalled DataObject"); } -/*********************************************************************** - * OLEClipbrd_Initialize() - * Initializes the OLE clipboard. - */ -void OLEClipbrd_Initialize(void) +static BOOL WINAPI clipbrd_create(INIT_ONCE *init_once, void *parameter, void **context) { - register_clipboard_formats(); - - if ( !theOleClipboard ) - { - ole_clipbrd* clipbrd; - HGLOBAL h; + ole_clipbrd* clipbrd; + HGLOBAL h; - TRACE("()\n"); + TRACE("()\n"); - clipbrd = HeapAlloc( GetProcessHeap(), 0, sizeof(*clipbrd) ); - if (!clipbrd) return; + register_clipboard_formats(); - clipbrd->latest_snapshot = NULL; - clipbrd->window = NULL; - clipbrd->src_data = NULL; - clipbrd->cached_enum = NULL; + clipbrd = HeapAlloc( GetProcessHeap(), 0, sizeof(*clipbrd) ); + if (!clipbrd) + { + ERR("No memory.\n"); + return FALSE; + } - h = GlobalAlloc(GMEM_DDESHARE | GMEM_MOVEABLE, 0); - if(!h) - { - HeapFree(GetProcessHeap(), 0, clipbrd); - return; - } + clipbrd->latest_snapshot = NULL; + clipbrd->window = NULL; + clipbrd->src_data = NULL; + clipbrd->cached_enum = NULL; - if(FAILED(CreateStreamOnHGlobal(h, TRUE, &clipbrd->marshal_data))) - { - GlobalFree(h); - HeapFree(GetProcessHeap(), 0, clipbrd); - return; - } + h = GlobalAlloc(GMEM_DDESHARE | GMEM_MOVEABLE, 0); + if(!h) + { + ERR("No memory.\n"); + HeapFree(GetProcessHeap(), 0, clipbrd); + return FALSE; + } - theOleClipboard = clipbrd; + if(FAILED(CreateStreamOnHGlobal(h, TRUE, &clipbrd->marshal_data))) + { + ERR("CreateStreamOnHGlobal failed.\n"); + GlobalFree(h); + HeapFree(GetProcessHeap(), 0, clipbrd); + return FALSE; } + + theOleClipboard = clipbrd; + return TRUE; } static inline HRESULT get_ole_clipbrd(ole_clipbrd **clipbrd) { - struct oletls *info = COM_CurrentInfo(); - *clipbrd = NULL; + static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT; - if(!info->ole_inits) + if (!InitOnceExecuteOnce(&init_once, clipbrd_create, NULL, NULL)) + { + *clipbrd = NULL; return CO_E_NOTINITIALIZED; - *clipbrd = theOleClipboard; + } + *clipbrd = theOleClipboard; return S_OK; } @@ -2000,10 +1999,10 @@ static HRESULT set_src_dataobject(ole_clipbrd *clipbrd, IDataObject *data) } /*********************************************************************** - * OLEClipbrd_UnInitialize() + * clipbrd_uninitialize() * Un-Initializes the OLE clipboard */ -void OLEClipbrd_UnInitialize(void) +void clipbrd_uninitialize(void) { ole_clipbrd *clipbrd = theOleClipboard; @@ -2023,14 +2022,28 @@ void OLEClipbrd_UnInitialize(void) { DestroyWindow(clipbrd->window); UnregisterClassW( clipbrd_wndclass, GetModuleHandleW(L"ole32") ); + clipbrd->window = NULL; } - - IStream_Release(clipbrd->marshal_data); - HeapFree(GetProcessHeap(), 0, clipbrd); - theOleClipboard = NULL; } } +/*********************************************************************** + * clipbrd_destroy() + * Destroy the OLE clipboard + */ +void clipbrd_destroy(void) +{ + ole_clipbrd *clipbrd = theOleClipboard; + + if (!clipbrd) return; + + clipbrd_uninitialize(); + + IStream_Release(clipbrd->marshal_data); + HeapFree(GetProcessHeap(), 0, clipbrd); + theOleClipboard = NULL; +} + /*********************************************************************** * clipbrd_wndproc */ @@ -2164,12 +2177,16 @@ static HRESULT set_dataobject_format(HWND hwnd) HRESULT WINAPI OleSetClipboard(IDataObject* data) { + struct oletls *info = COM_CurrentInfo(); HRESULT hr; ole_clipbrd *clipbrd; HWND wnd; TRACE("(%p)\n", data); + if(!info->ole_inits) + return CO_E_NOTINITIALIZED; + if(FAILED(hr = get_ole_clipbrd(&clipbrd))) return hr; if(FAILED(hr = get_clipbrd_window(clipbrd, &wnd))) return hr; @@ -2258,6 +2275,7 @@ HRESULT WINAPI OleGetClipboard(IDataObject **obj) */ HRESULT WINAPI OleFlushClipboard(void) { + struct oletls *info = COM_CurrentInfo(); HRESULT hr; ole_clipbrd *clipbrd; HWND wnd; @@ -2266,6 +2284,9 @@ HRESULT WINAPI OleFlushClipboard(void) if(FAILED(hr = get_ole_clipbrd(&clipbrd))) return hr; + if(!info->ole_inits) + return E_FAIL; + if(FAILED(hr = get_clipbrd_window(clipbrd, &wnd))) return hr; /* diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index c40d8d03b2d..815fdcb11d0 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -937,6 +937,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID reserved) break; case DLL_PROCESS_DETACH: + clipbrd_destroy(); if (reserved) break; release_std_git(); break; diff --git a/dlls/ole32/compobj_private.h b/dlls/ole32/compobj_private.h index 3c0e338127c..34f5a8ec485 100644 --- a/dlls/ole32/compobj_private.h +++ b/dlls/ole32/compobj_private.h @@ -132,6 +132,8 @@ extern UINT object_descriptor_clipboard_format DECLSPEC_HIDDEN; extern UINT link_source_descriptor_clipboard_format DECLSPEC_HIDDEN; extern UINT ole_private_data_clipboard_format DECLSPEC_HIDDEN; +void clipbrd_destroy(void) DECLSPEC_HIDDEN; + extern LSTATUS create_classes_key(HKEY, const WCHAR *, REGSAM, HKEY *) DECLSPEC_HIDDEN; extern LSTATUS open_classes_key(HKEY, const WCHAR *, REGSAM, HKEY *) DECLSPEC_HIDDEN; diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index f2224ad5b6a..3f8f9b3232b 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -133,10 +133,9 @@ static LRESULT CALLBACK OLEMenu_CallWndProc(INT code, WPARAM wParam, LPARAM lPar static LRESULT CALLBACK OLEMenu_GetMsgProc(INT code, WPARAM wParam, LPARAM lParam); /****************************************************************************** - * These are the prototypes of the OLE Clipboard initialization methods (in clipboard.c) + * This is a prototype of the OLE Clipboard uninitialization method (in clipboard.c) */ -extern void OLEClipbrd_UnInitialize(void); -extern void OLEClipbrd_Initialize(void); +extern void clipbrd_uninitialize(void); /****************************************************************************** * These are the prototypes of the utility methods used for OLE Drag n Drop @@ -197,11 +196,6 @@ HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved) */ TRACE("() - Initializing the OLE libraries\n"); - /* - * OLE Clipboard - */ - OLEClipbrd_Initialize(); - /* * Drag and Drop */ @@ -241,7 +235,7 @@ void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void) /* * OLE Clipboard */ - OLEClipbrd_UnInitialize(); + clipbrd_uninitialize(); /* * OLE shared menu diff --git a/dlls/ole32/tests/clipboard.c b/dlls/ole32/tests/clipboard.c index fd8f287680b..97575371edc 100644 --- a/dlls/ole32/tests/clipboard.c +++ b/dlls/ole32/tests/clipboard.c @@ -503,13 +503,27 @@ static HRESULT DataObjectImpl_CreateComplex(LPDATAOBJECT *lplpdataobj) static void test_get_clipboard_uninitialized(void) { - HRESULT hr; + REFCLSID rclsid = &CLSID_InternetZoneManager; IDataObject *pDObj; + IUnknown *pUnk; + HRESULT hr; pDObj = (IDataObject *)0xdeadbeef; hr = OleGetClipboard(&pDObj); - todo_wine ok(hr == S_OK, "OleGetClipboard() got 0x%08x instead of 0x%08x\n", hr, S_OK); - if (pDObj && pDObj != (IDataObject *)0xdeadbeef) IDataObject_Release(pDObj); + ok(hr == S_OK, "OleGetClipboard() got 0x%08x instead of 0x%08x\n", hr, S_OK); + ok(!!pDObj && pDObj != (IDataObject *)0xdeadbeef, "Got unexpected pDObj %p.\n", pDObj); + + /* COM is still not initialized. */ + hr = CoCreateInstance(rclsid, NULL, 0x17, &IID_IUnknown, (void **)&pUnk); + ok(hr == CO_E_NOTINITIALIZED, "Got unexpected hr %#x.\n", hr); + + hr = OleFlushClipboard(); + ok(hr == E_FAIL, "Got unexpected hr %#x.\n", hr); + + hr = OleIsCurrentClipboard(pDObj); + ok(hr == S_FALSE, "Got unexpected hr %#x.\n", hr); + + IDataObject_Release(pDObj); } static void test_get_clipboard(void) @@ -1288,6 +1302,15 @@ static void test_consumer_refs(void) refs = count_refs(src); ok(refs == 2, "%d\n", refs); + OleInitialize(NULL); + hr = OleSetClipboard(NULL); + ok(hr == S_OK, "Failed to clear clipboard, hr %#x.\n", hr); + + OleUninitialize(); + + refs = count_refs(src); + ok(refs == 2, "%d\n", refs); + IDataObject_Release(src); }
1
0
0
0
Paul Gofman : ole32: Move OLEClipbrd_Initialize() before get_ole_clipbrd().
by Alexandre Julliard
26 Jul '21
26 Jul '21
Module: wine Branch: master Commit: 949a48498c5f383e4e5b8d255e214a5f3026532e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=949a48498c5f383e4e5b8d25…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Mon Jul 26 11:28:12 2021 +0100 ole32: Move OLEClipbrd_Initialize() before get_ole_clipbrd(). Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/clipboard.c | 146 ++++++++++++++++++++++++------------------------- 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c index d15bf23217a..a1e68c64845 100644 --- a/dlls/ole32/clipboard.c +++ b/dlls/ole32/clipboard.c @@ -183,18 +183,6 @@ static CRITICAL_SECTION_DEBUG latest_snapshot_cs_debug = }; static CRITICAL_SECTION latest_snapshot_cs = { &latest_snapshot_cs_debug, -1, 0, 0, 0, 0 }; -static inline HRESULT get_ole_clipbrd(ole_clipbrd **clipbrd) -{ - struct oletls *info = COM_CurrentInfo(); - *clipbrd = NULL; - - if(!info->ole_inits) - return CO_E_NOTINITIALIZED; - *clipbrd = theOleClipboard; - - return S_OK; -} - /* * Name of our registered OLE clipboard window class */ @@ -214,6 +202,79 @@ UINT ole_private_data_clipboard_format = 0; static UINT wine_marshal_clipboard_format; +/********************************************************* + * register_clipboard_formats + */ +static void register_clipboard_formats(void) +{ + ownerlink_clipboard_format = RegisterClipboardFormatW(L"OwnerLink"); + filename_clipboard_format = RegisterClipboardFormatW(L"FileName"); + filenameW_clipboard_format = RegisterClipboardFormatW(L"FileNameW"); + dataobject_clipboard_format = RegisterClipboardFormatW(L"DataObject"); + embedded_object_clipboard_format = RegisterClipboardFormatW(L"Embedded Object"); + embed_source_clipboard_format = RegisterClipboardFormatW(L"Embed Source"); + custom_link_source_clipboard_format = RegisterClipboardFormatW(L"Custom Link Source"); + link_source_clipboard_format = RegisterClipboardFormatW(L"Link Source"); + object_descriptor_clipboard_format = RegisterClipboardFormatW(L"Object Descriptor"); + link_source_descriptor_clipboard_format = RegisterClipboardFormatW(L"Link Source Descriptor"); + ole_private_data_clipboard_format = RegisterClipboardFormatW(L"Ole Private Data"); + + wine_marshal_clipboard_format = RegisterClipboardFormatW(L"Wine Marshalled DataObject"); +} + +/*********************************************************************** + * OLEClipbrd_Initialize() + * Initializes the OLE clipboard. + */ +void OLEClipbrd_Initialize(void) +{ + register_clipboard_formats(); + + if ( !theOleClipboard ) + { + ole_clipbrd* clipbrd; + HGLOBAL h; + + TRACE("()\n"); + + clipbrd = HeapAlloc( GetProcessHeap(), 0, sizeof(*clipbrd) ); + if (!clipbrd) return; + + clipbrd->latest_snapshot = NULL; + clipbrd->window = NULL; + clipbrd->src_data = NULL; + clipbrd->cached_enum = NULL; + + h = GlobalAlloc(GMEM_DDESHARE | GMEM_MOVEABLE, 0); + if(!h) + { + HeapFree(GetProcessHeap(), 0, clipbrd); + return; + } + + if(FAILED(CreateStreamOnHGlobal(h, TRUE, &clipbrd->marshal_data))) + { + GlobalFree(h); + HeapFree(GetProcessHeap(), 0, clipbrd); + return; + } + + theOleClipboard = clipbrd; + } +} + +static inline HRESULT get_ole_clipbrd(ole_clipbrd **clipbrd) +{ + struct oletls *info = COM_CurrentInfo(); + *clipbrd = NULL; + + if(!info->ole_inits) + return CO_E_NOTINITIALIZED; + *clipbrd = theOleClipboard; + + return S_OK; +} + static inline const char *dump_fmtetc(FORMATETC *fmt) { if (!fmt) return "(null)"; @@ -1739,67 +1800,6 @@ static snapshot *snapshot_construct(DWORD seq_no) return This; } -/********************************************************* - * register_clipboard_formats - */ -static void register_clipboard_formats(void) -{ - ownerlink_clipboard_format = RegisterClipboardFormatW(L"OwnerLink"); - filename_clipboard_format = RegisterClipboardFormatW(L"FileName"); - filenameW_clipboard_format = RegisterClipboardFormatW(L"FileNameW"); - dataobject_clipboard_format = RegisterClipboardFormatW(L"DataObject"); - embedded_object_clipboard_format = RegisterClipboardFormatW(L"Embedded Object"); - embed_source_clipboard_format = RegisterClipboardFormatW(L"Embed Source"); - custom_link_source_clipboard_format = RegisterClipboardFormatW(L"Custom Link Source"); - link_source_clipboard_format = RegisterClipboardFormatW(L"Link Source"); - object_descriptor_clipboard_format = RegisterClipboardFormatW(L"Object Descriptor"); - link_source_descriptor_clipboard_format = RegisterClipboardFormatW(L"Link Source Descriptor"); - ole_private_data_clipboard_format = RegisterClipboardFormatW(L"Ole Private Data"); - - wine_marshal_clipboard_format = RegisterClipboardFormatW(L"Wine Marshalled DataObject"); -} - -/*********************************************************************** - * OLEClipbrd_Initialize() - * Initializes the OLE clipboard. - */ -void OLEClipbrd_Initialize(void) -{ - register_clipboard_formats(); - - if ( !theOleClipboard ) - { - ole_clipbrd* clipbrd; - HGLOBAL h; - - TRACE("()\n"); - - clipbrd = HeapAlloc( GetProcessHeap(), 0, sizeof(*clipbrd) ); - if (!clipbrd) return; - - clipbrd->latest_snapshot = NULL; - clipbrd->window = NULL; - clipbrd->src_data = NULL; - clipbrd->cached_enum = NULL; - - h = GlobalAlloc(GMEM_DDESHARE | GMEM_MOVEABLE, 0); - if(!h) - { - HeapFree(GetProcessHeap(), 0, clipbrd); - return; - } - - if(FAILED(CreateStreamOnHGlobal(h, TRUE, &clipbrd->marshal_data))) - { - GlobalFree(h); - HeapFree(GetProcessHeap(), 0, clipbrd); - return; - } - - theOleClipboard = clipbrd; - } -} - /********************************************************************* * set_clipboard_formats *
1
0
0
0
Alexandre Julliard : wow64: Add thunks for the registry I/O syscalls.
by Alexandre Julliard
26 Jul '21
26 Jul '21
Module: wine Branch: master Commit: 34a4f5bca5eef086a5270feba39f3a23f9ba5d88 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=34a4f5bca5eef086a5270feb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 26 13:52:22 2021 +0200 wow64: Add thunks for the registry I/O syscalls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wow64/registry.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++ dlls/wow64/syscall.h | 6 ++++ include/winternl.h | 1 + 3 files changed, 85 insertions(+) diff --git a/dlls/wow64/registry.c b/dlls/wow64/registry.c index 5e649c8e0de..67f8f509df5 100644 --- a/dlls/wow64/registry.c +++ b/dlls/wow64/registry.c @@ -142,6 +142,46 @@ NTSTATUS WINAPI wow64_NtEnumerateValueKey( UINT *args ) } +/********************************************************************** + * wow64_NtFlushKey + */ +NTSTATUS WINAPI wow64_NtFlushKey( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + + return NtFlushKey( handle ); +} + + +/********************************************************************** + * wow64_NtLoadKey + */ +NTSTATUS WINAPI wow64_NtLoadKey( UINT *args ) +{ + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + OBJECT_ATTRIBUTES32 *file32 = get_ptr( &args ); + + struct object_attr64 attr, file; + + return NtLoadKey( objattr_32to64( &attr, attr32 ), objattr_32to64( &file, file32 )); +} + + +/********************************************************************** + * wow64_NtLoadKey2 + */ +NTSTATUS WINAPI wow64_NtLoadKey2( UINT *args ) +{ + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + OBJECT_ATTRIBUTES32 *file32 = get_ptr( &args ); + ULONG flags = get_ulong( &args ); + + struct object_attr64 attr, file; + + return NtLoadKey2( objattr_32to64( &attr, attr32 ), objattr_32to64( &file, file32 ), flags ); +} + + /********************************************************************** * wow64_NtOpenKey */ @@ -305,6 +345,31 @@ NTSTATUS WINAPI wow64_NtReplaceKey( UINT *args ) } +/********************************************************************** + * wow64_NtRestoreKey + */ +NTSTATUS WINAPI wow64_NtRestoreKey( UINT *args ) +{ + HANDLE key = get_handle( &args ); + HANDLE file = get_handle( &args ); + ULONG flags = get_ulong( &args ); + + return NtRestoreKey( key, file, flags ); +} + + +/********************************************************************** + * wow64_NtSaveKey + */ +NTSTATUS WINAPI wow64_NtSaveKey( UINT *args ) +{ + HANDLE key = get_handle( &args ); + HANDLE file = get_handle( &args ); + + return NtSaveKey( key, file ); +} + + /********************************************************************** * wow64_NtSetInformationKey */ @@ -335,3 +400,16 @@ NTSTATUS WINAPI wow64_NtSetValueKey( UINT *args ) return NtSetValueKey( handle, unicode_str_32to64( &str, str32 ), index, type, data, count ); } + + +/********************************************************************** + * wow64_NtUnloadKey + */ +NTSTATUS WINAPI wow64_NtUnloadKey( UINT *args ) +{ + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + + struct object_attr64 attr; + + return NtUnloadKey( objattr_32to64( &attr, attr32 )); +} diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h index 1bab23eaab9..ccb4f02c91e 100644 --- a/dlls/wow64/syscall.h +++ b/dlls/wow64/syscall.h @@ -56,8 +56,11 @@ SYSCALL_ENTRY( NtEnumerateKey ) \ SYSCALL_ENTRY( NtEnumerateValueKey ) \ SYSCALL_ENTRY( NtFindAtom ) \ + SYSCALL_ENTRY( NtFlushKey ) \ SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \ SYSCALL_ENTRY( NtListenPort ) \ + SYSCALL_ENTRY( NtLoadKey ) \ + SYSCALL_ENTRY( NtLoadKey2 ) \ SYSCALL_ENTRY( NtMakeTemporaryObject ) \ SYSCALL_ENTRY( NtOpenDirectoryObject ) \ SYSCALL_ENTRY( NtOpenEvent ) \ @@ -100,6 +103,8 @@ SYSCALL_ENTRY( NtReplyWaitReceivePort ) \ SYSCALL_ENTRY( NtRequestWaitReplyPort ) \ SYSCALL_ENTRY( NtResetEvent ) \ + SYSCALL_ENTRY( NtRestoreKey ) \ + SYSCALL_ENTRY( NtSaveKey ) \ SYSCALL_ENTRY( NtSecureConnectPort ) \ SYSCALL_ENTRY( NtSetDefaultLocale ) \ SYSCALL_ENTRY( NtSetDefaultUILanguage ) \ @@ -114,6 +119,7 @@ SYSCALL_ENTRY( NtSetValueKey ) \ SYSCALL_ENTRY( NtSignalAndWaitForSingleObject ) \ SYSCALL_ENTRY( NtTerminateJobObject ) \ + SYSCALL_ENTRY( NtUnloadKey ) \ SYSCALL_ENTRY( NtWaitForDebugEvent ) \ SYSCALL_ENTRY( NtWaitForKeyedEvent ) \ SYSCALL_ENTRY( NtWaitForMultipleObjects ) \ diff --git a/include/winternl.h b/include/winternl.h index 09804a21571..20905486766 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -3879,6 +3879,7 @@ NTSYSAPI NTSTATUS WINAPI NtIsProcessInJob(HANDLE,HANDLE); NTSYSAPI NTSTATUS WINAPI NtListenPort(HANDLE,PLPC_MESSAGE); NTSYSAPI NTSTATUS WINAPI NtLoadDriver(const UNICODE_STRING *); NTSYSAPI NTSTATUS WINAPI NtLoadKey(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *); +NTSYSAPI NTSTATUS WINAPI NtLoadKey2(const OBJECT_ATTRIBUTES *,OBJECT_ATTRIBUTES *,ULONG); NTSYSAPI NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN); NTSYSAPI NTSTATUS WINAPI NtLockVirtualMemory(HANDLE,PVOID*,SIZE_T*,ULONG); NTSYSAPI NTSTATUS WINAPI NtMakeTemporaryObject(HANDLE);
1
0
0
0
Alexandre Julliard : wow64: Add thunks for the registry value syscalls.
by Alexandre Julliard
26 Jul '21
26 Jul '21
Module: wine Branch: master Commit: 44eac1543ef7a4fef604adaa71b717b5cbaac619 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=44eac1543ef7a4fef604adaa…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 26 13:47:07 2021 +0200 wow64: Add thunks for the registry value syscalls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wow64/registry.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++ dlls/wow64/syscall.h | 5 +++ 2 files changed, 91 insertions(+) diff --git a/dlls/wow64/registry.c b/dlls/wow64/registry.c index 435c7669c28..5e649c8e0de 100644 --- a/dlls/wow64/registry.c +++ b/dlls/wow64/registry.c @@ -27,6 +27,9 @@ #include "winnt.h" #include "winternl.h" #include "wow64_private.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(wow); /********************************************************************** @@ -93,6 +96,20 @@ NTSTATUS WINAPI wow64_NtDeleteKey( UINT *args ) } +/********************************************************************** + * wow64_NtDeleteValueKey + */ +NTSTATUS WINAPI wow64_NtDeleteValueKey( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + UNICODE_STRING32 *str32 = get_ptr( &args ); + + UNICODE_STRING str; + + return NtDeleteValueKey( handle, unicode_str_32to64( &str, str32 )); +} + + /********************************************************************** * wow64_NtEnumerateKey */ @@ -109,6 +126,22 @@ NTSTATUS WINAPI wow64_NtEnumerateKey( UINT *args ) } +/********************************************************************** + * wow64_NtEnumerateValueKey + */ +NTSTATUS WINAPI wow64_NtEnumerateValueKey( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + ULONG index = get_ulong( &args ); + KEY_VALUE_INFORMATION_CLASS class = get_ulong( &args ); + void *ptr = get_ptr( &args ); + ULONG len = get_ulong( &args ); + ULONG *retlen = get_ptr( &args ); + + return NtEnumerateValueKey( handle, index, class, ptr, len, retlen ); +} + + /********************************************************************** * wow64_NtOpenKey */ @@ -208,6 +241,41 @@ NTSTATUS WINAPI wow64_NtQueryKey( UINT *args ) } +/********************************************************************** + * wow64_NtQueryMultipleValueKey + */ +NTSTATUS WINAPI wow64_NtQueryMultipleValueKey( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + KEY_MULTIPLE_VALUE_INFORMATION *info = get_ptr( &args ); + ULONG count = get_ulong( &args ); + void *ptr = get_ptr( &args ); + ULONG len = get_ulong( &args ); + ULONG *retlen = get_ptr( &args ); + + FIXME( "%p %p %u %p %u %p: stub\n", handle, info, count, ptr, len, retlen ); + return STATUS_SUCCESS; +} + + +/********************************************************************** + * wow64_NtQueryValueKey + */ +NTSTATUS WINAPI wow64_NtQueryValueKey( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + UNICODE_STRING32 *str32 = get_ptr( &args ); + KEY_VALUE_INFORMATION_CLASS class = get_ulong( &args ); + void *ptr = get_ptr( &args ); + ULONG len = get_ulong( &args ); + ULONG *retlen = get_ptr( &args ); + + UNICODE_STRING str; + + return NtQueryValueKey( handle, unicode_str_32to64( &str, str32 ), class, ptr, len, retlen ); +} + + /********************************************************************** * wow64_NtRenameKey */ @@ -249,3 +317,21 @@ NTSTATUS WINAPI wow64_NtSetInformationKey( UINT *args ) return NtSetInformationKey( handle, class, info, len ); } + + +/********************************************************************** + * wow64_NtSetValueKey + */ +NTSTATUS WINAPI wow64_NtSetValueKey( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + const UNICODE_STRING32 *str32 = get_ptr( &args ); + ULONG index = get_ulong( &args ); + ULONG type = get_ulong( &args ); + const void *data = get_ptr( &args ); + ULONG count = get_ulong( &args ); + + UNICODE_STRING str; + + return NtSetValueKey( handle, unicode_str_32to64( &str, str32 ), index, type, data, count ); +} diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h index cf579576839..1bab23eaab9 100644 --- a/dlls/wow64/syscall.h +++ b/dlls/wow64/syscall.h @@ -51,8 +51,10 @@ SYSCALL_ENTRY( NtDelayExecution ) \ SYSCALL_ENTRY( NtDeleteAtom ) \ SYSCALL_ENTRY( NtDeleteKey ) \ + SYSCALL_ENTRY( NtDeleteValueKey ) \ SYSCALL_ENTRY( NtDuplicateObject ) \ SYSCALL_ENTRY( NtEnumerateKey ) \ + SYSCALL_ENTRY( NtEnumerateValueKey ) \ SYSCALL_ENTRY( NtFindAtom ) \ SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \ SYSCALL_ENTRY( NtListenPort ) \ @@ -80,6 +82,7 @@ SYSCALL_ENTRY( NtQueryInstallUILanguage ) \ SYSCALL_ENTRY( NtQueryIoCompletion ) \ SYSCALL_ENTRY( NtQueryKey ) \ + SYSCALL_ENTRY( NtQueryMultipleValueKey ) \ SYSCALL_ENTRY( NtQueryMutant ) \ SYSCALL_ENTRY( NtQueryObject ) \ SYSCALL_ENTRY( NtQueryPerformanceCounter ) \ @@ -88,6 +91,7 @@ SYSCALL_ENTRY( NtQuerySymbolicLinkObject ) \ SYSCALL_ENTRY( NtQueryTimer ) \ SYSCALL_ENTRY( NtQueryTimerResolution ) \ + SYSCALL_ENTRY( NtQueryValueKey ) \ SYSCALL_ENTRY( NtReleaseKeyedEvent ) \ SYSCALL_ENTRY( NtReleaseMutant ) \ SYSCALL_ENTRY( NtReleaseSemaphore ) \ @@ -107,6 +111,7 @@ SYSCALL_ENTRY( NtSetPowerRequest ) \ SYSCALL_ENTRY( NtSetTimer ) \ SYSCALL_ENTRY( NtSetTimerResolution ) \ + SYSCALL_ENTRY( NtSetValueKey ) \ SYSCALL_ENTRY( NtSignalAndWaitForSingleObject ) \ SYSCALL_ENTRY( NtTerminateJobObject ) \ SYSCALL_ENTRY( NtWaitForDebugEvent ) \
1
0
0
0
Alexandre Julliard : wow64: Add thunks for the registry key syscalls.
by Alexandre Julliard
26 Jul '21
26 Jul '21
Module: wine Branch: master Commit: 4307429b4adecc5c6a8d97dd86f9f49da2452b06 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4307429b4adecc5c6a8d97dd…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 26 13:37:53 2021 +0200 wow64: Add thunks for the registry key syscalls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wow64/Makefile.in | 1 + dlls/wow64/registry.c | 251 +++++++++++++++++++++++++++++++++++++++++++++++++ dlls/wow64/syscall.h | 12 +++ 3 files changed, 264 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=4307429b4adecc5c6a8d…
1
0
0
0
Alexandre Julliard : wow64: Add thunks for the power request syscalls.
by Alexandre Julliard
26 Jul '21
26 Jul '21
Module: wine Branch: master Commit: 7d418c170a8b4360ef5c5a8fd9bcef279f514d27 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7d418c170a8b4360ef5c5a8f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 26 12:55:07 2021 +0200 wow64: Add thunks for the power request syscalls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wow64/sync.c | 37 +++++++++++++++++++++++++++++++++++++ dlls/wow64/syscall.h | 3 +++ 2 files changed, 40 insertions(+) diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c index 29d2bd12c50..ef7176bd199 100644 --- a/dlls/wow64/sync.c +++ b/dlls/wow64/sync.c @@ -138,6 +138,18 @@ NTSTATUS WINAPI wow64_NtClearEvent( UINT *args ) } +/********************************************************************** + * wow64_NtClearPowerRequest + */ +NTSTATUS WINAPI wow64_NtClearPowerRequest( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + POWER_REQUEST_TYPE type = get_ulong( &args ); + + return NtClearPowerRequest( handle, type ); +} + + /********************************************************************** * wow64_NtCompleteConnectPort */ @@ -337,6 +349,19 @@ NTSTATUS WINAPI wow64_NtCreatePort( UINT *args ) } +/********************************************************************** + * wow64_NtCreatePowerRequest + */ +NTSTATUS WINAPI wow64_NtCreatePowerRequest( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + COUNTED_REASON_CONTEXT *context = get_ptr( &args ); + + FIXME( "%p %p: stub\n", handle_ptr, context ); + return STATUS_NOT_IMPLEMENTED; +} + + /********************************************************************** * wow64_NtCreateSection */ @@ -1192,6 +1217,18 @@ NTSTATUS WINAPI wow64_NtSetIoCompletion( UINT *args ) } +/********************************************************************** + * wow64_NtSetPowerRequest + */ +NTSTATUS WINAPI wow64_NtSetPowerRequest( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + POWER_REQUEST_TYPE type = get_ulong( &args ); + + return NtSetPowerRequest( handle, type ); +} + + /********************************************************************** * wow64_NtSetTimer */ diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h index ea7c1c229e5..e7b0353a90a 100644 --- a/dlls/wow64/syscall.h +++ b/dlls/wow64/syscall.h @@ -28,6 +28,7 @@ SYSCALL_ENTRY( NtAllocateUuids ) \ SYSCALL_ENTRY( NtCancelTimer ) \ SYSCALL_ENTRY( NtClearEvent ) \ + SYSCALL_ENTRY( NtClearPowerRequest ) \ SYSCALL_ENTRY( NtClose ) \ SYSCALL_ENTRY( NtCompleteConnectPort ) \ SYSCALL_ENTRY( NtConnectPort ) \ @@ -39,6 +40,7 @@ SYSCALL_ENTRY( NtCreateKeyedEvent ) \ SYSCALL_ENTRY( NtCreateMutant ) \ SYSCALL_ENTRY( NtCreatePort ) \ + SYSCALL_ENTRY( NtCreatePowerRequest ) \ SYSCALL_ENTRY( NtCreateSection ) \ SYSCALL_ENTRY( NtCreateSemaphore ) \ SYSCALL_ENTRY( NtCreateSymbolicLinkObject ) \ @@ -90,6 +92,7 @@ SYSCALL_ENTRY( NtSetInformationDebugObject ) \ SYSCALL_ENTRY( NtSetInformationObject ) \ SYSCALL_ENTRY( NtSetIoCompletion ) \ + SYSCALL_ENTRY( NtSetPowerRequest ) \ SYSCALL_ENTRY( NtSetTimer ) \ SYSCALL_ENTRY( NtSetTimerResolution ) \ SYSCALL_ENTRY( NtSignalAndWaitForSingleObject ) \
1
0
0
0
Alexandre Julliard : wow64: Add thunks for the local port syscalls.
by Alexandre Julliard
26 Jul '21
26 Jul '21
Module: wine Branch: master Commit: caf43278c75b08d70e3b16755844bb6cea33a123 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=caf43278c75b08d70e3b1675…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 26 12:50:03 2021 +0200 wow64: Add thunks for the local port syscalls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wow64/sync.c | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++ dlls/wow64/syscall.h | 8 ++++ 2 files changed, 141 insertions(+) diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c index f386a7cdab3..29d2bd12c50 100644 --- a/dlls/wow64/sync.c +++ b/dlls/wow64/sync.c @@ -98,6 +98,23 @@ void put_section_image_info( SECTION_IMAGE_INFORMATION32 *info32, const SECTION_ } +/********************************************************************** + * wow64_NtAcceptConnectPort + */ +NTSTATUS WINAPI wow64_NtAcceptConnectPort( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + ULONG id = get_ulong( &args ); + LPC_MESSAGE *msg = get_ptr( &args ); + BOOLEAN accept = get_ulong( &args ); + LPC_SECTION_WRITE *write = get_ptr( &args ); + LPC_SECTION_READ *read = get_ptr( &args ); + + FIXME( "%p %u %p %u %p %p: stub\n", handle_ptr, id, msg, accept, write, read ); + return STATUS_NOT_IMPLEMENTED; +} + + /********************************************************************** * wow64_NtCancelTimer */ @@ -121,6 +138,37 @@ NTSTATUS WINAPI wow64_NtClearEvent( UINT *args ) } +/********************************************************************** + * wow64_NtCompleteConnectPort + */ +NTSTATUS WINAPI wow64_NtCompleteConnectPort( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + + return NtCompleteConnectPort( handle ); +} + + +/********************************************************************** + * wow64_NtConnectPort + */ +NTSTATUS WINAPI wow64_NtConnectPort( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + UNICODE_STRING32 *name32 = get_ptr( &args ); + SECURITY_QUALITY_OF_SERVICE *qos = get_ptr( &args ); + LPC_SECTION_WRITE *write = get_ptr( &args ); + LPC_SECTION_READ *read = get_ptr( &args ); + ULONG *max_len = get_ptr( &args ); + void *info = get_ptr( &args ); + ULONG *info_len = get_ptr( &args ); + + FIXME( "%p %p %p %p %p %p %p %p: stub\n", + handle_ptr, name32, qos, write, read, max_len, info, info_len ); + return STATUS_NOT_IMPLEMENTED; +} + + /********************************************************************** * wow64_NtCreateDebugObject */ @@ -267,6 +315,28 @@ NTSTATUS WINAPI wow64_NtCreateMutant( UINT *args ) } +/********************************************************************** + * wow64_NtCreatePort + */ +NTSTATUS WINAPI wow64_NtCreatePort( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + ULONG info_len = get_ulong( &args ); + ULONG data_len = get_ulong( &args ); + ULONG *reserved = get_ptr( &args ); + + struct object_attr64 attr; + HANDLE handle = 0; + NTSTATUS status; + + *handle_ptr = 0; + status = NtCreatePort( &handle, objattr_32to64( &attr, attr32 ), info_len, data_len, reserved ); + put_handle( handle_ptr, handle ); + return status; +} + + /********************************************************************** * wow64_NtCreateSection */ @@ -408,6 +478,19 @@ NTSTATUS WINAPI wow64_NtDuplicateObject( UINT *args ) } +/********************************************************************** + * wow64_NtListenPort + */ +NTSTATUS WINAPI wow64_NtListenPort( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + LPC_MESSAGE *msg = get_ptr( &args ); + + FIXME( "%p %p: stub\n", handle, msg ); + return STATUS_NOT_IMPLEMENTED; +} + + /********************************************************************** * wow64_NtMakeTemporaryObject */ @@ -983,6 +1066,35 @@ NTSTATUS WINAPI wow64_NtReleaseSemaphore( UINT *args ) } +/********************************************************************** + * wow64_NtReplyWaitReceivePort + */ +NTSTATUS WINAPI wow64_NtReplyWaitReceivePort( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + ULONG *id = get_ptr( &args ); + LPC_MESSAGE *reply = get_ptr( &args ); + LPC_MESSAGE *msg = get_ptr( &args ); + + FIXME( "%p %p %p %p: stub\n", handle, id, reply, msg ); + return STATUS_NOT_IMPLEMENTED; +} + + +/********************************************************************** + * wow64_NtRequestWaitReplyPort + */ +NTSTATUS WINAPI wow64_NtRequestWaitReplyPort( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + LPC_MESSAGE *msg_in = get_ptr( &args ); + LPC_MESSAGE *msg_out = get_ptr( &args ); + + FIXME( "%p %p %p: stub\n", handle, msg_in, msg_out ); + return STATUS_NOT_IMPLEMENTED; +} + + /********************************************************************** * wow64_NtResetEvent */ @@ -995,6 +1107,27 @@ NTSTATUS WINAPI wow64_NtResetEvent( UINT *args ) } +/********************************************************************** + * wow64_NtSecureConnectPort + */ +NTSTATUS WINAPI wow64_NtSecureConnectPort( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + UNICODE_STRING32 *name32 = get_ptr( &args ); + SECURITY_QUALITY_OF_SERVICE *qos = get_ptr( &args ); + LPC_SECTION_WRITE *write = get_ptr( &args ); + SID *sid = get_ptr( &args ); + LPC_SECTION_READ *read = get_ptr( &args ); + ULONG *max_len = get_ptr( &args ); + void *info = get_ptr( &args ); + ULONG *info_len = get_ptr( &args ); + + FIXME( "%p %p %p %p %p %p %p %p %p: stub\n", + handle_ptr, name32, qos, write, sid, read, max_len, info, info_len ); + return STATUS_NOT_IMPLEMENTED; +} + + /********************************************************************** * wow64_NtSetEvent */ diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h index 26948446fd1..ea7c1c229e5 100644 --- a/dlls/wow64/syscall.h +++ b/dlls/wow64/syscall.h @@ -22,12 +22,15 @@ #define __WOW64_SYSCALL_H #define ALL_SYSCALLS \ + SYSCALL_ENTRY( NtAcceptConnectPort ) \ SYSCALL_ENTRY( NtAddAtom ) \ SYSCALL_ENTRY( NtAllocateLocallyUniqueId ) \ SYSCALL_ENTRY( NtAllocateUuids ) \ SYSCALL_ENTRY( NtCancelTimer ) \ SYSCALL_ENTRY( NtClearEvent ) \ SYSCALL_ENTRY( NtClose ) \ + SYSCALL_ENTRY( NtCompleteConnectPort ) \ + SYSCALL_ENTRY( NtConnectPort ) \ SYSCALL_ENTRY( NtCreateDebugObject ) \ SYSCALL_ENTRY( NtCreateDirectoryObject ) \ SYSCALL_ENTRY( NtCreateEvent ) \ @@ -35,6 +38,7 @@ SYSCALL_ENTRY( NtCreateJobObject ) \ SYSCALL_ENTRY( NtCreateKeyedEvent ) \ SYSCALL_ENTRY( NtCreateMutant ) \ + SYSCALL_ENTRY( NtCreatePort ) \ SYSCALL_ENTRY( NtCreateSection ) \ SYSCALL_ENTRY( NtCreateSemaphore ) \ SYSCALL_ENTRY( NtCreateSymbolicLinkObject ) \ @@ -45,6 +49,7 @@ SYSCALL_ENTRY( NtDuplicateObject ) \ SYSCALL_ENTRY( NtFindAtom ) \ SYSCALL_ENTRY( NtGetCurrentProcessorNumber ) \ + SYSCALL_ENTRY( NtListenPort ) \ SYSCALL_ENTRY( NtMakeTemporaryObject ) \ SYSCALL_ENTRY( NtOpenDirectoryObject ) \ SYSCALL_ENTRY( NtOpenEvent ) \ @@ -75,7 +80,10 @@ SYSCALL_ENTRY( NtReleaseKeyedEvent ) \ SYSCALL_ENTRY( NtReleaseMutant ) \ SYSCALL_ENTRY( NtReleaseSemaphore ) \ + SYSCALL_ENTRY( NtReplyWaitReceivePort ) \ + SYSCALL_ENTRY( NtRequestWaitReplyPort ) \ SYSCALL_ENTRY( NtResetEvent ) \ + SYSCALL_ENTRY( NtSecureConnectPort ) \ SYSCALL_ENTRY( NtSetDefaultLocale ) \ SYSCALL_ENTRY( NtSetDefaultUILanguage ) \ SYSCALL_ENTRY( NtSetEvent ) \
1
0
0
0
Alexandre Julliard : wow64: Add thunks for the generic object syscalls.
by Alexandre Julliard
26 Jul '21
26 Jul '21
Module: wine Branch: master Commit: ac5102602ffa37baba312b27031dc0c98ed7eea8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ac5102602ffa37baba312b27…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 26 12:35:33 2021 +0200 wow64: Add thunks for the generic object syscalls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wow64/struct32.h | 32 ++++++++ dlls/wow64/sync.c | 197 ++++++++++++++++++++++++++++++++++++++++++++++++++ dlls/wow64/syscall.h | 4 + 3 files changed, 233 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=ac5102602ffa37baba31…
1
0
0
0
Alexandre Julliard : wow64: Add thunks for the section object syscalls.
by Alexandre Julliard
26 Jul '21
26 Jul '21
Module: wine Branch: master Commit: 9dfebb52506d33e5e8b011f3666c296be5a1f398 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9dfebb52506d33e5e8b011f3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 26 12:22:36 2021 +0200 wow64: Add thunks for the section object syscalls. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wow64/struct32.h | 28 ++++++++++ dlls/wow64/sync.c | 128 +++++++++++++++++++++++++++++++++++++++++++++ dlls/wow64/syscall.h | 3 ++ dlls/wow64/wow64_private.h | 8 +++ 4 files changed, 167 insertions(+) diff --git a/dlls/wow64/struct32.h b/dlls/wow64/struct32.h index 776b1d4df35..03a57fc2c27 100644 --- a/dlls/wow64/struct32.h +++ b/dlls/wow64/struct32.h @@ -37,6 +37,34 @@ typedef struct UNICODE_STRING32 ObjectTypeName; } DIRECTORY_BASIC_INFORMATION32; +typedef struct +{ + ULONG BaseAddress; + ULONG Attributes; + LARGE_INTEGER Size; +} SECTION_BASIC_INFORMATION32; + +typedef struct +{ + ULONG TransferAddress; + ULONG ZeroBits; + ULONG MaximumStackSize; + ULONG CommittedStackSize; + ULONG SubSystemType; + USHORT MinorSubsystemVersion; + USHORT MajorSubsystemVersion; + USHORT MajorOperatingSystemVersion; + USHORT MinorOperatingSystemVersion; + USHORT ImageCharacteristics; + USHORT DllCharacteristics; + USHORT Machine; + BOOLEAN ImageContainsCode; + UCHAR ImageFlags; + ULONG LoaderFlags; + ULONG ImageFileSize; + ULONG CheckSum; +} SECTION_IMAGE_INFORMATION32; + typedef struct { DBG_STATE NewState; diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c index c748668620a..0332f85e3ff 100644 --- a/dlls/wow64/sync.c +++ b/dlls/wow64/sync.c @@ -32,6 +32,37 @@ WINE_DEFAULT_DEBUG_CHANNEL(wow); +void put_section_image_info( SECTION_IMAGE_INFORMATION32 *info32, const SECTION_IMAGE_INFORMATION *info ) +{ + if (info->Machine == IMAGE_FILE_MACHINE_AMD64 || info->Machine == IMAGE_FILE_MACHINE_ARM64) + { + info32->TransferAddress = 0x81231234; /* sic */ + info32->MaximumStackSize = 0x100000; + info32->CommittedStackSize = 0x10000; + } + else + { + info32->TransferAddress = PtrToUlong( info->TransferAddress ); + info32->MaximumStackSize = info->MaximumStackSize; + info32->CommittedStackSize = info->CommittedStackSize; + } + info32->ZeroBits = info->ZeroBits; + info32->SubSystemType = info->SubSystemType; + info32->MinorSubsystemVersion = info->MinorSubsystemVersion; + info32->MajorSubsystemVersion = info->MajorSubsystemVersion; + info32->MajorOperatingSystemVersion = info->MajorOperatingSystemVersion; + info32->MinorOperatingSystemVersion = info->MinorOperatingSystemVersion; + info32->ImageCharacteristics = info->ImageCharacteristics; + info32->DllCharacteristics = info->DllCharacteristics; + info32->Machine = info->Machine; + info32->ImageContainsCode = info->ImageContainsCode; + info32->ImageFlags = info->ImageFlags; + info32->LoaderFlags = info->LoaderFlags; + info32->ImageFileSize = info->ImageFileSize; + info32->CheckSum = info->CheckSum; +} + + /********************************************************************** * wow64_NtCancelTimer */ @@ -201,6 +232,30 @@ NTSTATUS WINAPI wow64_NtCreateMutant( UINT *args ) } +/********************************************************************** + * wow64_NtCreateSection + */ +NTSTATUS WINAPI wow64_NtCreateSection( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + ACCESS_MASK access = get_ulong( &args ); + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + const LARGE_INTEGER *size = get_ptr( &args ); + ULONG protect = get_ulong( &args ); + ULONG flags = get_ulong( &args ); + HANDLE file = get_handle( &args ); + + struct object_attr64 attr; + HANDLE handle = 0; + NTSTATUS status; + + *handle_ptr = 0; + status = NtCreateSection( &handle, access, objattr_32to64( &attr, attr32 ), size, protect, flags, file ); + put_handle( handle_ptr, handle ); + return status; +} + + /********************************************************************** * wow64_NtCreateSemaphore */ @@ -414,6 +469,26 @@ NTSTATUS WINAPI wow64_NtOpenMutant( UINT *args ) } +/********************************************************************** + * wow64_NtOpenSection + */ +NTSTATUS WINAPI wow64_NtOpenSection( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + ACCESS_MASK access = get_ulong( &args ); + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + + struct object_attr64 attr; + HANDLE handle = 0; + NTSTATUS status; + + *handle_ptr = 0; + status = NtOpenSection( &handle, access, objattr_32to64( &attr, attr32 )); + put_handle( handle_ptr, handle ); + return status; +} + + /********************************************************************** * wow64_NtOpenSemaphore */ @@ -580,6 +655,59 @@ NTSTATUS WINAPI wow64_NtQueryPerformanceCounter( UINT *args ) } +/********************************************************************** + * wow64_NtQuerySection + */ +NTSTATUS WINAPI wow64_NtQuerySection( UINT *args ) +{ + HANDLE handle = get_handle( &args ); + SECTION_INFORMATION_CLASS class = get_ulong( &args ); + void *ptr = get_ptr( &args ); + SIZE_T size = get_ulong( &args ); + ULONG *ret_ptr = get_ptr( &args ); + + NTSTATUS status; + SIZE_T ret_size = 0; + + switch (class) + { + case SectionBasicInformation: + { + SECTION_BASIC_INFORMATION info; + SECTION_BASIC_INFORMATION32 *info32 = ptr; + + if (size < sizeof(*info32)) return STATUS_INFO_LENGTH_MISMATCH; + if (!(status = NtQuerySection( handle, class, &info, sizeof(info), &ret_size ))) + { + info32->BaseAddress = PtrToUlong( info.BaseAddress ); + info32->Attributes = info.Attributes; + info32->Size = info.Size; + ret_size = sizeof(*info32); + } + break; + } + case SectionImageInformation: + { + SECTION_IMAGE_INFORMATION info; + SECTION_IMAGE_INFORMATION32 *info32 = ptr; + + if (size < sizeof(*info32)) return STATUS_INFO_LENGTH_MISMATCH; + if (!(status = NtQuerySection( handle, class, &info, sizeof(info), &ret_size ))) + { + put_section_image_info( info32, &info ); + ret_size = sizeof(*info32); + } + break; + } + default: + FIXME( "class %u not implemented\n", class ); + return STATUS_NOT_IMPLEMENTED; + } + put_size( ret_ptr, ret_size ); + return status; +} + + /********************************************************************** * wow64_NtQuerySemaphore */ diff --git a/dlls/wow64/syscall.h b/dlls/wow64/syscall.h index 91552953088..3d57b6c3a15 100644 --- a/dlls/wow64/syscall.h +++ b/dlls/wow64/syscall.h @@ -35,6 +35,7 @@ SYSCALL_ENTRY( NtCreateJobObject ) \ SYSCALL_ENTRY( NtCreateKeyedEvent ) \ SYSCALL_ENTRY( NtCreateMutant ) \ + SYSCALL_ENTRY( NtCreateSection ) \ SYSCALL_ENTRY( NtCreateSemaphore ) \ SYSCALL_ENTRY( NtCreateSymbolicLinkObject ) \ SYSCALL_ENTRY( NtCreateTimer ) \ @@ -49,6 +50,7 @@ SYSCALL_ENTRY( NtOpenJobObject ) \ SYSCALL_ENTRY( NtOpenKeyedEvent ) \ SYSCALL_ENTRY( NtOpenMutant ) \ + SYSCALL_ENTRY( NtOpenSection ) \ SYSCALL_ENTRY( NtOpenSemaphore ) \ SYSCALL_ENTRY( NtOpenSymbolicLinkObject ) \ SYSCALL_ENTRY( NtOpenTimer ) \ @@ -62,6 +64,7 @@ SYSCALL_ENTRY( NtQueryIoCompletion ) \ SYSCALL_ENTRY( NtQueryMutant ) \ SYSCALL_ENTRY( NtQueryPerformanceCounter ) \ + SYSCALL_ENTRY( NtQuerySection ) \ SYSCALL_ENTRY( NtQuerySemaphore ) \ SYSCALL_ENTRY( NtQuerySymbolicLinkObject ) \ SYSCALL_ENTRY( NtQueryTimer ) \ diff --git a/dlls/wow64/wow64_private.h b/dlls/wow64/wow64_private.h index 9e3fd914045..c456c0d9352 100644 --- a/dlls/wow64/wow64_private.h +++ b/dlls/wow64/wow64_private.h @@ -137,4 +137,12 @@ static inline void put_handle( ULONG *handle32, HANDLE handle ) *handle32 = HandleToULong( handle ); } +static inline void put_size( ULONG *size32, SIZE_T size ) +{ + if (size32) *size32 = min( size, MAXDWORD ); +} + +extern void put_section_image_info( SECTION_IMAGE_INFORMATION32 *info32, + const SECTION_IMAGE_INFORMATION *info ) DECLSPEC_HIDDEN; + #endif /* __WOW64_PRIVATE_H */
1
0
0
0
Akihiro Sagawa : include: Fix a typo in _tcsxfrm_l.
by Alexandre Julliard
26 Jul '21
26 Jul '21
Module: wine Branch: master Commit: b047b66a2bfec3c9d4c041ed2bb65a048615b328 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b047b66a2bfec3c9d4c041ed…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> Date: Sat Jul 24 21:45:26 2021 +0900 include: Fix a typo in _tcsxfrm_l. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/tchar.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tchar.h b/include/tchar.h index 1231edc565c..526565ee0b5 100644 --- a/include/tchar.h +++ b/include/tchar.h @@ -154,7 +154,7 @@ extern "C" { #define _tcsupr WINE_tchar_routine(_strupr, _mbsupr, _wcsupr) #define _tcsupr_s WINE_tchar_routine(_strupr_s, _mbsupr_s, _wcsupr_s) #define _tcsxfrm WINE_tchar_routine(strxfrm, strxfrm, wcsxfrm) -#define _tcsxfrm_l WINE_tchar_routine(_strxfrm_l, _strxfrm_l, _ wcsxfrm_l) +#define _tcsxfrm_l WINE_tchar_routine(_strxfrm_l, _strxfrm_l, _wcsxfrm_l) #define _tctime WINE_tchar_routine(ctime, ctime, _wctime) #define _tenviron WINE_tchar_routine(_environ, _environ, _wenviron) #define _texecl WINE_tchar_routine(execl, _execl, _wexecl)
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
73
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Results per page:
10
25
50
100
200