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
March 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
1 participants
996 discussions
Start a n
N
ew thread
Jacek Caban : dbghelp: Use loader_ops for load_module.
by Alexandre Julliard
25 Mar '20
25 Mar '20
Module: wine Branch: master Commit: 5ae3f969d4ec525a14a8109a5ee4c5a2e2238405 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5ae3f969d4ec525a14a8109a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Mar 25 17:40:59 2020 +0100 dbghelp: Use loader_ops for load_module. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/dbghelp_private.h | 5 +---- dlls/dbghelp/elf_module.c | 8 ++------ dlls/dbghelp/macho_module.c | 8 ++------ dlls/dbghelp/module.c | 19 +++++++------------ 4 files changed, 12 insertions(+), 28 deletions(-) diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index 3f2596fa10..9751cfbb6c 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -392,6 +392,7 @@ typedef BOOL (*enum_modules_cb)(const WCHAR*, unsigned long addr, void* user); struct loader_ops { BOOL (*synchronize_module_list)(struct process* process); + struct module* (*load_module)(struct process* process, const WCHAR* name, ULONG_PTR addr); BOOL (*enum_modules)(struct process* process, enum_modules_cb callback, void* user); BOOL (*fetch_file_info)(struct process* process, const WCHAR* name, ULONG_PTR load_addr, DWORD_PTR* base, DWORD* size, DWORD* checksum); }; @@ -603,16 +604,12 @@ extern DWORD calc_crc32(HANDLE handle) DECLSPEC_HIDDEN; /* elf_module.c */ extern BOOL elf_load_debug_info(struct module* module) DECLSPEC_HIDDEN; -extern struct module* - elf_load_module(struct process* pcs, const WCHAR* name, unsigned long) DECLSPEC_HIDDEN; extern BOOL elf_read_wine_loader_dbg_info(struct process* pcs) DECLSPEC_HIDDEN; struct elf_thunk_area; extern int elf_is_in_thunk_area(unsigned long addr, const struct elf_thunk_area* thunks) DECLSPEC_HIDDEN; /* macho_module.c */ extern BOOL macho_load_debug_info(struct process *pcs, struct module* module) DECLSPEC_HIDDEN; -extern struct module* - macho_load_module(struct process* pcs, const WCHAR* name, unsigned long) DECLSPEC_HIDDEN; extern BOOL macho_read_wine_loader_dbg_info(struct process* pcs) DECLSPEC_HIDDEN; /* minidump.c */ diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index 64c550a67b..038a552e42 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -1583,7 +1583,7 @@ static BOOL elf_load_cb(const WCHAR* name, unsigned long load_addr, * Also, find module real name and load address from * the real loaded modules list in pcs address space */ -struct module* elf_load_module(struct process* pcs, const WCHAR* name, unsigned long addr) +static struct module* elf_load_module(struct process* pcs, const WCHAR* name, unsigned long addr) { struct elf_load el; @@ -1706,6 +1706,7 @@ static BOOL elf_search_loader(struct process* pcs, struct elf_info* elf_info) static const struct loader_ops elf_loader_ops = { elf_synchronize_module_list, + elf_load_module, elf_enum_modules, elf_fetch_file_info, }; @@ -1740,11 +1741,6 @@ BOOL elf_read_wine_loader_dbg_info(struct process* pcs) return FALSE; } -struct module* elf_load_module(struct process* pcs, const WCHAR* name, unsigned long addr) -{ - return NULL; -} - BOOL elf_load_debug_info(struct module* module) { return FALSE; diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c index df38129e12..c55443905b 100644 --- a/dlls/dbghelp/macho_module.c +++ b/dlls/dbghelp/macho_module.c @@ -1782,7 +1782,7 @@ static BOOL macho_load_cb(const WCHAR* name, unsigned long addr, void* user) * Also, find module real name and load address from * the real loaded modules list in pcs address space. */ -struct module* macho_load_module(struct process* pcs, const WCHAR* name, unsigned long addr) +static struct module* macho_load_module(struct process* pcs, const WCHAR* name, unsigned long addr) { struct macho_load ml; @@ -1906,6 +1906,7 @@ static BOOL macho_search_loader(struct process* pcs, struct macho_info* macho_in static const struct loader_ops macho_loader_ops = { macho_synchronize_module_list, + macho_load_module, macho_enum_modules, macho_fetch_file_info, }; @@ -1936,11 +1937,6 @@ BOOL macho_read_wine_loader_dbg_info(struct process* pcs) return FALSE; } -struct module* macho_load_module(struct process* pcs, const WCHAR* name, unsigned long addr) -{ - return NULL; -} - BOOL macho_load_debug_info(struct process *pcs, struct module* module) { return FALSE; diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index b8ac41f008..feba96d53e 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -890,18 +890,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam wImageName) { /* and finally an ELF or Mach-O module */ - switch (module_get_type_by_name(wImageName)) - { - case DMT_ELF: - module = elf_load_module(pcs, wImageName, BaseOfDll); - break; - case DMT_MACHO: - module = macho_load_module(pcs, wImageName, BaseOfDll); - break; - default: - /* Ignored */ - break; - } + module = pcs->loader->load_module(pcs, wImageName, BaseOfDll); } } if (!module) @@ -1431,6 +1420,11 @@ static BOOL native_synchronize_module_list(struct process* pcs) return FALSE; } +static struct module* native_load_module(struct process* pcs, const WCHAR* name, unsigned long addr) +{ + return NULL; +} + static BOOL native_enum_modules(struct process *process, enum_modules_cb cb, void* user) { return FALSE; @@ -1445,6 +1439,7 @@ static BOOL native_fetch_file_info(struct process* process, const WCHAR* name, U const struct loader_ops no_loader_ops = { native_synchronize_module_list, + native_load_module, native_enum_modules, native_fetch_file_info, };
1
0
0
0
Jacek Caban : dbghelp: Use loader_ops for enum_modules.
by Alexandre Julliard
25 Mar '20
25 Mar '20
Module: wine Branch: master Commit: 16a3481bd22243183281c60ff375d4e61d5c4198 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=16a3481bd22243183281c60f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Mar 25 17:40:45 2020 +0100 dbghelp: Use loader_ops for enum_modules. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/dbghelp_private.h | 9 ++++----- dlls/dbghelp/elf_module.c | 8 ++------ dlls/dbghelp/macho_module.c | 8 ++------ dlls/dbghelp/minidump.c | 6 +----- dlls/dbghelp/module.c | 6 ++++++ 5 files changed, 15 insertions(+), 22 deletions(-) diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index a9138227ea..3f2596fa10 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -387,9 +387,12 @@ struct module struct wine_rb_tree sources_offsets_tree; }; +typedef BOOL (*enum_modules_cb)(const WCHAR*, unsigned long addr, void* user); + struct loader_ops { BOOL (*synchronize_module_list)(struct process* process); + BOOL (*enum_modules)(struct process* process, enum_modules_cb callback, void* user); BOOL (*fetch_file_info)(struct process* process, const WCHAR* name, ULONG_PTR load_addr, DWORD_PTR* base, DWORD* size, DWORD* checksum); }; @@ -598,11 +601,7 @@ extern const char* wine_dbgstr_addr(const ADDRESS64* addr) DECLSPEC_HIDDEN; extern struct cpu* cpu_find(DWORD) DECLSPEC_HIDDEN; extern DWORD calc_crc32(HANDLE handle) DECLSPEC_HIDDEN; -typedef BOOL (*enum_modules_cb)(const WCHAR*, unsigned long addr, void* user); - /* elf_module.c */ -extern BOOL elf_enum_modules(struct process*, enum_modules_cb, void*) DECLSPEC_HIDDEN; -struct image_file_map; extern BOOL elf_load_debug_info(struct module* module) DECLSPEC_HIDDEN; extern struct module* elf_load_module(struct process* pcs, const WCHAR* name, unsigned long) DECLSPEC_HIDDEN; @@ -611,7 +610,6 @@ struct elf_thunk_area; extern int elf_is_in_thunk_area(unsigned long addr, const struct elf_thunk_area* thunks) DECLSPEC_HIDDEN; /* macho_module.c */ -extern BOOL macho_enum_modules(struct process*, enum_modules_cb, void*) DECLSPEC_HIDDEN; extern BOOL macho_load_debug_info(struct process *pcs, struct module* module) DECLSPEC_HIDDEN; extern struct module* macho_load_module(struct process* pcs, const WCHAR* name, unsigned long) DECLSPEC_HIDDEN; @@ -707,6 +705,7 @@ extern BOOL stabs_parse(struct module* module, unsigned long load_offset stabs_def_cb callback, void* user) DECLSPEC_HIDDEN; /* dwarf.c */ +struct image_file_map; extern BOOL dwarf2_parse(struct module* module, unsigned long load_offset, const struct elf_thunk_area* thunks, struct image_file_map* fmap) DECLSPEC_HIDDEN; diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c index dba4573afe..64c550a67b 100644 --- a/dlls/dbghelp/elf_module.c +++ b/dlls/dbghelp/elf_module.c @@ -1502,7 +1502,7 @@ static BOOL elf_enum_modules_translate(const WCHAR* name, unsigned long load_add * This function doesn't require that someone has called SymInitialize * on this very process. */ -BOOL elf_enum_modules(struct process* process, enum_modules_cb cb, void* user) +static BOOL elf_enum_modules(struct process* process, enum_modules_cb cb, void* user) { struct elf_info elf_info; BOOL ret; @@ -1706,6 +1706,7 @@ static BOOL elf_search_loader(struct process* pcs, struct elf_info* elf_info) static const struct loader_ops elf_loader_ops = { elf_synchronize_module_list, + elf_enum_modules, elf_fetch_file_info, }; @@ -1739,11 +1740,6 @@ BOOL elf_read_wine_loader_dbg_info(struct process* pcs) return FALSE; } -BOOL elf_enum_modules(struct process *process, enum_modules_cb cb, void* user) -{ - return FALSE; -} - struct module* elf_load_module(struct process* pcs, const WCHAR* name, unsigned long addr) { return NULL; diff --git a/dlls/dbghelp/macho_module.c b/dlls/dbghelp/macho_module.c index 73d0575a4b..df38129e12 100644 --- a/dlls/dbghelp/macho_module.c +++ b/dlls/dbghelp/macho_module.c @@ -1730,7 +1730,7 @@ static BOOL macho_synchronize_module_list(struct process* pcs) * This function doesn't require that someone has called SymInitialize * on this very process. */ -BOOL macho_enum_modules(struct process* process, enum_modules_cb cb, void* user) +static BOOL macho_enum_modules(struct process* process, enum_modules_cb cb, void* user) { struct macho_info macho_info; BOOL ret; @@ -1906,6 +1906,7 @@ static BOOL macho_search_loader(struct process* pcs, struct macho_info* macho_in static const struct loader_ops macho_loader_ops = { macho_synchronize_module_list, + macho_enum_modules, macho_fetch_file_info, }; @@ -1935,11 +1936,6 @@ BOOL macho_read_wine_loader_dbg_info(struct process* pcs) return FALSE; } -BOOL macho_enum_modules(struct process *process, enum_modules_cb cb, void* user) -{ - return FALSE; -} - struct module* macho_load_module(struct process* pcs, const WCHAR* name, unsigned long addr) { return NULL; diff --git a/dlls/dbghelp/minidump.c b/dlls/dbghelp/minidump.c index 82516bf60c..4a79bb9944 100644 --- a/dlls/dbghelp/minidump.c +++ b/dlls/dbghelp/minidump.c @@ -320,11 +320,7 @@ static void fetch_modules_info(struct dump_context* dc) * And it's always a good idea to have a trace of the loaded ELF modules for * a given application in a post mortem debugging condition. */ - if (dc->process->dbg_hdr_addr) - { - elf_enum_modules(dc->process, fetch_host_module_info_cb, dc); - macho_enum_modules(dc->process, fetch_host_module_info_cb, dc); - } + dc->process->loader->enum_modules(dc->process, fetch_host_module_info_cb, dc); } static void fetch_module_versioninfo(LPCWSTR filename, VS_FIXEDFILEINFO* ffi) diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index 59c0a3c56c..b8ac41f008 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -1431,6 +1431,11 @@ static BOOL native_synchronize_module_list(struct process* pcs) return FALSE; } +static BOOL native_enum_modules(struct process *process, enum_modules_cb cb, void* user) +{ + return FALSE; +} + static BOOL native_fetch_file_info(struct process* process, const WCHAR* name, ULONG_PTR load_addr, DWORD_PTR* base, DWORD* size, DWORD* checksum) { @@ -1440,5 +1445,6 @@ static BOOL native_fetch_file_info(struct process* process, const WCHAR* name, U const struct loader_ops no_loader_ops = { native_synchronize_module_list, + native_enum_modules, native_fetch_file_info, };
1
0
0
0
Dmitry Timoshkov : adsldp: Implement IDirectorySearch::GetNextRow().
by Alexandre Julliard
25 Mar '20
25 Mar '20
Module: wine Branch: master Commit: 093616eede952dc1a19e9c2f8be1d6119c8253c1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=093616eede952dc1a19e9c2f…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Mar 25 11:18:16 2020 +0800 adsldp: Implement IDirectorySearch::GetNextRow(). Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/adsldp/adsldp.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index 264408c365..4957828391 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -1216,8 +1216,31 @@ static HRESULT WINAPI search_GetFirstRow(IDirectorySearch *iface, ADS_SEARCH_HAN static HRESULT WINAPI search_GetNextRow(IDirectorySearch *iface, ADS_SEARCH_HANDLE res) { - FIXME("%p,%p: stub\n", iface, res); - return E_NOTIMPL; + LDAP_namespace *ldap = impl_from_IDirectorySearch(iface); + struct ldap_search_context *ldap_ctx = res; + + TRACE("%p,%p\n", iface, res); + + if (!ldap->ld) return E_NOTIMPL; + + if (!res) return E_ADS_BAD_PARAMETER; + + if (!ldap_ctx->entry) + { + ldap_ctx->count = ldap_count_entries(ldap->ld, ldap_ctx->res); + ldap_ctx->pos = 0; + ldap_ctx->entry = ldap_first_entry(ldap->ld, ldap_ctx->res); + } + else + { + if (ldap_ctx->pos >= ldap_ctx->count) + return S_ADS_NOMORE_ROWS; + + ldap_ctx->entry = ldap_next_entry(ldap->ld, ldap_ctx->res); + ldap_ctx->pos++; + } + + return ldap_ctx->entry ? S_OK : S_ADS_NOMORE_ROWS; } static HRESULT WINAPI search_GetPreviousRow(IDirectorySearch *iface, ADS_SEARCH_HANDLE res)
1
0
0
0
Dmitry Timoshkov : adsldp: Implement IDirectorySearch::GetFirstRow().
by Alexandre Julliard
25 Mar '20
25 Mar '20
Module: wine Branch: master Commit: 6f14d858dee1d1b84f76d27d509a3a7cb800189c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6f14d858dee1d1b84f76d27d…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Mar 25 11:18:13 2020 +0800 adsldp: Implement IDirectorySearch::GetFirstRow(). Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/adsldp/adsldp.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index 53f766565c..264408c365 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -398,7 +398,8 @@ typedef struct struct ldap_search_context { - LDAPMessage *res; + LDAPMessage *res, *entry; + ULONG count, pos; }; static inline LDAP_namespace *impl_from_IADs(IADs *iface) @@ -1197,8 +1198,20 @@ static HRESULT WINAPI search_AbandonSearch(IDirectorySearch *iface, ADS_SEARCH_H static HRESULT WINAPI search_GetFirstRow(IDirectorySearch *iface, ADS_SEARCH_HANDLE res) { - FIXME("%p,%p: stub\n", iface, res); - return E_NOTIMPL; + LDAP_namespace *ldap = impl_from_IDirectorySearch(iface); + struct ldap_search_context *ldap_ctx = res; + + TRACE("%p,%p\n", iface, res); + + if (!ldap->ld) return E_NOTIMPL; + + if (!res) return E_ADS_BAD_PARAMETER; + + ldap_ctx->count = ldap_count_entries(ldap->ld, ldap_ctx->res); + ldap_ctx->pos = 0; + ldap_ctx->entry = ldap_first_entry(ldap->ld, ldap_ctx->res); + + return ldap_ctx->entry ? S_OK : S_ADS_NOMORE_ROWS; } static HRESULT WINAPI search_GetNextRow(IDirectorySearch *iface, ADS_SEARCH_HANDLE res)
1
0
0
0
Dmitry Timoshkov : adsldp: Implement IDirectorySearch::CloseSearchHandle().
by Alexandre Julliard
25 Mar '20
25 Mar '20
Module: wine Branch: master Commit: 17be7f3dad8e782fedbab201289ffe3a515162fa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=17be7f3dad8e782fedbab201…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Mar 25 11:18:06 2020 +0800 adsldp: Implement IDirectorySearch::CloseSearchHandle(). Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/adsldp/adsldp.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index 9787102b17..53f766565c 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -1234,8 +1234,15 @@ static HRESULT WINAPI search_FreeColumn(IDirectorySearch *iface, PADS_SEARCH_COL static HRESULT WINAPI search_CloseSearchHandle(IDirectorySearch *iface, ADS_SEARCH_HANDLE res) { - FIXME("%p,%p: stub\n", iface, res); - return E_NOTIMPL; + struct ldap_search_context *ldap_ctx = res; + + TRACE("%p,%p\n", iface, res); + + if (!res) return E_ADS_BAD_PARAMETER; + + ldap_msgfree(ldap_ctx->res); + + return S_OK; } static const IDirectorySearchVtbl IDirectorySearch_vtbl =
1
0
0
0
Dmitry Timoshkov : adsldp: Implement IDirectorySearch::ExecuteSearch().
by Alexandre Julliard
25 Mar '20
25 Mar '20
Module: wine Branch: master Commit: a083fdab1095682f116f39e7fdfad64d95a9465e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a083fdab1095682f116f39e7…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Mar 25 11:18:00 2020 +0800 adsldp: Implement IDirectorySearch::ExecuteSearch(). Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/adsldp/adsldp.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index 6330ba2d9c..9787102b17 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -396,6 +396,11 @@ typedef struct } search; } LDAP_namespace; +struct ldap_search_context +{ + LDAPMessage *res; +}; + static inline LDAP_namespace *impl_from_IADs(IADs *iface) { return CONTAINING_RECORD(iface, LDAP_namespace, IADs_iface); @@ -1141,8 +1146,47 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S static HRESULT WINAPI search_ExecuteSearch(IDirectorySearch *iface, LPWSTR filter, LPWSTR *names, DWORD count, PADS_SEARCH_HANDLE res) { - FIXME("%p,%s,%p,%u,%p: stub\n", iface, debugstr_w(filter), names, count, res); - return E_NOTIMPL; + LDAP_namespace *ldap = impl_from_IDirectorySearch(iface); + ULONG err, i; + WCHAR **props; + struct ldap_search_context *ldap_ctx; + + TRACE("%p,%s,%p,%u,%p\n", iface, debugstr_w(filter), names, count, res); + + if (!ldap->ld) return E_NOTIMPL; + + if (!res) return E_ADS_BAD_PARAMETER; + + ldap_ctx = heap_alloc_zero(sizeof(*ldap_ctx)); + if (!ldap_ctx) return E_OUTOFMEMORY; + + if (count == 0xffffffff) + props = NULL; + else + { + if (count && !names) return E_ADS_BAD_PARAMETER; + + props = heap_alloc((count + 1) * sizeof(props[0])); + if (!props) + return E_OUTOFMEMORY; + + for (i = 0; i < count; i++) + props[i] = names[i]; + + props[count] = NULL; + } + + err = ldap_search_sW(ldap->ld, ldap->object, ldap->search.scope, filter, props, FALSE, &ldap_ctx->res); + heap_free(props); + if (err != LDAP_SUCCESS) + { + TRACE("ldap_search_sW error %#x\n", err); + heap_free(ldap_ctx); + return HRESULT_FROM_WIN32(map_ldap_error(err)); + } + + *res = ldap_ctx; + return S_OK; } static HRESULT WINAPI search_AbandonSearch(IDirectorySearch *iface, ADS_SEARCH_HANDLE res)
1
0
0
0
Dmitry Timoshkov : adsldp: Add support for ADS_SEARCHPREF_SEARCH_SCOPE to IDirectorySearch::SetSearchPreference().
by Alexandre Julliard
25 Mar '20
25 Mar '20
Module: wine Branch: master Commit: 88678882aaf06cae71305cf43351d2982a6598d8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=88678882aaf06cae71305cf4…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Mar 25 11:17:48 2020 +0800 adsldp: Add support for ADS_SEARCHPREF_SEARCH_SCOPE to IDirectorySearch::SetSearchPreference(). Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/adsldp/adsldp.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- include/iads.idl | 9 ++++++++- 2 files changed, 54 insertions(+), 3 deletions(-) diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index caf404c3c6..6330ba2d9c 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -21,6 +21,7 @@ #include <stdarg.h> #define COBJMACROS +#define NONAMELESSUNION #include "windef.h" #include "winbase.h" @@ -389,6 +390,10 @@ typedef struct ULONG port; ULONG attrs_count, attrs_count_allocated; struct ldap_attribute *attrs; + struct + { + ADS_SCOPEENUM scope; + } search; } LDAP_namespace; static inline LDAP_namespace *impl_from_IADs(IADs *iface) @@ -1091,8 +1096,46 @@ static ULONG WINAPI search_Release(IDirectorySearch *iface) static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_SEARCHPREF_INFO prefs, DWORD count) { - FIXME("%p,%p,%u: stub\n", iface, prefs, count); - return E_NOTIMPL; + LDAP_namespace *ldap = impl_from_IDirectorySearch(iface); + DWORD i; + + TRACE("%p,%p,%u\n", iface, prefs, count); + + for (i = 0; i < count; i++) + { + switch (prefs[i].dwSearchPref) + { + case ADS_SEARCHPREF_SEARCH_SCOPE: + if (prefs[i].vValue.dwType != ADSTYPE_INTEGER) + { + FIXME("ADS_SEARCHPREF_SEACH_SCOPE: not supportd dwType %d\n", prefs[i].vValue.dwType); + prefs[i].dwStatus = ADS_STATUS_INVALID_SEARCHPREFVALUE; + break; + } + + switch (prefs[i].vValue.u.Integer) + { + case ADS_SCOPE_BASE: + case ADS_SCOPE_ONELEVEL: + case ADS_SCOPE_SUBTREE: + ldap->search.scope = prefs[i].vValue.u.Integer; + prefs[i].dwStatus = ADS_STATUS_S_OK; + break; + + default: + prefs[i].dwStatus = ADS_STATUS_INVALID_SEARCHPREFVALUE; + break; + } + break; + + default: + FIXME("pref %d, type %u: stub\n", prefs[i].dwSearchPref, prefs[i].vValue.dwType); + prefs[i].dwStatus = ADS_STATUS_INVALID_SEARCHPREF; + break; + } + } + + return S_OK; } static HRESULT WINAPI search_ExecuteSearch(IDirectorySearch *iface, LPWSTR filter, LPWSTR *names, @@ -1186,6 +1229,7 @@ static HRESULT LDAPNamespace_create(REFIID riid, void **obj) ldap->attrs_count = 0; ldap->attrs_count_allocated = 0; ldap->attrs = NULL; + ldap->search.scope = ADS_SCOPE_SUBTREE; hr = IADs_QueryInterface(&ldap->IADs_iface, riid, obj); IADs_Release(&ldap->IADs_iface); diff --git a/include/iads.idl b/include/iads.idl index fdee17859d..6bb63afafb 100644 --- a/include/iads.idl +++ b/include/iads.idl @@ -139,6 +139,13 @@ typedef enum ADSTYPE_DN_WITH_STRING } ADSTYPEENUM; +typedef enum +{ + ADS_SCOPE_BASE, + ADS_SCOPE_ONELEVEL, + ADS_SCOPE_SUBTREE +} ADS_SCOPEENUM; + typedef enum { ADS_PASSWORD_ENCODE_REQUIRE_SSL, @@ -318,7 +325,7 @@ typedef struct _adsvalue ADS_NT_SECURITY_DESCRIPTOR SecurityDescriptor; PADS_DN_WITH_BINARY pDNWithBinary; PADS_DN_WITH_STRING pDNWithString; - }; + } DUMMYUNIONNAME; } ADSVALUE, *PADSVALUE; typedef struct ads_searchpref_info
1
0
0
0
Dmitry Timoshkov : adsldp: Add IDirectorySearch stubs.
by Alexandre Julliard
25 Mar '20
25 Mar '20
Module: wine Branch: master Commit: 66897b455ca9d3f4bdbf8afcb847f91b2578eca4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=66897b455ca9d3f4bdbf8afc…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Mar 25 11:17:42 2020 +0800 adsldp: Add IDirectorySearch stubs. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/adsldp/adsldp.c | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++ include/iads.idl | 4 +- 2 files changed, 124 insertions(+), 3 deletions(-) diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index c49f9ef70b..caf404c3c6 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -381,6 +381,7 @@ typedef struct { IADs IADs_iface; IADsOpenDSObject IADsOpenDSObject_iface; + IDirectorySearch IDirectorySearch_iface; LONG ref; LDAP *ld; BSTR host; @@ -419,6 +420,13 @@ static HRESULT WINAPI ldapns_QueryInterface(IADs *iface, REFIID riid, void **obj return S_OK; } + if (IsEqualGUID(riid, &IID_IDirectorySearch)) + { + IADs_AddRef(iface); + *obj = &ldap->IDirectorySearch_iface; + return S_OK; + } + FIXME("interface %s is not implemented\n", debugstr_guid(riid)); return E_NOINTERFACE; } @@ -1046,6 +1054,120 @@ static const IADsOpenDSObjectVtbl IADsOpenDSObject_vtbl = openobj_OpenDSObject }; +static inline LDAP_namespace *impl_from_IDirectorySearch(IDirectorySearch *iface) +{ + return CONTAINING_RECORD(iface, LDAP_namespace, IDirectorySearch_iface); +} + +static HRESULT WINAPI search_QueryInterface(IDirectorySearch *iface, REFIID riid, void **obj) +{ + TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj); + + if (!riid || !obj) return E_INVALIDARG; + + if (IsEqualGUID(riid, &IID_IDirectorySearch) || + IsEqualGUID(riid, &IID_IUnknown)) + { + IDirectorySearch_AddRef(iface); + *obj = iface; + return S_OK; + } + + FIXME("interface %s is not implemented\n", debugstr_guid(riid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI search_AddRef(IDirectorySearch *iface) +{ + LDAP_namespace *ldap = impl_from_IDirectorySearch(iface); + return IADs_AddRef(&ldap->IADs_iface); +} + +static ULONG WINAPI search_Release(IDirectorySearch *iface) +{ + LDAP_namespace *ldap = impl_from_IDirectorySearch(iface); + return IADs_Release(&ldap->IADs_iface); +} + +static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_SEARCHPREF_INFO prefs, DWORD count) +{ + FIXME("%p,%p,%u: stub\n", iface, prefs, count); + return E_NOTIMPL; +} + +static HRESULT WINAPI search_ExecuteSearch(IDirectorySearch *iface, LPWSTR filter, LPWSTR *names, + DWORD count, PADS_SEARCH_HANDLE res) +{ + FIXME("%p,%s,%p,%u,%p: stub\n", iface, debugstr_w(filter), names, count, res); + return E_NOTIMPL; +} + +static HRESULT WINAPI search_AbandonSearch(IDirectorySearch *iface, ADS_SEARCH_HANDLE res) +{ + FIXME("%p,%p: stub\n", iface, res); + return E_NOTIMPL; +} + +static HRESULT WINAPI search_GetFirstRow(IDirectorySearch *iface, ADS_SEARCH_HANDLE res) +{ + FIXME("%p,%p: stub\n", iface, res); + return E_NOTIMPL; +} + +static HRESULT WINAPI search_GetNextRow(IDirectorySearch *iface, ADS_SEARCH_HANDLE res) +{ + FIXME("%p,%p: stub\n", iface, res); + return E_NOTIMPL; +} + +static HRESULT WINAPI search_GetPreviousRow(IDirectorySearch *iface, ADS_SEARCH_HANDLE res) +{ + FIXME("%p,%p: stub\n", iface, res); + return E_NOTIMPL; +} + +static HRESULT WINAPI search_GetNextColumnName(IDirectorySearch *iface, ADS_SEARCH_HANDLE res, LPWSTR *names) +{ + FIXME("%p,%p,%p: stub\n", iface, res, names); + return E_NOTIMPL; +} + +static HRESULT WINAPI search_GetColumn(IDirectorySearch *iface, ADS_SEARCH_HANDLE res, + LPWSTR name, PADS_SEARCH_COLUMN col) +{ + FIXME("%p,%p,%s,%p: stub\n", iface, res, debugstr_w(name), col); + return E_NOTIMPL; +} + +static HRESULT WINAPI search_FreeColumn(IDirectorySearch *iface, PADS_SEARCH_COLUMN col) +{ + FIXME("%p,%p: stub\n", iface, col); + return E_NOTIMPL; +} + +static HRESULT WINAPI search_CloseSearchHandle(IDirectorySearch *iface, ADS_SEARCH_HANDLE res) +{ + FIXME("%p,%p: stub\n", iface, res); + return E_NOTIMPL; +} + +static const IDirectorySearchVtbl IDirectorySearch_vtbl = +{ + search_QueryInterface, + search_AddRef, + search_Release, + search_SetSearchPreference, + search_ExecuteSearch, + search_AbandonSearch, + search_GetFirstRow, + search_GetNextRow, + search_GetPreviousRow, + search_GetNextColumnName, + search_GetColumn, + search_FreeColumn, + search_CloseSearchHandle +}; + static HRESULT LDAPNamespace_create(REFIID riid, void **obj) { LDAP_namespace *ldap; @@ -1056,6 +1178,7 @@ static HRESULT LDAPNamespace_create(REFIID riid, void **obj) ldap->IADs_iface.lpVtbl = &IADs_vtbl; ldap->IADsOpenDSObject_iface.lpVtbl = &IADsOpenDSObject_vtbl; + ldap->IDirectorySearch_iface.lpVtbl = &IDirectorySearch_vtbl; ldap->ref = 1; ldap->ld = NULL; ldap->host = NULL; diff --git a/include/iads.idl b/include/iads.idl index 8553a03d8c..fdee17859d 100644 --- a/include/iads.idl +++ b/include/iads.idl @@ -99,8 +99,6 @@ typedef enum ADS_SEARCHPREF_EXTENDED_DN } ADS_SEARCHPREF_ENUM; -typedef ADS_SEARCHPREF_ENUM *PADS_SEARCHPREF_INFO; - typedef enum { ADS_STATUS_S_OK, @@ -328,7 +326,7 @@ typedef struct ads_searchpref_info ADS_SEARCHPREF dwSearchPref; ADSVALUE vValue; ADS_STATUS dwStatus; -} ADS_SEARCHPREF_INFO; +} ADS_SEARCHPREF_INFO, *PADS_SEARCHPREF_INFO; typedef struct ads_search_column {
1
0
0
0
Dmitry Timoshkov : adsldp: Forward IADsOpenDSObject::AddRef/Release to base object.
by Alexandre Julliard
25 Mar '20
25 Mar '20
Module: wine Branch: master Commit: 2512bf2c1def78edafaf4bbd8448bfb97f44b1dd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2512bf2c1def78edafaf4bbd…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Mar 25 11:17:35 2020 +0800 adsldp: Forward IADsOpenDSObject::AddRef/Release to base object. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/adsldp/adsldp.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index 7ff1aa09b4..c49f9ef70b 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -806,21 +806,13 @@ static HRESULT WINAPI openobj_QueryInterface(IADsOpenDSObject *iface, REFIID rii static ULONG WINAPI openobj_AddRef(IADsOpenDSObject *iface) { LDAP_namespace *ldap = impl_from_IADsOpenDSObject(iface); - return InterlockedIncrement(&ldap->ref); + return IADs_AddRef(&ldap->IADs_iface); } static ULONG WINAPI openobj_Release(IADsOpenDSObject *iface) { LDAP_namespace *ldap = impl_from_IADsOpenDSObject(iface); - LONG ref = InterlockedDecrement(&ldap->ref); - - if (!ref) - { - TRACE("destroying %p\n", iface); - HeapFree(GetProcessHeap(), 0, ldap); - } - - return ref; + return IADs_Release(&ldap->IADs_iface); } static HRESULT WINAPI openobj_GetTypeInfoCount(IADsOpenDSObject *iface, UINT *count)
1
0
0
0
Dmitry Timoshkov : adsldp: Turn FIXME into a TRACE for IADsOpenDSObject::OpenDSObject().
by Alexandre Julliard
25 Mar '20
25 Mar '20
Module: wine Branch: master Commit: 0662aaaddc0679abe032ca8ea9f48c34cba48179 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0662aaaddc0679abe032ca8e…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Mar 25 11:17:24 2020 +0800 adsldp: Turn FIXME into a TRACE for IADsOpenDSObject::OpenDSObject(). It's in a good enough state already. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/adsldp/adsldp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index 03f7571afd..7ff1aa09b4 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -924,7 +924,7 @@ static HRESULT WINAPI openobj_OpenDSObject(IADsOpenDSObject *iface, BSTR path, B HRESULT hr; ULONG err; - FIXME("%p,%s,%s,%p,%08x,%p: semi-stub\n", iface, debugstr_w(path), debugstr_w(user), password, flags, obj); + TRACE("%p,%s,%s,%p,%08x,%p\n", iface, debugstr_w(path), debugstr_w(user), password, flags, obj); hr = parse_path(path, &host, &port, &object); if (hr != S_OK) return hr;
1
0
0
0
← Newer
1
...
23
24
25
26
27
28
29
...
100
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
89
90
91
92
93
94
95
96
97
98
99
100
Results per page:
10
25
50
100
200