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
April
March
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
August 2017
----- 2025 -----
April 2025
March 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
2 participants
351 discussions
Start a n
N
ew thread
Vincent Povirk : mscoree: Implement RequestRuntimeLoadedNotification.
by Alexandre Julliard
01 Aug '17
01 Aug '17
Module: wine Branch: master Commit: 57cdf8bfa8a312ce9a8b7c6c80b0570d3be05b11 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=57cdf8bfa8a312ce9a8b7c6c8…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue Aug 1 11:51:22 2017 -0500 mscoree: Implement RequestRuntimeLoadedNotification. Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mscoree/metahost.c | 44 +++++++++++++++++++++++------- dlls/mscoree/tests/metahost.c | 62 ++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 92 insertions(+), 14 deletions(-) diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c index 4108f55..6edd30f 100644 --- a/dlls/mscoree/metahost.c +++ b/dlls/mscoree/metahost.c @@ -66,6 +66,15 @@ static CRITICAL_SECTION_DEBUG runtime_list_cs_debug = }; static CRITICAL_SECTION runtime_list_cs = { &runtime_list_cs_debug, -1, 0, 0, 0, 0 }; +struct CLRMetaHost +{ + ICLRMetaHost ICLRMetaHost_iface; + + RuntimeLoadedCallbackFnPtr callback; +}; + +static struct CLRMetaHost GlobalCLRMetaHost; + static HMODULE mono_handle; BOOL is_mono_started; @@ -299,6 +308,18 @@ static void CDECL mono_print_handler_fn(const char *string, INT is_stdout) } } +static HRESULT WINAPI thread_set_fn(void) +{ + WARN("stub\n"); + return S_OK; +} + +static HRESULT WINAPI thread_unset_fn(void) +{ + WARN("stub\n"); + return S_OK; +} + static HRESULT CLRRuntimeInfo_GetRuntimeHost(CLRRuntimeInfo *This, RuntimeHost **result) { HRESULT hr = S_OK; @@ -318,6 +339,17 @@ static HRESULT CLRRuntimeInfo_GetRuntimeHost(CLRRuntimeInfo *This, RuntimeHost * EnterCriticalSection(&runtime_list_cs); + if (This->loaded_runtime) + { + *result = This->loaded_runtime; + return hr; + } + + if (GlobalCLRMetaHost.callback) + { + GlobalCLRMetaHost.callback(&This->ICLRRuntimeInfo_iface, thread_set_fn, thread_unset_fn); + } + hr = load_mono(mono_path); if (SUCCEEDED(hr)) @@ -795,15 +827,6 @@ static const struct IEnumUnknownVtbl InstalledRuntimeEnum_Vtbl = { InstalledRuntimeEnum_Clone }; -struct CLRMetaHost -{ - ICLRMetaHost ICLRMetaHost_iface; - - RuntimeLoadedCallbackFnPtr callback; -}; - -static struct CLRMetaHost GlobalCLRMetaHost; - static HRESULT WINAPI CLRMetaHost_QueryInterface(ICLRMetaHost* iface, REFIID riid, void **ppvObject) @@ -988,7 +1011,8 @@ static HRESULT WINAPI CLRMetaHost_RequestRuntimeLoadedNotification(ICLRMetaHost* if(!pCallbackFunction) return E_POINTER; - WARN("Callback currently will not be called.\n"); + if (GlobalCLRMetaHost.callback) + return HOST_E_INVALIDOPERATION; GlobalCLRMetaHost.callback = pCallbackFunction; diff --git a/dlls/mscoree/tests/metahost.c b/dlls/mscoree/tests/metahost.c index 5a8b3e0..fd97361 100644 --- a/dlls/mscoree/tests/metahost.c +++ b/dlls/mscoree/tests/metahost.c @@ -35,6 +35,10 @@ static HRESULT (WINAPI *pCLRCreateInstance)(REFCLSID clsid, REFIID riid, LPVOID static ICLRMetaHost *metahost; +static const WCHAR v4_0[] = {'v','4','.','0','.','3','0','3','1','9',0}; + +static DWORD expect_runtime_tid; + static BOOL init_pointers(void) { HRESULT hr = E_FAIL; @@ -148,10 +152,37 @@ static void test_enumruntimes(void) IEnumUnknown_Release(runtime_enum); } +static void WINAPI notification_dummy_callback(ICLRRuntimeInfo *pRuntimeInfo, CallbackThreadSetFnPtr pfnCallbackThreadSet, + CallbackThreadUnsetFnPtr pfnCallbackThreadUnset) +{ + ok(0, "unexpected call\n"); +} + static void WINAPI notification_callback(ICLRRuntimeInfo *pRuntimeInfo, CallbackThreadSetFnPtr pfnCallbackThreadSet, CallbackThreadUnsetFnPtr pfnCallbackThreadUnset) { - ok(0, "Unexpected call\n"); + HRESULT hr; + WCHAR buf[20]; + DWORD buf_size = 20; + + ok(expect_runtime_tid != 0, "unexpected call\n"); + + if (expect_runtime_tid != 0) + { + ok(GetCurrentThreadId() == expect_runtime_tid, + "expected call on thread %04x, got thread %04x\n", expect_runtime_tid, GetCurrentThreadId()); + expect_runtime_tid = 0; + } + + hr = ICLRRuntimeInfo_GetVersionString(pRuntimeInfo, buf, &buf_size); + ok(hr == S_OK, "GetVersion returned %x\n", hr); + ok(lstrcmpW(buf, v4_0) == 0, "GetVersion returned %s\n", wine_dbgstr_w(buf)); + + hr = pfnCallbackThreadSet(); + ok(hr == S_OK, "pfnCallbackThreadSet returned %x\n", hr); + + hr = pfnCallbackThreadUnset(); + ok(hr == S_OK, "pfnCallbackThreadUnset returned %x\n", hr); } static void test_notification(void) @@ -159,10 +190,32 @@ static void test_notification(void) HRESULT hr; hr = ICLRMetaHost_RequestRuntimeLoadedNotification(metahost, NULL); - ok(hr == E_POINTER, "GetVersion failed, hr=%x\n", hr); + ok(hr == E_POINTER, "RequestRuntimeLoadedNotification returned %x\n", hr); hr = ICLRMetaHost_RequestRuntimeLoadedNotification(metahost,notification_callback); - ok(hr == S_OK, "GetVersion failed, hr=%x\n", hr); + ok(hr == S_OK, "RequestRuntimeLoadedNotification failed, hr=%x\n", hr); + + hr = ICLRMetaHost_RequestRuntimeLoadedNotification(metahost,notification_dummy_callback); + ok(hr == HOST_E_INVALIDOPERATION, "RequestRuntimeLoadedNotification returned %x\n", hr); +} + +static void test_notification_cb(void) +{ + HRESULT hr; + ICLRRuntimeInfo *info; + ICLRRuntimeHost *host; + + hr = ICLRMetaHost_GetRuntime(metahost, v4_0, &IID_ICLRRuntimeInfo, (void**)&info); + ok(hr == S_OK, "GetRuntime returned %x\n", hr); + + expect_runtime_tid = GetCurrentThreadId(); + hr = ICLRRuntimeInfo_GetInterface(info, &CLSID_CLRRuntimeHost, &IID_ICLRRuntimeHost, (void**)&host); + ok(hr == S_OK, "GetInterface returned %x\n", hr); + ok(expect_runtime_tid == 0, "notification_callback was not called\n"); + + ICLRRuntimeHost_Release(host); + + ICLRRuntimeInfo_Release(info); } START_TEST(metahost) @@ -170,8 +223,9 @@ START_TEST(metahost) if (!init_pointers()) return; - test_enumruntimes(); test_notification(); + test_enumruntimes(); + test_notification_cb(); cleanup(); }
1
0
0
0
Hugh McMaster : reg: Use a helper function to resize a memory buffer.
by Alexandre Julliard
01 Aug '17
01 Aug '17
Module: wine Branch: master Commit: e7ea8380e038cb8507a1b065f7372e4ea4ac7fa9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e7ea8380e038cb8507a1b065f…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Tue Aug 1 12:31:09 2017 +0000 reg: Use a helper function to resize a memory buffer. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/reg/reg.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/programs/reg/reg.c b/programs/reg/reg.c index 953f5d3..c086763 100644 --- a/programs/reg/reg.c +++ b/programs/reg/reg.c @@ -90,6 +90,24 @@ static void *heap_xalloc(size_t size) return buf; } +static void *heap_xrealloc(void *buf, size_t size) +{ + void *new_buf; + + if (buf) + new_buf = HeapReAlloc(GetProcessHeap(), 0, buf, size); + else + new_buf = HeapAlloc(GetProcessHeap(), 0, size); + + if (!new_buf) + { + ERR("Out of memory!\n"); + exit(1); + } + + return new_buf; +} + static BOOL heap_free(void *buf) { return HeapFree(GetProcessHeap(), 0, buf); @@ -662,7 +680,7 @@ static int query_value(HKEY key, WCHAR *value_name, WCHAR *path, BOOL recurse) if (rc == ERROR_MORE_DATA) { max_data_bytes = data_size; - data = HeapReAlloc(GetProcessHeap(), 0, data, max_data_bytes); + data = heap_xrealloc(data, max_data_bytes); } else break; } @@ -754,12 +772,12 @@ static int query_all(HKEY key, WCHAR *path, BOOL recurse) if (data_size > max_data_bytes) { max_data_bytes = data_size; - data = HeapReAlloc(GetProcessHeap(), 0, data, max_data_bytes); + data = heap_xrealloc(data, max_data_bytes); } else { max_value_len *= 2; - value_name = HeapReAlloc(GetProcessHeap(), 0, value_name, max_value_len * sizeof(WCHAR)); + value_name = heap_xrealloc(value_name, max_value_len * sizeof(WCHAR)); } } else break;
1
0
0
0
Hugh McMaster : reg: Use a helper function to free allocated memory.
by Alexandre Julliard
01 Aug '17
01 Aug '17
Module: wine Branch: master Commit: a1bc33ae5ca51925d3f2e77fdf869db654011d7a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a1bc33ae5ca51925d3f2e77fd…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Tue Aug 1 12:31:00 2017 +0000 reg: Use a helper function to free allocated memory. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/reg/reg.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/programs/reg/reg.c b/programs/reg/reg.c index 07cb678..953f5d3 100644 --- a/programs/reg/reg.c +++ b/programs/reg/reg.c @@ -90,6 +90,11 @@ static void *heap_xalloc(size_t size) return buf; } +static BOOL heap_free(void *buf) +{ + return HeapFree(GetProcessHeap(), 0, buf); +} + static void output_writeconsole(const WCHAR *str, DWORD wlen) { DWORD count, ret; @@ -109,7 +114,7 @@ static void output_writeconsole(const WCHAR *str, DWORD wlen) WideCharToMultiByte(GetConsoleOutputCP(), 0, str, wlen, msgA, len, NULL, NULL); WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), msgA, len, &count, FALSE); - HeapFree(GetProcessHeap(), 0, msgA); + heap_free(msgA); } } @@ -295,7 +300,7 @@ static LPBYTE get_regdata(const WCHAR *data, DWORD reg_type, WCHAR separator, DW break; no_hex_data: /* cleanup, print error */ - HeapFree(GetProcessHeap(), 0, out_data); + heap_free(out_data); output_message(STRING_MISSING_HEXDATA); out_data = NULL; break; @@ -319,7 +324,7 @@ static LPBYTE get_regdata(const WCHAR *data, DWORD reg_type, WCHAR separator, DW if (destindex && !buffer[destindex - 1] && (!buffer[destindex] || destindex == 1)) { - HeapFree(GetProcessHeap(), 0, buffer); + heap_free(buffer); output_message(STRING_INVALID_STRING); return NULL; } @@ -407,7 +412,7 @@ static int reg_add(HKEY root, WCHAR *path, WCHAR *value_name, BOOL value_empty, } RegSetValueExW(key, value_name, 0, reg_type, reg_data, reg_count); - HeapFree(GetProcessHeap(),0,reg_data); + heap_free(reg_data); } RegCloseKey(key); @@ -484,7 +489,7 @@ static int reg_delete(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name rc = RegDeleteValueW(key, szValue); if (rc != ERROR_SUCCESS) { - HeapFree(GetProcessHeap(), 0, szValue); + heap_free(szValue); RegCloseKey(key); output_message(STRING_VALUEALL_FAILED, key_name); return 1; @@ -492,7 +497,7 @@ static int reg_delete(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name } else break; } - HeapFree(GetProcessHeap(), 0, szValue); + heap_free(szValue); } else if (value_name || value_empty) { @@ -611,7 +616,7 @@ static void output_value(const WCHAR *value_name, DWORD type, BYTE *data, DWORD { reg_data = reg_data_to_wchar(type, data, data_size); output_string(fmt, reg_data); - HeapFree(GetProcessHeap(), 0, reg_data); + heap_free(reg_data); } else { @@ -670,7 +675,7 @@ static int query_value(HKEY key, WCHAR *value_name, WCHAR *path, BOOL recurse) num_values_found++; } - HeapFree(GetProcessHeap(), 0, data); + heap_free(data); if (!recurse) { @@ -704,13 +709,13 @@ static int query_value(HKEY key, WCHAR *value_name, WCHAR *path, BOOL recurse) query_value(subkey, value_name, subkey_path, recurse); RegCloseKey(subkey); } - HeapFree(GetProcessHeap(), 0, subkey_path); + heap_free(subkey_path); i++; } else break; } - HeapFree(GetProcessHeap(), 0, subkey_name); + heap_free(subkey_name); return 0; } @@ -760,8 +765,8 @@ static int query_all(HKEY key, WCHAR *path, BOOL recurse) else break; } - HeapFree(GetProcessHeap(), 0, data); - HeapFree(GetProcessHeap(), 0, value_name); + heap_free(data); + heap_free(value_name); if (i || recurse) output_string(newlineW); @@ -785,7 +790,7 @@ static int query_all(HKEY key, WCHAR *path, BOOL recurse) query_all(subkey, subkey_path, recurse); RegCloseKey(subkey); } - HeapFree(GetProcessHeap(), 0, subkey_path); + heap_free(subkey_path); } else output_string(fmt_path, path, subkey_name); i++; @@ -793,7 +798,7 @@ static int query_all(HKEY key, WCHAR *path, BOOL recurse) else break; } - HeapFree(GetProcessHeap(), 0, subkey_name); + heap_free(subkey_name); if (i && !recurse) output_string(newlineW);
1
0
0
0
Hugh McMaster : reg: Use a helper function to allocate memory and die on failure.
by Alexandre Julliard
01 Aug '17
01 Aug '17
Module: wine Branch: master Commit: a6e28cc3b4deed8b0e94304b5ea752a7b28c33d0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a6e28cc3b4deed8b0e94304b5…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Tue Aug 1 12:30:51 2017 +0000 reg: Use a helper function to allocate memory and die on failure. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/reg/reg.c | 86 +++++++++++++++++++++--------------------------------- 1 file changed, 33 insertions(+), 53 deletions(-) diff --git a/programs/reg/reg.c b/programs/reg/reg.c index 573c750..07cb678 100644 --- a/programs/reg/reg.c +++ b/programs/reg/reg.c @@ -17,9 +17,10 @@ */ #include <windows.h> +#include <errno.h> +#include <stdlib.h> #include <wine/unicode.h> #include <wine/debug.h> -#include <errno.h> #include "reg.h" #define ARRAY_SIZE(A) (sizeof(A)/sizeof(*A)) @@ -78,6 +79,17 @@ type_rels[] = {REG_MULTI_SZ, type_multi_sz}, }; +static void *heap_xalloc(size_t size) +{ + void *buf = HeapAlloc(GetProcessHeap(), 0, size); + if (!buf) + { + ERR("Out of memory!\n"); + exit(1); + } + return buf; +} + static void output_writeconsole(const WCHAR *str, DWORD wlen) { DWORD count, ret; @@ -93,8 +105,7 @@ static void output_writeconsole(const WCHAR *str, DWORD wlen) * one in that case. */ len = WideCharToMultiByte(GetConsoleOutputCP(), 0, str, wlen, NULL, 0, NULL, NULL); - msgA = HeapAlloc(GetProcessHeap(), 0, len * sizeof(char)); - if (!msgA) return; + msgA = heap_xalloc(len); WideCharToMultiByte(GetConsoleOutputCP(), 0, str, wlen, msgA, len, NULL, NULL); WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), msgA, len, &count, FALSE); @@ -240,7 +251,7 @@ static LPBYTE get_regdata(const WCHAR *data, DWORD reg_type, WCHAR separator, DW case REG_EXPAND_SZ: { *reg_count = (lstrlenW(data) + 1) * sizeof(WCHAR); - out_data = HeapAlloc(GetProcessHeap(),0,*reg_count); + out_data = heap_xalloc(*reg_count); lstrcpyW((LPWSTR)out_data,data); break; } @@ -256,7 +267,7 @@ static LPBYTE get_regdata(const WCHAR *data, DWORD reg_type, WCHAR separator, DW break; } *reg_count = sizeof(DWORD); - out_data = HeapAlloc(GetProcessHeap(),0,*reg_count); + out_data = heap_xalloc(*reg_count); ((LPDWORD)out_data)[0] = val; break; } @@ -265,7 +276,7 @@ static LPBYTE get_regdata(const WCHAR *data, DWORD reg_type, WCHAR separator, DW BYTE hex0, hex1; int i = 0, destByteIndex = 0, datalen = lstrlenW(data); *reg_count = ((datalen + datalen % 2) / 2) * sizeof(BYTE); - out_data = HeapAlloc(GetProcessHeap(), 0, *reg_count); + out_data = heap_xalloc(*reg_count); if(datalen % 2) { hex1 = hexchar_to_byte(data[i++]); @@ -292,7 +303,7 @@ static LPBYTE get_regdata(const WCHAR *data, DWORD reg_type, WCHAR separator, DW case REG_MULTI_SZ: { int i, destindex, len = strlenW(data); - WCHAR *buffer = HeapAlloc(GetProcessHeap(), 0, (len + 2) * sizeof(WCHAR)); + WCHAR *buffer = heap_xalloc((len + 2) * sizeof(WCHAR)); for (i = 0, destindex = 0; i < len; i++, destindex++) { @@ -462,7 +473,7 @@ static int reg_delete(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name return 1; } maxValue++; - szValue = HeapAlloc(GetProcessHeap(),0,maxValue*sizeof(WCHAR)); + szValue = heap_xalloc(maxValue * sizeof(WCHAR)); while (1) { @@ -507,7 +518,7 @@ static WCHAR *reg_data_to_wchar(DWORD type, const BYTE *src, DWORD size_bytes) { case REG_SZ: case REG_EXPAND_SZ: - buffer = HeapAlloc(GetProcessHeap(), 0, size_bytes); + buffer = heap_xalloc(size_bytes); strcpyW(buffer, (WCHAR *)src); break; case REG_NONE: @@ -516,7 +527,7 @@ static WCHAR *reg_data_to_wchar(DWORD type, const BYTE *src, DWORD size_bytes) WCHAR *ptr; WCHAR fmt[] = {'%','0','2','X',0}; - buffer = HeapAlloc(GetProcessHeap(), 0, (size_bytes * 2 + 1) * sizeof(WCHAR)); + buffer = heap_xalloc((size_bytes * 2 + 1) * sizeof(WCHAR)); ptr = buffer; for (i = 0; i < size_bytes; i++) ptr += sprintfW(ptr, fmt, src[i]); @@ -529,7 +540,7 @@ static WCHAR *reg_data_to_wchar(DWORD type, const BYTE *src, DWORD size_bytes) const int zero_x_dword = 10; WCHAR fmt[] = {'0','x','%','x',0}; - buffer = HeapAlloc(GetProcessHeap(), 0, (zero_x_dword + 1) * sizeof(WCHAR)); + buffer = heap_xalloc((zero_x_dword + 1) * sizeof(WCHAR)); sprintfW(buffer, fmt, *(DWORD *)src); break; } @@ -542,13 +553,13 @@ static WCHAR *reg_data_to_wchar(DWORD type, const BYTE *src, DWORD size_bytes) if (size_bytes <= two_wchars) { - buffer = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)); + buffer = heap_xalloc(sizeof(WCHAR)); *buffer = 0; return buffer; } tmp_size = size_bytes - two_wchars; /* exclude both null terminators */ - buffer = HeapAlloc(GetProcessHeap(), 0, tmp_size * 2 + sizeof(WCHAR)); + buffer = heap_xalloc(tmp_size * 2 + sizeof(WCHAR)); len = tmp_size / sizeof(WCHAR); for (i = 0, destindex = 0; i < len; i++, destindex++) @@ -615,13 +626,9 @@ static WCHAR *build_subkey_path(WCHAR *path, DWORD path_len, WCHAR *subkey_name, WCHAR *subkey_path; WCHAR fmt[] = {'%','s','\\','%','s',0}; - subkey_path = HeapAlloc(GetProcessHeap(), 0, (path_len + subkey_len + 2) * sizeof(WCHAR)); - if (!subkey_path) - { - ERR("Failed to allocate memory for subkey_path\n"); - return NULL; - } + subkey_path = heap_xalloc((path_len + subkey_len + 2) * sizeof(WCHAR)); sprintfW(subkey_path, fmt, path, subkey_name); + return subkey_path; } @@ -641,12 +648,7 @@ static int query_value(HKEY key, WCHAR *value_name, WCHAR *path, BOOL recurse) WCHAR *subkey_name, *subkey_path; HKEY subkey; - data = HeapAlloc(GetProcessHeap(), 0, max_data_bytes); - if (!data) - { - ERR("Failed to allocate memory for data\n"); - return 1; - } + data = heap_xalloc(max_data_bytes); for (;;) { @@ -685,12 +687,7 @@ static int query_value(HKEY key, WCHAR *value_name, WCHAR *path, BOOL recurse) return 0; } - subkey_name = HeapAlloc(GetProcessHeap(), 0, MAX_SUBKEY_LEN * sizeof(WCHAR)); - if (!subkey_name) - { - ERR("Failed to allocate memory for subkey_name\n"); - return 1; - } + subkey_name = heap_xalloc(MAX_SUBKEY_LEN * sizeof(WCHAR)); path_len = strlenW(path); @@ -733,20 +730,8 @@ static int query_all(HKEY key, WCHAR *path, BOOL recurse) output_string(fmt, path); - value_name = HeapAlloc(GetProcessHeap(), 0, max_value_len * sizeof(WCHAR)); - if (!value_name) - { - ERR("Failed to allocate memory for value_name\n"); - return 1; - } - - data = HeapAlloc(GetProcessHeap(), 0, max_data_bytes); - if (!data) - { - HeapFree(GetProcessHeap(), 0, value_name); - ERR("Failed to allocate memory for data\n"); - return 1; - } + value_name = heap_xalloc(max_value_len * sizeof(WCHAR)); + data = heap_xalloc(max_data_bytes); i = 0; for (;;) @@ -781,12 +766,7 @@ static int query_all(HKEY key, WCHAR *path, BOOL recurse) if (i || recurse) output_string(newlineW); - subkey_name = HeapAlloc(GetProcessHeap(), 0, MAX_SUBKEY_LEN * sizeof(WCHAR)); - if (!subkey_name) - { - ERR("Failed to allocate memory for subkey_name\n"); - return 1; - } + subkey_name = heap_xalloc(MAX_SUBKEY_LEN * sizeof(WCHAR)); path_len = strlenW(path); @@ -866,13 +846,13 @@ static WCHAR *get_long_key(HKEY root, WCHAR *path) if (!path) { - long_key = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR)); + long_key = heap_xalloc((len + 1) * sizeof(WCHAR)); strcpyW(long_key, root_rels[i].long_name); return long_key; } len += strlenW(path) + 1; /* add one for the backslash */ - long_key = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR)); + long_key = heap_xalloc((len + 1) * sizeof(WCHAR)); sprintfW(long_key, fmt, root_rels[i].long_name, path); return long_key; }
1
0
0
0
Fabian Maurer : uiribbon: Add stubs for IUIFramework.
by Alexandre Julliard
01 Aug '17
01 Aug '17
Module: wine Branch: master Commit: ec1b32624bc4fb34f6438a3d73db1be0f13d04b3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ec1b32624bc4fb34f6438a3d7…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Sun Jul 30 19:40:33 2017 +0200 uiribbon: Add stubs for IUIFramework. Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 2 +- configure.ac | 2 +- dlls/uiribbon/Makefile.in | 5 +- dlls/uiribbon/main.c | 131 ++++++++++++++++++++++++++- dlls/uiribbon/uiribbon.c | 175 +++++++++++++++++++++++++++++++++++++ dlls/uiribbon/uiribbon_classes.idl | 21 +++++ dlls/uiribbon/uiribbon_private.h | 32 +++++++ 7 files changed, 363 insertions(+), 5 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ec1b32624bc4fb34f6438…
1
0
0
0
Fabian Maurer : uiribbon: Add DLL.
by Alexandre Julliard
01 Aug '17
01 Aug '17
Module: wine Branch: master Commit: ebe9e1fa6d0c1d8746bc9e58593ca1ddda1ce53f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ebe9e1fa6d0c1d8746bc9e585…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Sun Jul 30 19:40:31 2017 +0200 uiribbon: Add DLL. Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 2 ++ configure.ac | 1 + dlls/uiribbon/Makefile.in | 5 +++ dlls/uiribbon/main.c | 86 +++++++++++++++++++++++++++++++++++++++++++++ dlls/uiribbon/uiribbon.spec | 4 +++ 5 files changed, 98 insertions(+) diff --git a/configure b/configure index 5340523..8f7c97e 100755 --- a/configure +++ b/configure @@ -1449,6 +1449,7 @@ enable_traffic enable_twain_32 enable_ucrtbase enable_uiautomationcore +enable_uiribbon enable_unicows enable_updspapi enable_url @@ -18715,6 +18716,7 @@ wine_fn_config_dll typelib.dll16 enable_win16 wine_fn_config_dll ucrtbase enable_ucrtbase implib wine_fn_config_test dlls/ucrtbase/tests ucrtbase_test wine_fn_config_dll uiautomationcore enable_uiautomationcore +wine_fn_config_dll uiribbon enable_uiribbon wine_fn_config_dll unicows enable_unicows implib wine_fn_config_dll updspapi enable_updspapi wine_fn_config_dll url enable_url implib diff --git a/configure.ac b/configure.ac index 580c37c..c21c18d 100644 --- a/configure.ac +++ b/configure.ac @@ -3500,6 +3500,7 @@ WINE_CONFIG_DLL(typelib.dll16,enable_win16) WINE_CONFIG_DLL(ucrtbase,,[implib]) WINE_CONFIG_TEST(dlls/ucrtbase/tests) WINE_CONFIG_DLL(uiautomationcore) +WINE_CONFIG_DLL(uiribbon) WINE_CONFIG_DLL(unicows,,[implib]) WINE_CONFIG_DLL(updspapi) WINE_CONFIG_DLL(url,,[implib]) diff --git a/dlls/uiribbon/Makefile.in b/dlls/uiribbon/Makefile.in new file mode 100644 index 0000000..1ac13df --- /dev/null +++ b/dlls/uiribbon/Makefile.in @@ -0,0 +1,5 @@ +MODULE = uiribbon.dll +IMPORTS = uuid ole32 + +C_SRCS = \ + main.c diff --git a/dlls/uiribbon/main.c b/dlls/uiribbon/main.c new file mode 100644 index 0000000..8db9cf0 --- /dev/null +++ b/dlls/uiribbon/main.c @@ -0,0 +1,86 @@ +/* + * Copyright 2017 Fabian Maurer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> +#include <string.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winreg.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(uiribbon); + +static HINSTANCE instance; + +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + TRACE("(0x%p, %d, %p)\n", hInstDLL, fdwReason, lpvReserved); + + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + instance = hInstDLL; + DisableThreadLibraryCalls(hInstDLL); + break; + } + + return TRUE; +} + +/******************************************************************************* + * Retrieves class object from a DLL object + * + * NOTES + * Docs say returns STDAPI + * + * PARAMS + * rclsid [I] CLSID for the class object + * riid [I] Reference to identifier of interface for class object + * ppv [O] Address of variable to receive interface pointer for riid + * + * RETURNS + * Success: S_OK + * Failure: CLASS_E_CLASSNOTAVAILABLE, E_OUTOFMEMORY, E_INVALIDARG, + * E_UNEXPECTED + */ +HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) +{ + FIXME("(%s,%s,%p) stub!\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + + return CLASS_E_CLASSNOTAVAILABLE; +} + +HRESULT WINAPI DllCanUnloadNow(void) +{ + return S_FALSE; +} + +HRESULT WINAPI DllRegisterServer(void) +{ + return __wine_register_resources( instance ); +} + +HRESULT WINAPI DllUnregisterServer(void) +{ + return __wine_unregister_resources( instance ); +} diff --git a/dlls/uiribbon/uiribbon.spec b/dlls/uiribbon/uiribbon.spec new file mode 100644 index 0000000..b16365d --- /dev/null +++ b/dlls/uiribbon/uiribbon.spec @@ -0,0 +1,4 @@ +@ stdcall -private DllCanUnloadNow() +@ stdcall -private DllGetClassObject(ptr ptr ptr) +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer()
1
0
0
0
Fabian Maurer : include: Add UIRibbon interface definitions.
by Alexandre Julliard
01 Aug '17
01 Aug '17
Module: wine Branch: master Commit: 338e261c7163fecf505d20f735098d72e17c3417 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=338e261c7163fecf505d20f73…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Sun Jul 30 19:40:32 2017 +0200 include: Add UIRibbon interface definitions. Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/Makefile.in | 1 + include/uiribbon.idl | 182 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 183 insertions(+) diff --git a/include/Makefile.in b/include/Makefile.in index 1dd6aaf..063c4ec 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -161,6 +161,7 @@ IDL_SRCS = \ txdtc.idl \ uiautomationclient.idl \ uiautomationcore.idl \ + uiribbon.idl \ unknwn.idl \ urlhist.idl \ urlmon.idl \ diff --git a/include/uiribbon.idl b/include/uiribbon.idl new file mode 100644 index 0000000..6759400 --- /dev/null +++ b/include/uiribbon.idl @@ -0,0 +1,182 @@ +/* + * COM Classes for uiribbon + * + * Copyright 2017 Fabian Maurer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "propsys.idl"; + +#ifndef __WIDL__ +#define threading(model) +#endif + +typedef enum UI_INVALIDATIONS { + UI_INVALIDATIONS_STATE = 0x00000001, + UI_INVALIDATIONS_VALUE = 0x00000002, + UI_INVALIDATIONS_PROPERTY = 0x00000004, + UI_INVALIDATIONS_ALLPROPERTIES = 0x00000008, +} UI_INVALIDATIONS; + +typedef enum UI_EXECUTIONVERB { + UI_EXECUTIONVERB_EXECUTE, + UI_EXECUTIONVERB_PREVIEW, + UI_EXECUTIONVERB_CANCELPREVIEW, +} UI_EXECUTIONVERB; + +typedef enum UI_VIEWTYPE { + UI_VIEWTYPE_RIBBON = 1 +} UI_VIEWTYPE; + +typedef enum UI_VIEWVERB { + UI_VIEWVERB_CREATE, + UI_VIEWVERB_DESTROY, + UI_VIEWVERB_SIZE, + UI_VIEWVERB_ERROR, +} UI_VIEWVERB; + +typedef enum UI_COMMANDTYPE { + UI_COMMANDTYPE_UNKNOWN, + UI_COMMANDTYPE_GROUP, + UI_COMMANDTYPE_ACTION, + UI_COMMANDTYPE_ANCHOR, + UI_COMMANDTYPE_CONTEXT, + UI_COMMANDTYPE_COLLECTION, + UI_COMMANDTYPE_COMMANDCOLLECTION, + UI_COMMANDTYPE_DECIMAL, + UI_COMMANDTYPE_BOOLEAN, + UI_COMMANDTYPE_FONT, + UI_COMMANDTYPE_RECENTITEMS, + UI_COMMANDTYPE_COLORANCHOR, + UI_COMMANDTYPE_COLORCOLLECTION, +} UI_COMMANDTYPE; + + +[ + object, + uuid(c205bb48-5b1c-4219-a106-15bd0a5f24e2), + local, + pointer_default(unique) +] +interface IUISimplePropertySet : IUnknown +{ + HRESULT GetValue( + [in] REFPROPERTYKEY key, + [out] PROPVARIANT *value + ); +} + +[ + object, + uuid(75ae0a2d-dc03-4c9f-8883-069660d0beb6), + local, + pointer_default(unique) +] +interface IUICommandHandler : IUnknown +{ + HRESULT Execute( + [in] UINT32 commandId, + [in] UI_EXECUTIONVERB verb, + [in] const PROPERTYKEY *key, + [in] const PROPVARIANT *currentValue, + [in] IUISimplePropertySet *commandExecutionProperties + ); + HRESULT UpdateProperty( + [in] UINT32 commandId, + [in] REFPROPERTYKEY key, + [in] const PROPVARIANT *currentValue, + [out] PROPVARIANT *newValue + ); +} + +[ + object, + uuid(d428903c-729a-491d-910d-682a08ff2522), + local, + pointer_default(unique) +] +interface IUIApplication : IUnknown +{ + HRESULT OnViewChanged( + [in] UINT32 viewId, + [in] UI_VIEWTYPE typeID, + [in] IUnknown *view, + [in] UI_VIEWVERB verb, + [in] INT32 uReasonCode + ); + HRESULT OnCreateUICommand( + [in] UINT32 commandId, + [in] UI_COMMANDTYPE typeID, + [out] IUICommandHandler **commandHandler + ); + HRESULT OnDestroyUICommand( + [in] UINT32 commandId, + [in] UI_COMMANDTYPE typeID, + [in] IUICommandHandler *commandHandler + ); +} + +[ + object, + uuid(f4f0385d-6872-43a8-ad09-4c339cb3f5c5), + local, + pointer_default(unique) +] +interface IUIFramework : IUnknown +{ + HRESULT Initialize( + [in] HWND frameWnd, + [in] IUIApplication *application + ); + HRESULT Destroy( + ); + HRESULT LoadUI( + [in] HINSTANCE instance, + [in] LPCWSTR resourceName + ); + HRESULT GetView( + [in] UINT32 viewId, + [in] REFIID riid, + [out] void **ppv + ); + HRESULT GetUICommandProperty( + [in] UINT32 commandId, + [in] REFPROPERTYKEY key, + [out] PROPVARIANT *value + ); + HRESULT SetUICommandProperty( + [in] UINT32 commandId, + [in] REFPROPERTYKEY key, + [in] PROPVARIANT value + ); + HRESULT InvalidateUICommand( + [in] UINT32 commandId, + [in] UI_INVALIDATIONS flags, + [in] const PROPERTYKEY *key + ); + HRESULT FlushPendingInvalidations( + ); + HRESULT SetModes( + INT32 iModes + ); +} + +[ + helpstring("UIRibbonFramework Object"), + threading(apartment), + uuid(926749fa-2615-4987-8845-c33e65f2b957) +] +coclass UIRibbonFramework { interface IUIFramework; }
1
0
0
0
Martin Storsjo : ntdll: Simplify the arm version of a stub function.
by Alexandre Julliard
01 Aug '17
01 Aug '17
Module: wine Branch: master Commit: 4eb2c5532d1225fce581ccd905e6e92c7752f9c9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4eb2c5532d1225fce581ccd90…
Author: Martin Storsjo <martin(a)martin.st> Date: Tue Aug 1 11:52:43 2017 +0300 ntdll: Simplify the arm version of a stub function. Signed-off-by: Martin Storsjo <martin(a)martin.st> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/loader.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 55470e6..76edd2a 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -237,13 +237,11 @@ struct stub struct stub { BYTE ldr_r0[4]; /* ldr r0, $dll */ - BYTE mov_pc_pc1[4]; /* mov pc,pc */ - const char *dll; BYTE ldr_r1[4]; /* ldr r1, $name */ - BYTE mov_pc_pc2[4]; /* mov pc,pc */ - const char *name; BYTE mov_r2_lr[4]; /* mov r2, lr */ - BYTE ldr_pc_pc[4]; /* ldr pc, [pc, #-4] */ + BYTE ldr_pc_pc[4]; /* ldr pc, [pc, #4] */ + const char *dll; + const char *name; const void* entry; }; #elif defined(__aarch64__) @@ -303,32 +301,24 @@ static ULONG_PTR allocate_stub( const char *dll, const char *name ) stub->call = 0xe8; /* call stub_entry_point */ stub->entry = (BYTE *)stub_entry_point - (BYTE *)(&stub->entry + 1); #elif defined(__arm__) - stub->ldr_r0[0] = 0x00; /* ldr r0, $dll */ + stub->ldr_r0[0] = 0x08; /* ldr r0, [pc, #8] ($dll) */ stub->ldr_r0[1] = 0x00; stub->ldr_r0[2] = 0x9f; stub->ldr_r0[3] = 0xe5; - stub->mov_pc_pc1[0] = 0x0f; /* mov pc,pc */ - stub->mov_pc_pc1[1] = 0xf0; - stub->mov_pc_pc1[2] = 0xa0; - stub->mov_pc_pc1[3] = 0xe1; - stub->dll = dll; - stub->ldr_r1[0] = 0x00; /* ldr r1, $name */ + stub->ldr_r1[0] = 0x08; /* ldr r1, [pc, #8] ($name) */ stub->ldr_r1[1] = 0x10; stub->ldr_r1[2] = 0x9f; stub->ldr_r1[3] = 0xe5; - stub->mov_pc_pc2[0] = 0x0f; /* mov pc,pc */ - stub->mov_pc_pc2[1] = 0xf0; - stub->mov_pc_pc2[2] = 0xa0; - stub->mov_pc_pc2[3] = 0xe1; - stub->name = name; stub->mov_r2_lr[0] = 0x0e; /* mov r2, lr */ stub->mov_r2_lr[1] = 0x20; stub->mov_r2_lr[2] = 0xa0; stub->mov_r2_lr[3] = 0xe1; - stub->ldr_pc_pc[0] = 0x04; /* ldr pc, [pc, #-4] */ + stub->ldr_pc_pc[0] = 0x04; /* ldr pc, [pc, #4] */ stub->ldr_pc_pc[1] = 0xf0; - stub->ldr_pc_pc[2] = 0x1f; + stub->ldr_pc_pc[2] = 0x9f; stub->ldr_pc_pc[3] = 0xe5; + stub->dll = dll; + stub->name = name; stub->entry = stub_entry_point; #elif defined(__aarch64__) stub->ldr_x0[0] = 0xa0; /* ldr x0, #20 ($dll) */
1
0
0
0
Martin Storsjo : ntdll: Implement allocate_stub for arm64.
by Alexandre Julliard
01 Aug '17
01 Aug '17
Module: wine Branch: master Commit: dd30536044674706b30a9fb2bfcedcacc099a9a2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd30536044674706b30a9fb2b…
Author: Martin Storsjo <martin(a)martin.st> Date: Tue Aug 1 11:52:42 2017 +0300 ntdll: Implement allocate_stub for arm64. Signed-off-by: Martin Storsjo <martin(a)martin.st> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/loader.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index dd1f74c..55470e6 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -201,7 +201,7 @@ static inline BOOL call_dll_entry_point( DLLENTRYPROC proc, void *module, #endif /* __i386__ */ -#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) +#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) /************************************************************************* * stub_entry_point * @@ -246,6 +246,18 @@ struct stub BYTE ldr_pc_pc[4]; /* ldr pc, [pc, #-4] */ const void* entry; }; +#elif defined(__aarch64__) +struct stub +{ + BYTE ldr_x0[4]; /* ldr x0, $dll */ + BYTE ldr_x1[4]; /* ldr x1, $name */ + BYTE mov_x2_lr[4]; /* mov x2, lr */ + BYTE ldr_x16[4]; /* ldr x16, $entry */ + BYTE br_x16[4]; /* br x16 */ + const char *dll; + const char *name; + const void *entry; +}; #else struct stub { @@ -318,6 +330,30 @@ static ULONG_PTR allocate_stub( const char *dll, const char *name ) stub->ldr_pc_pc[2] = 0x1f; stub->ldr_pc_pc[3] = 0xe5; stub->entry = stub_entry_point; +#elif defined(__aarch64__) + stub->ldr_x0[0] = 0xa0; /* ldr x0, #20 ($dll) */ + stub->ldr_x0[1] = 0x00; + stub->ldr_x0[2] = 0x00; + stub->ldr_x0[3] = 0x58; + stub->ldr_x1[0] = 0xc1; /* ldr x1, #24 ($name) */ + stub->ldr_x1[1] = 0x00; + stub->ldr_x1[2] = 0x00; + stub->ldr_x1[3] = 0x58; + stub->mov_x2_lr[0] = 0xe2; /* mov x2, lr */ + stub->mov_x2_lr[1] = 0x03; + stub->mov_x2_lr[2] = 0x1e; + stub->mov_x2_lr[3] = 0xaa; + stub->ldr_x16[0] = 0xd0; /* ldr x16, #24 ($entry) */ + stub->ldr_x16[1] = 0x00; + stub->ldr_x16[2] = 0x00; + stub->ldr_x16[3] = 0x58; + stub->br_x16[0] = 0x00; /* br x16 */ + stub->br_x16[1] = 0x02; + stub->br_x16[2] = 0x1f; + stub->br_x16[3] = 0xd6; + stub->dll = dll; + stub->name = name; + stub->entry = stub_entry_point; #else stub->movq_rdi[0] = 0x48; /* movq $dll,%rdi */ stub->movq_rdi[1] = 0xbf;
1
0
0
0
Józef Kucia : wined3d: Update ARB_pipeline_statistics_query extension detection.
by Alexandre Julliard
01 Aug '17
01 Aug '17
Module: wine Branch: master Commit: 0e2f75b2f6296ab58017e6d846a9d4082e5bc3dc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0e2f75b2f6296ab58017e6d84…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Jul 31 23:31:17 2017 +0200 wined3d: Update ARB_pipeline_statistics_query extension detection. ARB_pipeline_statistics_query is included in OpenGL 4.6. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/directx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 9707f81..919b997 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -3898,6 +3898,8 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, {ARB_CLIP_CONTROL, MAKEDWORD_VERSION(4, 5)}, {ARB_DERIVATIVE_CONTROL, MAKEDWORD_VERSION(4, 5)}, + + {ARB_PIPELINE_STATISTICS_QUERY, MAKEDWORD_VERSION(4, 6)}, }; struct wined3d_driver_info *driver_info = &adapter->driver_info; const char *gl_vendor_str, *gl_renderer_str, *gl_version_str;
1
0
0
0
← Newer
1
...
32
33
34
35
36
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
Results per page:
10
25
50
100
200