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
February 2020
----- 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
874 discussions
Start a n
N
ew thread
Dmitry Timoshkov : kerberos: Add support for SECQOP_WRAP_NO_ENCRYPT to SpSealMessage.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: 92d77920fd4a0168f011c145e5bdf7d9e9cecc05 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=92d77920fd4a0168f011c145…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Feb 12 18:18:21 2020 +0800 kerberos: Add support for SECQOP_WRAP_NO_ENCRYPT to SpSealMessage. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kerberos/krb5_ap.c | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/dlls/kerberos/krb5_ap.c b/dlls/kerberos/krb5_ap.c index 3827e5ccbc..f426290673 100644 --- a/dlls/kerberos/krb5_ap.c +++ b/dlls/kerberos/krb5_ap.c @@ -1413,11 +1413,21 @@ static NTSTATUS NTAPI kerberos_SpVerifySignature( LSA_SEC_HANDLE context, SecBuf } #ifdef SONAME_LIBGSSAPI_KRB5 -static NTSTATUS seal_message_iov( gss_ctx_id_t ctxt_handle, SecBufferDesc *message ) +static NTSTATUS seal_message_iov( gss_ctx_id_t ctxt_handle, SecBufferDesc *message, ULONG quality_of_protection ) { gss_iov_buffer_desc iov[4]; OM_uint32 ret, minor_status; - int token_idx, data_idx, conf_state; + int token_idx, data_idx, conf_flag, conf_state; + + if (!quality_of_protection) + conf_flag = 1; /* confidentiality + integrity */ + else if (quality_of_protection == SECQOP_WRAP_NO_ENCRYPT) + conf_flag = 0; /* only integrity */ + else + { + FIXME( "QOP %08x not supported\n", quality_of_protection ); + return SEC_E_UNSUPPORTED_FUNCTION; + } /* FIXME: multiple data buffers, read-only buffers */ if ((data_idx = get_buffer_index( message, SECBUFFER_DATA )) == -1) return SEC_E_INVALID_TOKEN; @@ -1439,7 +1449,7 @@ static NTSTATUS seal_message_iov( gss_ctx_id_t ctxt_handle, SecBufferDesc *messa iov[3].buffer.length = 0; iov[3].buffer.value = NULL; - ret = pgss_wrap_iov( &minor_status, ctxt_handle, 1, GSS_C_QOP_DEFAULT, &conf_state, iov, 4 ); + ret = pgss_wrap_iov( &minor_status, ctxt_handle, conf_flag, GSS_C_QOP_DEFAULT, &conf_state, iov, 4 ); TRACE( "gss_wrap_iov returned %08x minor status %08x\n", ret, minor_status ); if (GSS_ERROR(ret)) trace_gss_status( ret, minor_status ); if (ret == GSS_S_COMPLETE) @@ -1452,11 +1462,21 @@ static NTSTATUS seal_message_iov( gss_ctx_id_t ctxt_handle, SecBufferDesc *messa return status_gss_to_sspi( ret ); } -static NTSTATUS seal_message( gss_ctx_id_t ctxt_handle, SecBufferDesc *message ) +static NTSTATUS seal_message( gss_ctx_id_t ctxt_handle, SecBufferDesc *message, ULONG quality_of_protection ) { gss_buffer_desc input, output; OM_uint32 ret, minor_status; - int token_idx, data_idx, conf_state; + int token_idx, data_idx, conf_flag, conf_state; + + if (!quality_of_protection) + conf_flag = 1; /* confidentiality + integrity */ + else if (quality_of_protection == SECQOP_WRAP_NO_ENCRYPT) + conf_flag = 0; /* only integrity */ + else + { + FIXME( "QOP %08x not supported\n", quality_of_protection ); + return SEC_E_UNSUPPORTED_FUNCTION; + } /* FIXME: multiple data buffers, read-only buffers */ if ((data_idx = get_buffer_index( message, SECBUFFER_DATA )) == -1) return SEC_E_INVALID_TOKEN; @@ -1465,7 +1485,7 @@ static NTSTATUS seal_message( gss_ctx_id_t ctxt_handle, SecBufferDesc *message ) input.length = message->pBuffers[data_idx].cbBuffer; input.value = message->pBuffers[data_idx].pvBuffer; - ret = pgss_wrap( &minor_status, ctxt_handle, 1, GSS_C_QOP_DEFAULT, &input, &conf_state, &output ); + ret = pgss_wrap( &minor_status, ctxt_handle, conf_flag, GSS_C_QOP_DEFAULT, &input, &conf_state, &output ); TRACE( "gss_wrap returned %08x minor status %08x\n", ret, minor_status ); if (GSS_ERROR(ret)) trace_gss_status( ret, minor_status ); if (ret == GSS_S_COMPLETE) @@ -1494,18 +1514,13 @@ static NTSTATUS NTAPI kerberos_SpSealMessage( LSA_SEC_HANDLE context, ULONG qual gss_ctx_id_t ctxt_handle; TRACE( "(%lx 0x%08x %p %u)\n", context, quality_of_protection, message, message_seq_no ); - if (quality_of_protection) - { - FIXME( "flags %08x not supported\n", quality_of_protection ); - return SEC_E_UNSUPPORTED_FUNCTION; - } if (message_seq_no) FIXME( "ignoring message_seq_no %u\n", message_seq_no ); if (!context) return SEC_E_INVALID_HANDLE; ctxt_handle = ctxthandle_sspi_to_gss( context ); - if (is_dce_style_context( ctxt_handle )) return seal_message_iov( ctxt_handle, message ); - return seal_message( ctxt_handle, message ); + if (is_dce_style_context( ctxt_handle )) return seal_message_iov( ctxt_handle, message, quality_of_protection ); + return seal_message( ctxt_handle, message, quality_of_protection ); #else FIXME( "(%lx 0x%08x %p %u)\n", context, quality_of_protection, message, message_seq_no ); return SEC_E_UNSUPPORTED_FUNCTION;
1
0
0
0
Alistair Leslie-Hughes : oledb32: Add All page to data Link dialog.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: fd82f1228fc9e6d988c1ffc05b64c3cb9d74d59f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fd82f1228fc9e6d988c1ffc0…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Feb 12 04:52:54 2020 +0000 oledb32: Add All page to data Link dialog. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oledb32/dslocator.c | 53 +++++++++++++++++++++++++++- dlls/oledb32/resource.h | 6 ++++ dlls/oledb32/version.rc | 12 +++++++ po/ar.po | 89 +++++++++++++++++++++++++++++------------------- po/ast.po | 87 +++++++++++++++++++++++++++------------------- po/bg.po | 89 +++++++++++++++++++++++++++++------------------- po/ca.po | 89 +++++++++++++++++++++++++++++------------------- po/cs.po | 89 +++++++++++++++++++++++++++++------------------- po/da.po | 89 +++++++++++++++++++++++++++++------------------- po/de.po | 89 +++++++++++++++++++++++++++++------------------- po/el.po | 88 ++++++++++++++++++++++++++++------------------- po/en.po | 87 +++++++++++++++++++++++++++------------------- po/en_US.po | 87 +++++++++++++++++++++++++++------------------- po/eo.po | 89 +++++++++++++++++++++++++++++------------------- po/es.po | 89 +++++++++++++++++++++++++++++------------------- po/fa.po | 86 +++++++++++++++++++++++++++------------------- po/fi.po | 89 +++++++++++++++++++++++++++++------------------- po/fr.po | 89 +++++++++++++++++++++++++++++------------------- po/he.po | 88 ++++++++++++++++++++++++++++------------------- po/hi.po | 86 +++++++++++++++++++++++++++------------------- po/hr.po | 89 +++++++++++++++++++++++++++++------------------- po/hu.po | 89 +++++++++++++++++++++++++++++------------------- po/it.po | 89 +++++++++++++++++++++++++++++------------------- po/ja.po | 89 +++++++++++++++++++++++++++++------------------- po/ko.po | 89 +++++++++++++++++++++++++++++------------------- po/lt.po | 89 +++++++++++++++++++++++++++++------------------- po/ml.po | 86 +++++++++++++++++++++++++++------------------- po/nb_NO.po | 89 +++++++++++++++++++++++++++++------------------- po/nl.po | 89 +++++++++++++++++++++++++++++------------------- po/or.po | 86 +++++++++++++++++++++++++++------------------- po/pa.po | 86 +++++++++++++++++++++++++++------------------- po/pl.po | 89 +++++++++++++++++++++++++++++------------------- po/pt_BR.po | 89 +++++++++++++++++++++++++++++------------------- po/pt_PT.po | 89 +++++++++++++++++++++++++++++------------------- po/rm.po | 86 +++++++++++++++++++++++++++------------------- po/ro.po | 89 +++++++++++++++++++++++++++++------------------- po/ru.po | 89 +++++++++++++++++++++++++++++------------------- po/si.po | 89 +++++++++++++++++++++++++++++------------------- po/sk.po | 89 +++++++++++++++++++++++++++++------------------- po/sl.po | 89 +++++++++++++++++++++++++++++------------------- po/sr_RS(a)cyrillic.po | 88 ++++++++++++++++++++++++++++------------------- po/sr_RS(a)latin.po | 87 +++++++++++++++++++++++++++------------------- po/sv.po | 89 +++++++++++++++++++++++++++++------------------- po/ta.po | 85 ++++++++++++++++++++++++++------------------- po/te.po | 86 +++++++++++++++++++++++++++------------------- po/th.po | 88 ++++++++++++++++++++++++++++------------------- po/tr.po | 89 +++++++++++++++++++++++++++++------------------- po/uk.po | 89 +++++++++++++++++++++++++++++------------------- po/wa.po | 88 ++++++++++++++++++++++++++++------------------- po/wine.pot | 85 ++++++++++++++++++++++++++------------------- po/zh_CN.po | 89 +++++++++++++++++++++++++++++------------------- po/zh_TW.po | 89 +++++++++++++++++++++++++++++------------------- 52 files changed, 2674 insertions(+), 1716 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=fd82f1228fc9e6d988c1…
1
0
0
0
Zhiyi Zhang : user32: Handle NULL device and not NULL mode parameters in ChangeDisplaySettingsExW().
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: ae157bec34a132d34ed04005f02f9fdf4845af97 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ae157bec34a132d34ed04005…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue Feb 11 16:08:59 2020 +0800 user32: Handle NULL device and not NULL mode parameters in ChangeDisplaySettingsExW(). This makes sure that user graphics drivers has a valid device name when a DEVMODE is specified. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/sysparams.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index e3919ad1b1..c5c98a7ea1 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -3293,12 +3293,21 @@ static void trace_devmode(const DEVMODEW *devmode) LONG WINAPI ChangeDisplaySettingsExW( LPCWSTR devname, LPDEVMODEW devmode, HWND hwnd, DWORD flags, LPVOID lparam ) { + WCHAR primary_adapter[CCHDEVICENAME]; BOOL def_mode = TRUE; DEVMODEW dm; TRACE("%s %p %p %#x %p\n", debugstr_w(devname), devmode, hwnd, flags, lparam); TRACE("flags=%s\n", _CDS_flags(flags)); + if (!devname && devmode) + { + if (!get_primary_adapter(primary_adapter)) + return DISP_CHANGE_FAILED; + + devname = primary_adapter; + } + if (devmode) { trace_devmode(devmode);
1
0
0
0
Zhiyi Zhang : user32: Handle NULL device parameter in EnumDisplaySettingsExW().
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: 12fa0ccea50cd09c3c31e942393cf8021dbec9e7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=12fa0ccea50cd09c3c31e942…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Tue Feb 11 16:08:38 2020 +0800 user32: Handle NULL device parameter in EnumDisplaySettingsExW(). This makes sure that user graphics drivers always have a valid device name. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/sysparams.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index a146f31071..e3919ad1b1 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -567,6 +567,24 @@ RECT get_virtual_screen_rect(void) return info.virtual_rect; } +static BOOL get_primary_adapter(WCHAR *name) +{ + DISPLAY_DEVICEW dd; + DWORD i; + + dd.cb = sizeof(dd); + for (i = 0; EnumDisplayDevicesW(NULL, i, &dd, 0); ++i) + { + if (dd.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) + { + lstrcpyW(name, dd.DeviceName); + return TRUE; + } + } + + return FALSE; +} + /* get text metrics and/or "average" char width of the specified logfont * for the specified dc */ static void get_text_metr_size( HDC hdc, LOGFONTW *plf, TEXTMETRICW * ptm, UINT *psz) @@ -3394,6 +3412,18 @@ BOOL WINAPI EnumDisplaySettingsExA(LPCSTR lpszDeviceName, DWORD iModeNum, BOOL WINAPI EnumDisplaySettingsExW(LPCWSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode, DWORD dwFlags) { + WCHAR primary_adapter[CCHDEVICENAME]; + + TRACE("%s %u %p %#x\n", wine_dbgstr_w(lpszDeviceName), iModeNum, lpDevMode, dwFlags); + + if (!lpszDeviceName) + { + if (!get_primary_adapter(primary_adapter)) + return FALSE; + + lpszDeviceName = primary_adapter; + } + return USER_Driver->pEnumDisplaySettingsEx(lpszDeviceName, iModeNum, lpDevMode, dwFlags); }
1
0
0
0
Nikolay Sivov : kernel32: Add StartThreadpoolIo() stub.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: 480d8b82533e4b7e013e381db76139ed36870098 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=480d8b82533e4b7e013e381d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Feb 12 12:05:29 2020 +0300 kernel32: Add StartThreadpoolIo() stub. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-core-threadpool-l1-1-0.spec | 2 +- .../api-ms-win-core-threadpool-l1-2-0.spec | 2 +- dlls/kernel32/kernel32.spec | 2 +- dlls/kernelbase/kernelbase.spec | 2 +- dlls/ntdll/threadpool.c | 8 ++++++++ include/winternl.h | 1 + 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/dlls/api-ms-win-core-threadpool-l1-1-0/api-ms-win-core-threadpool-l1-1-0.spec b/dlls/api-ms-win-core-threadpool-l1-1-0/api-ms-win-core-threadpool-l1-1-0.spec index 9cefa5aed5..a8a264182a 100644 --- a/dlls/api-ms-win-core-threadpool-l1-1-0/api-ms-win-core-threadpool-l1-1-0.spec +++ b/dlls/api-ms-win-core-threadpool-l1-1-0/api-ms-win-core-threadpool-l1-1-0.spec @@ -32,7 +32,7 @@ @ stdcall SetThreadpoolThreadMinimum(ptr long) kernel32.SetThreadpoolThreadMinimum @ stdcall SetThreadpoolTimer(ptr ptr long long) kernel32.SetThreadpoolTimer @ stdcall SetThreadpoolWait(ptr long ptr) kernel32.SetThreadpoolWait -@ stub StartThreadpoolIo +@ stdcall StartThreadpoolIo(ptr) kernel32.StartThreadpoolIo @ stdcall SubmitThreadpoolWork(ptr) kernel32.SubmitThreadpoolWork @ stdcall TrySubmitThreadpoolCallback(ptr ptr ptr) kernel32.TrySubmitThreadpoolCallback @ stdcall UnregisterWaitEx(long long) kernel32.UnregisterWaitEx diff --git a/dlls/api-ms-win-core-threadpool-l1-2-0/api-ms-win-core-threadpool-l1-2-0.spec b/dlls/api-ms-win-core-threadpool-l1-2-0/api-ms-win-core-threadpool-l1-2-0.spec index 9510c5bcf2..fc373c3c89 100644 --- a/dlls/api-ms-win-core-threadpool-l1-2-0/api-ms-win-core-threadpool-l1-2-0.spec +++ b/dlls/api-ms-win-core-threadpool-l1-2-0/api-ms-win-core-threadpool-l1-2-0.spec @@ -28,7 +28,7 @@ @ stub SetThreadpoolTimerEx @ stdcall SetThreadpoolWait(ptr long ptr) kernel32.SetThreadpoolWait @ stub SetThreadpoolWaitEx -@ stub StartThreadpoolIo +@ stdcall StartThreadpoolIo(ptr) kernel32.StartThreadpoolIo @ stdcall SubmitThreadpoolWork(ptr) kernel32.SubmitThreadpoolWork @ stdcall TrySubmitThreadpoolCallback(ptr ptr ptr) kernel32.TrySubmitThreadpoolCallback @ stub WaitForThreadpoolIoCallbacks diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index d138df9fc1..b7c148395b 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1490,7 +1490,7 @@ @ stdcall -import SleepEx(long long) # @ stub SortCloseHandle # @ stub SortGetHandle -# @ stub StartThreadpoolIo +@ stdcall StartThreadpoolIo(ptr) ntdll.TpStartAsyncIoOperation @ stdcall SubmitThreadpoolWork(ptr) ntdll.TpPostWork @ stdcall -import SuspendThread(long) @ stdcall -import SwitchToFiber(ptr) diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index d9f50e8789..7f928e3085 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1515,7 +1515,7 @@ @ stdcall SleepConditionVariableSRW(ptr ptr long long) @ stdcall SleepEx(long long) @ stub SpecialMBToWC -@ stub StartThreadpoolIo +@ stdcall StartThreadpoolIo(ptr) ntdll.TpStartAsyncIoOperation # @ stub StmAlignSize # @ stub StmAllocateFlat # @ stub StmCoalesceChunks diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c index b7a096f981..4b4bdf2cd7 100644 --- a/dlls/ntdll/threadpool.c +++ b/dlls/ntdll/threadpool.c @@ -3031,3 +3031,11 @@ NTSTATUS WINAPI TpQueryPoolStackInformation( TP_POOL *pool, TP_POOL_STACK_INFORM return STATUS_SUCCESS; } + +/*********************************************************************** + * TpStartAsyncIoOperation (NTDLL.@) + */ +void WINAPI TpStartAsyncIoOperation( TP_IO *io ) +{ + FIXME( "%p\n", io ); +} diff --git a/include/winternl.h b/include/winternl.h index 5298eaa0f7..940337153d 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -3028,6 +3028,7 @@ NTSYSAPI void WINAPI TpReleasePool(TP_POOL *); NTSYSAPI void WINAPI TpReleaseTimer(TP_TIMER *); NTSYSAPI void WINAPI TpReleaseWait(TP_WAIT *); NTSYSAPI void WINAPI TpReleaseWork(TP_WORK *); +NTSYSAPI void WINAPI TpStartAsyncIoOperation(TP_IO *); NTSYSAPI void WINAPI TpSetPoolMaxThreads(TP_POOL *,DWORD); NTSYSAPI BOOL WINAPI TpSetPoolMinThreads(TP_POOL *,DWORD); NTSYSAPI NTSTATUS WINAPI TpSetPoolStackInformation(TP_POOL *, TP_POOL_STACK_INFORMATION *stack_info);
1
0
0
0
Nikolay Sivov : kernel32: Add threadpool stack information exports.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: ad5257b3b6cd95061e5afc6d611842e42e10b475 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ad5257b3b6cd95061e5afc6d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Feb 12 12:05:28 2020 +0300 kernel32: Add threadpool stack information exports. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-core-threadpool-l1-1-0.spec | 4 ++-- .../api-ms-win-core-threadpool-l1-2-0.spec | 4 ++-- dlls/kernel32/kernel32.spec | 4 ++-- dlls/kernelbase/kernelbase.spec | 4 ++-- dlls/kernelbase/thread.c | 16 ++++++++++++++++ include/threadpoolapiset.h | 2 ++ 6 files changed, 26 insertions(+), 8 deletions(-) diff --git a/dlls/api-ms-win-core-threadpool-l1-1-0/api-ms-win-core-threadpool-l1-1-0.spec b/dlls/api-ms-win-core-threadpool-l1-1-0/api-ms-win-core-threadpool-l1-1-0.spec index 4f4580a293..9cefa5aed5 100644 --- a/dlls/api-ms-win-core-threadpool-l1-1-0/api-ms-win-core-threadpool-l1-1-0.spec +++ b/dlls/api-ms-win-core-threadpool-l1-1-0/api-ms-win-core-threadpool-l1-1-0.spec @@ -22,12 +22,12 @@ @ stdcall FreeLibraryWhenCallbackReturns(ptr ptr) kernel32.FreeLibraryWhenCallbackReturns @ stdcall IsThreadpoolTimerSet(ptr) kernel32.IsThreadpoolTimerSet @ stdcall LeaveCriticalSectionWhenCallbackReturns(ptr ptr) kernel32.LeaveCriticalSectionWhenCallbackReturns -@ stub QueryThreadpoolStackInformation +@ stdcall QueryThreadpoolStackInformation(ptr ptr) kernel32.QueryThreadpoolStackInformation @ stdcall RegisterWaitForSingleObjectEx(long ptr ptr long long) kernel32.RegisterWaitForSingleObjectEx @ stdcall ReleaseMutexWhenCallbackReturns(ptr long) kernel32.ReleaseMutexWhenCallbackReturns @ stdcall ReleaseSemaphoreWhenCallbackReturns(ptr long long) kernel32.ReleaseSemaphoreWhenCallbackReturns @ stdcall SetEventWhenCallbackReturns(ptr long) kernel32.SetEventWhenCallbackReturns -@ stub SetThreadpoolStackInformation +@ stdcall SetThreadpoolStackInformation(ptr ptr) kernel32.SetThreadpoolStackInformation @ stdcall SetThreadpoolThreadMaximum(ptr long) kernel32.SetThreadpoolThreadMaximum @ stdcall SetThreadpoolThreadMinimum(ptr long) kernel32.SetThreadpoolThreadMinimum @ stdcall SetThreadpoolTimer(ptr ptr long long) kernel32.SetThreadpoolTimer diff --git a/dlls/api-ms-win-core-threadpool-l1-2-0/api-ms-win-core-threadpool-l1-2-0.spec b/dlls/api-ms-win-core-threadpool-l1-2-0/api-ms-win-core-threadpool-l1-2-0.spec index dc110ef9ed..9510c5bcf2 100644 --- a/dlls/api-ms-win-core-threadpool-l1-2-0/api-ms-win-core-threadpool-l1-2-0.spec +++ b/dlls/api-ms-win-core-threadpool-l1-2-0/api-ms-win-core-threadpool-l1-2-0.spec @@ -17,11 +17,11 @@ @ stdcall FreeLibraryWhenCallbackReturns(ptr ptr) kernel32.FreeLibraryWhenCallbackReturns @ stdcall IsThreadpoolTimerSet(ptr) kernel32.IsThreadpoolTimerSet @ stdcall LeaveCriticalSectionWhenCallbackReturns(ptr ptr) kernel32.LeaveCriticalSectionWhenCallbackReturns -@ stub QueryThreadpoolStackInformation +@ stdcall QueryThreadpoolStackInformation(ptr ptr) kernel32.QueryThreadpoolStackInformation @ stdcall ReleaseMutexWhenCallbackReturns(ptr long) kernel32.ReleaseMutexWhenCallbackReturns @ stdcall ReleaseSemaphoreWhenCallbackReturns(ptr long long) kernel32.ReleaseSemaphoreWhenCallbackReturns @ stdcall SetEventWhenCallbackReturns(ptr long) kernel32.SetEventWhenCallbackReturns -@ stub SetThreadpoolStackInformation +@ stdcall SetThreadpoolStackInformation(ptr ptr) kernel32.SetThreadpoolStackInformation @ stdcall SetThreadpoolThreadMaximum(ptr long) kernel32.SetThreadpoolThreadMaximum @ stdcall SetThreadpoolThreadMinimum(ptr long) kernel32.SetThreadpoolThreadMinimum @ stdcall SetThreadpoolTimer(ptr ptr long long) kernel32.SetThreadpoolTimer diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 47c7d63761..d138df9fc1 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1177,7 +1177,7 @@ @ stdcall QueryProcessCycleTime(long ptr) @ stdcall QueryThreadCycleTime(long ptr) # @ stub QueryThreadProfiling -# @ stub QueryThreadpoolStackInformation +@ stdcall -import QueryThreadpoolStackInformation(ptr ptr) @ stdcall -arch=x86_64 QueryUmsThreadInformation(ptr long ptr long ptr) @ stdcall -import QueryUnbiasedInterruptTime(ptr) @ stub QueryWin31IniFilesMappedToRegistry @@ -1462,7 +1462,7 @@ @ stdcall -import SetThreadStackGuarantee(ptr) # @ stub SetThreadToken @ stdcall -import SetThreadUILanguage(long) -# @ stub SetThreadpoolStackInformation +@ stdcall -import SetThreadpoolStackInformation(ptr ptr) @ stdcall SetThreadpoolThreadMaximum(ptr long) ntdll.TpSetPoolMaxThreads @ stdcall SetThreadpoolThreadMinimum(ptr long) ntdll.TpSetPoolMinThreads @ stdcall SetThreadpoolTimer(ptr ptr long long) ntdll.TpSetTimer diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index caa6de1d51..d9f50e8789 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1213,7 +1213,7 @@ # @ stub QueryStateContainerCreatedNew # @ stub QueryStateContainerItemInfo @ stdcall QueryThreadCycleTime(long ptr) kernel32.QueryThreadCycleTime -@ stub QueryThreadpoolStackInformation +@ stdcall QueryThreadpoolStackInformation(ptr ptr) @ stdcall QueryUnbiasedInterruptTime(ptr) ntdll.RtlQueryUnbiasedInterruptTime # @ stub QueryUnbiasedInterruptTimePrecise # @ stub QueryVirtualMemoryInformation @@ -1492,7 +1492,7 @@ @ stdcall SetThreadStackGuarantee(ptr) @ stdcall SetThreadToken(ptr ptr) @ stdcall SetThreadUILanguage(long) -@ stub SetThreadpoolStackInformation +@ stdcall SetThreadpoolStackInformation(ptr ptr) @ stdcall SetThreadpoolThreadMaximum(ptr long) ntdll.TpSetPoolMaxThreads @ stdcall SetThreadpoolThreadMinimum(ptr long) ntdll.TpSetPoolMinThreads @ stdcall SetThreadpoolTimer(ptr ptr long long) ntdll.TpSetTimer diff --git a/dlls/kernelbase/thread.c b/dlls/kernelbase/thread.c index 6af9ffa406..94ea9c49de 100644 --- a/dlls/kernelbase/thread.c +++ b/dlls/kernelbase/thread.c @@ -1254,3 +1254,19 @@ BOOL WINAPI DECLSPEC_HOTPATCH QueueUserWorkItem( LPTHREAD_START_ROUTINE func, PV { return set_ntstatus( RtlQueueWorkItem( func, context, flags )); } + +/*********************************************************************** + * SetThreadpoolStackInformation (kernelbase.@) + */ +BOOL WINAPI DECLSPEC_HOTPATCH SetThreadpoolStackInformation( PTP_POOL pool, PTP_POOL_STACK_INFORMATION stack_info ) +{ + return set_ntstatus( TpSetPoolStackInformation( pool, stack_info )); +} + +/*********************************************************************** + * QueryThreadpoolStackInformation (kernelbase.@) + */ +BOOL WINAPI DECLSPEC_HOTPATCH QueryThreadpoolStackInformation( PTP_POOL pool, PTP_POOL_STACK_INFORMATION stack_info ) +{ + return set_ntstatus( TpQueryPoolStackInformation( pool, stack_info )); +} diff --git a/include/threadpoolapiset.h b/include/threadpoolapiset.h index 010ee3acf6..e218834726 100644 --- a/include/threadpoolapiset.h +++ b/include/threadpoolapiset.h @@ -43,9 +43,11 @@ WINBASEAPI void WINAPI DisassociateCurrentThreadFromCallback(PTP_CALLBACK WINBASEAPI void WINAPI FreeLibraryWhenCallbackReturns(PTP_CALLBACK_INSTANCE,HMODULE); WINBASEAPI BOOL WINAPI IsThreadpoolTimerSet(PTP_TIMER); WINBASEAPI void WINAPI LeaveCriticalSectionWhenCallbackReturns(PTP_CALLBACK_INSTANCE,RTL_CRITICAL_SECTION*); +WINBASEAPI BOOL WINAPI QueryThreadpoolStackInformation(PTP_POOL,PTP_POOL_STACK_INFORMATION); WINBASEAPI void WINAPI ReleaseMutexWhenCallbackReturns(PTP_CALLBACK_INSTANCE,HANDLE); WINBASEAPI void WINAPI ReleaseSemaphoreWhenCallbackReturns(PTP_CALLBACK_INSTANCE,HANDLE,DWORD); WINBASEAPI void WINAPI SetEventWhenCallbackReturns(PTP_CALLBACK_INSTANCE,HANDLE); +WINBASEAPI BOOL WINAPI SetThreadpoolStackInformation(PTP_POOL,PTP_POOL_STACK_INFORMATION); WINBASEAPI void WINAPI SetThreadpoolThreadMaximum(PTP_POOL,DWORD); WINBASEAPI BOOL WINAPI SetThreadpoolThreadMinimum(PTP_POOL,DWORD); WINBASEAPI void WINAPI SetThreadpoolTimer(PTP_TIMER,FILETIME*,DWORD,DWORD);
1
0
0
0
Nikolay Sivov : ntdll: Add threadpool stack information exports.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: b2f5b0342901f94c18f89e14c20b672838d3e9d5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b2f5b0342901f94c18f89e14…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Feb 12 12:05:27 2020 +0300 ntdll: Add threadpool stack information exports. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/ntdll.spec | 2 ++ dlls/ntdll/threadpool.c | 50 +++++++++++++++++++++++++++++++++++++++++++++---- include/winternl.h | 2 ++ 3 files changed, 50 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index fe36235bda..7aa953ca6c 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -1070,6 +1070,7 @@ @ stdcall TpDisassociateCallback(ptr) @ stdcall TpIsTimerSet(ptr) @ stdcall TpPostWork(ptr) +@ stdcall TpQueryPoolStackInformation(ptr ptr) @ stdcall TpReleaseCleanupGroup(ptr) @ stdcall TpReleaseCleanupGroupMembers(ptr long ptr) @ stdcall TpReleasePool(ptr) @@ -1078,6 +1079,7 @@ @ stdcall TpReleaseWork(ptr) @ stdcall TpSetPoolMaxThreads(ptr long) @ stdcall TpSetPoolMinThreads(ptr long) +@ stdcall TpSetPoolStackInformation(ptr ptr) @ stdcall TpSetTimer(ptr ptr long long) @ stdcall TpSetWait(ptr long ptr) @ stdcall TpSimpleTryPost(ptr ptr ptr) diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c index a7ad321a8b..b7a096f981 100644 --- a/dlls/ntdll/threadpool.c +++ b/dlls/ntdll/threadpool.c @@ -131,6 +131,7 @@ struct threadpool int min_workers; int num_workers; int num_busy_workers; + TP_POOL_STACK_INFORMATION stack_info; }; enum threadpool_objtype @@ -1648,6 +1649,7 @@ static void tp_waitqueue_unlock( struct threadpool_object *wait ) */ static NTSTATUS tp_threadpool_alloc( struct threadpool **out ) { + IMAGE_NT_HEADERS *nt = RtlImageNtHeader( NtCurrentTeb()->Peb->ImageBaseAddress ); struct threadpool *pool; unsigned int i; @@ -1666,10 +1668,12 @@ static NTSTATUS tp_threadpool_alloc( struct threadpool **out ) list_init( &pool->pools[i] ); RtlInitializeConditionVariable( &pool->update_event ); - pool->max_workers = 500; - pool->min_workers = 0; - pool->num_workers = 0; - pool->num_busy_workers = 0; + pool->max_workers = 500; + pool->min_workers = 0; + pool->num_workers = 0; + pool->num_busy_workers = 0; + pool->stack_info.StackReserve = nt->OptionalHeader.SizeOfStackReserve; + pool->stack_info.StackCommit = nt->OptionalHeader.SizeOfStackCommit; TRACE( "allocated threadpool %p\n", pool ); @@ -2989,3 +2993,41 @@ VOID WINAPI TpWaitForWork( TP_WORK *work, BOOL cancel_pending ) tp_object_cancel( this ); tp_object_wait( this, FALSE ); } + +/*********************************************************************** + * TpSetPoolStackInformation (NTDLL.@) + */ +NTSTATUS WINAPI TpSetPoolStackInformation( TP_POOL *pool, TP_POOL_STACK_INFORMATION *stack_info ) +{ + struct threadpool *this = impl_from_TP_POOL( pool ); + + TRACE( "%p %p\n", pool, stack_info ); + + if (!stack_info) + return STATUS_INVALID_PARAMETER; + + RtlEnterCriticalSection( &this->cs ); + this->stack_info = *stack_info; + RtlLeaveCriticalSection( &this->cs ); + + return STATUS_SUCCESS; +} + +/*********************************************************************** + * TpQueryPoolStackInformation (NTDLL.@) + */ +NTSTATUS WINAPI TpQueryPoolStackInformation( TP_POOL *pool, TP_POOL_STACK_INFORMATION *stack_info ) +{ + struct threadpool *this = impl_from_TP_POOL( pool ); + + TRACE( "%p %p\n", pool, stack_info ); + + if (!stack_info) + return STATUS_INVALID_PARAMETER; + + RtlEnterCriticalSection( &this->cs ); + *stack_info = this->stack_info; + RtlLeaveCriticalSection( &this->cs ); + + return STATUS_SUCCESS; +} diff --git a/include/winternl.h b/include/winternl.h index ea6707714d..5298eaa0f7 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -3021,6 +3021,7 @@ NTSYSAPI void WINAPI TpCallbackUnloadDllOnCompletion(TP_CALLBACK_INSTANCE * NTSYSAPI void WINAPI TpDisassociateCallback(TP_CALLBACK_INSTANCE *); NTSYSAPI BOOL WINAPI TpIsTimerSet(TP_TIMER *); NTSYSAPI void WINAPI TpPostWork(TP_WORK *); +NTSYSAPI NTSTATUS WINAPI TpQueryPoolStackInformation(TP_POOL *, TP_POOL_STACK_INFORMATION *stack_info); NTSYSAPI void WINAPI TpReleaseCleanupGroup(TP_CLEANUP_GROUP *); NTSYSAPI void WINAPI TpReleaseCleanupGroupMembers(TP_CLEANUP_GROUP *,BOOL,PVOID); NTSYSAPI void WINAPI TpReleasePool(TP_POOL *); @@ -3029,6 +3030,7 @@ NTSYSAPI void WINAPI TpReleaseWait(TP_WAIT *); NTSYSAPI void WINAPI TpReleaseWork(TP_WORK *); NTSYSAPI void WINAPI TpSetPoolMaxThreads(TP_POOL *,DWORD); NTSYSAPI BOOL WINAPI TpSetPoolMinThreads(TP_POOL *,DWORD); +NTSYSAPI NTSTATUS WINAPI TpSetPoolStackInformation(TP_POOL *, TP_POOL_STACK_INFORMATION *stack_info); NTSYSAPI void WINAPI TpSetTimer(TP_TIMER *, LARGE_INTEGER *,LONG,LONG); NTSYSAPI void WINAPI TpSetWait(TP_WAIT *,HANDLE,LARGE_INTEGER *); NTSYSAPI NTSTATUS WINAPI TpSimpleTryPost(PTP_SIMPLE_CALLBACK,PVOID,TP_CALLBACK_ENVIRON *);
1
0
0
0
Michael Stefaniuc : mshtml/tests: Get rid of a2bstr() in dom.c.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: cc8f5afb53fe351455137d4bf18cd8afa31a8a50 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cc8f5afb53fe351455137d4b…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Feb 12 00:32:45 2020 +0100 mshtml/tests: Get rid of a2bstr() in dom.c. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/tests/dom.c | 485 +++++++++++++++++++++++------------------------- 1 file changed, 235 insertions(+), 250 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=cc8f5afb53fe35145513…
1
0
0
0
Dmitry Timoshkov : activeds: Implement AllocADsMem and FreeADsMem.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: f6425471ef592f91465ac07b9c6b7039e41fd218 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f6425471ef592f91465ac07b…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Feb 12 18:17:40 2020 +0800 activeds: Implement AllocADsMem and FreeADsMem. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/activeds/activeds_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/activeds/activeds_main.c b/dlls/activeds/activeds_main.c index 8ff587e332..72cfd4d83f 100644 --- a/dlls/activeds/activeds_main.c +++ b/dlls/activeds/activeds_main.c @@ -213,8 +213,7 @@ HRESULT WINAPI ADsGetLastError(LPDWORD perror, LPWSTR errorbuf, DWORD errorbufle */ LPVOID WINAPI AllocADsMem(DWORD cb) { - FIXME("(%d)!stub\n",cb); - return NULL; + return HeapAlloc(GetProcessHeap(), 0, cb); } /***************************************************** @@ -222,8 +221,7 @@ LPVOID WINAPI AllocADsMem(DWORD cb) */ BOOL WINAPI FreeADsMem(LPVOID pMem) { - FIXME("(%p)!stub\n",pMem); - return FALSE; + return HeapFree(GetProcessHeap(), 0, pMem); } /*****************************************************
1
0
0
0
Dmitry Timoshkov : activeds: Implement ADsOpenObject.
by Alexandre Julliard
12 Feb '20
12 Feb '20
Module: wine Branch: master Commit: af0d92364e4beedb884e1e6e568a33c416e60e7c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=af0d92364e4beedb884e1e6e…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Feb 11 16:40:30 2020 +0800 activeds: Implement ADsOpenObject. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/activeds/Makefile.in | 1 + dlls/activeds/activeds_main.c | 80 ++++++++++++++++++++++++++++++++++++++++--- include/iads.idl | 14 ++++++++ 3 files changed, 91 insertions(+), 4 deletions(-) diff --git a/dlls/activeds/Makefile.in b/dlls/activeds/Makefile.in index 20578a93bc..54f86d661e 100644 --- a/dlls/activeds/Makefile.in +++ b/dlls/activeds/Makefile.in @@ -1,5 +1,6 @@ MODULE = activeds.dll IMPORTLIB = activeds +IMPORTS = advapi32 ole32 oleaut32 EXTRADLLFLAGS = -mno-cygwin diff --git a/dlls/activeds/activeds_main.c b/dlls/activeds/activeds_main.c index 69c5c447dc..8ff587e332 100644 --- a/dlls/activeds/activeds_main.c +++ b/dlls/activeds/activeds_main.c @@ -2,6 +2,7 @@ * Implementation of the Active Directory Service Interface * * Copyright 2005 Detlef Riekenberg + * Copyright 2019 Dmitry Timoshkov * * This file contains only stubs to get the printui.dll up and running * activeds.dll is much much more than this @@ -30,8 +31,10 @@ #include "winuser.h" #include "objbase.h" +#include "initguid.h" #include "iads.h" #include "adshlp.h" +#include "adserr.h" #include "wine/debug.h" @@ -112,11 +115,80 @@ HRESULT WINAPI ADsBuildVarArrayInt(LPDWORD lpdwObjectTypes, DWORD dwObjectTypes, /***************************************************** * ADsOpenObject [ACTIVEDS.9] */ -HRESULT WINAPI ADsOpenObject(LPCWSTR lpszPathName, LPCWSTR lpszUserName, LPCWSTR lpszPassword, DWORD dwReserved, REFIID riid, VOID** ppObject) +HRESULT WINAPI ADsOpenObject(LPCWSTR path, LPCWSTR user, LPCWSTR password, DWORD reserved, REFIID riid, void **obj) { - FIXME("(%s,%s,%u,%s,%p)!stub\n", debugstr_w(lpszPathName), - debugstr_w(lpszUserName), dwReserved, debugstr_guid(riid), ppObject); - return E_NOTIMPL; + HRESULT hr; + HKEY hkey, hprov; + WCHAR provider[MAX_PATH], progid[MAX_PATH]; + DWORD idx = 0; + + TRACE("(%s,%s,%u,%s,%p)\n", debugstr_w(path), debugstr_w(user), reserved, debugstr_guid(riid), obj); + + if (!path || !riid || !obj) + return E_INVALIDARG; + + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\ADs\\Providers", 0, KEY_READ, &hkey)) + return E_ADS_BAD_PATHNAME; + + hr = E_ADS_BAD_PATHNAME; + + for (;;) + { + if (RegEnumKeyW(hkey, idx++, provider, ARRAY_SIZE(provider))) + break; + + TRACE("provider %s\n", debugstr_w(provider)); + + if (!wcsnicmp(path, provider, wcslen(provider)) && path[wcslen(provider)] == ':') + { + LONG size; + + if (RegOpenKeyExW(hkey, provider, 0, KEY_READ, &hprov)) + break; + + size = ARRAY_SIZE(progid); + if (!RegQueryValueW(hprov, NULL, progid, &size)) + { + CLSID clsid; + + if (CLSIDFromProgID(progid, &clsid) == S_OK) + { + IADsOpenDSObject *adsopen; + IDispatch *disp; + + TRACE("ns %s => clsid %s\n", debugstr_w(progid), wine_dbgstr_guid(&clsid)); + if (CoCreateInstance(&clsid, 0, CLSCTX_INPROC_SERVER, &IID_IADsOpenDSObject, (void **)&adsopen) == S_OK) + { + BSTR bpath, buser, bpassword; + + bpath = SysAllocString(path); + buser = SysAllocString(user); + bpassword = SysAllocString(password); + + hr = IADsOpenDSObject_OpenDSObject(adsopen, bpath, buser, bpassword, reserved, &disp); + if (hr == S_OK) + { + hr = IDispatch_QueryInterface(disp, riid, obj); + IDispatch_Release(disp); + } + + SysFreeString(bpath); + SysFreeString(buser); + SysFreeString(bpassword); + + IADsOpenDSObject_Release(adsopen); + } + } + } + + RegCloseKey(hprov); + break; + } + } + + RegCloseKey(hkey); + + return hr; } /***************************************************** diff --git a/include/iads.idl b/include/iads.idl index 6931b6f734..add52571c7 100644 --- a/include/iads.idl +++ b/include/iads.idl @@ -794,6 +794,20 @@ interface IDirectorySearch : IUnknown HRESULT CloseSearchHandle([in] ADS_SEARCH_HANDLE hSearchResult); } +/***************************************************************************** + * IID_IADsOpenDSObject interface + */ +[ + odl, + uuid(ddf2891e-0f9c-11d0-8ad4-00c04fd8d503), + dual, + oleautomation +] +interface IADsOpenDSObject : IDispatch +{ + HRESULT OpenDSObject([in] BSTR path, [in] BSTR user, [in] BSTR password, [in] long reserved, [out,retval] IDispatch **obj); +} + /***************************************************************************** * IADsADSystemInfo interface */
1
0
0
0
← Newer
1
...
44
45
46
47
48
49
50
...
88
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Results per page:
10
25
50
100
200