ReactOS.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
2024
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
List overview
Download
Ros-diffs
October 2019
----- 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
ros-diffs@reactos.org
23 participants
180 discussions
Start a n
N
ew thread
[reactos] 01/01: [HHCTRL.OCX] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6cbb6445242203dcd1f11…
commit 6cbb6445242203dcd1f112c62796981e6a1f4d6f Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Oct 26 22:57:01 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Oct 26 22:57:01 2019 +0100 [HHCTRL.OCX] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/hhctrl.ocx/chm.c | 24 +++++++++++------------ dll/win32/hhctrl.ocx/content.c | 20 +++++++++---------- dll/win32/hhctrl.ocx/help.c | 10 +++++----- dll/win32/hhctrl.ocx/hhctrl.c | 44 +++++++++++++++++++++++++----------------- dll/win32/hhctrl.ocx/hhctrl.h | 4 ++-- dll/win32/hhctrl.ocx/index.c | 26 ++++++++++++------------- dll/win32/hhctrl.ocx/search.c | 12 ++++++------ media/doc/README.WINE | 2 +- 8 files changed, 75 insertions(+), 67 deletions(-) diff --git a/dll/win32/hhctrl.ocx/chm.c b/dll/win32/hhctrl.ocx/chm.c index 01403368b0f..07211f1dbd5 100644 --- a/dll/win32/hhctrl.ocx/chm.c +++ b/dll/win32/hhctrl.ocx/chm.c @@ -228,11 +228,11 @@ static WCHAR *FindHTMLHelpSetting(HHInfo *info, const WCHAR *extW) WCHAR *filename; HRESULT hr; - filename = heap_alloc( (strlenW(info->pCHMInfo->compiledFile) - + strlenW(periodW) + strlenW(extW) + 1) * sizeof(WCHAR) ); - strcpyW(filename, info->pCHMInfo->compiledFile); - strcatW(filename, periodW); - strcatW(filename, extW); + filename = heap_alloc( (lstrlenW(info->pCHMInfo->compiledFile) + + lstrlenW(periodW) + lstrlenW(extW) + 1) * sizeof(WCHAR) ); + lstrcpyW(filename, info->pCHMInfo->compiledFile); + lstrcatW(filename, periodW); + lstrcatW(filename, extW); hr = IStorage_OpenStream(pStorage, filename, NULL, STGM_READ, 0, &pStream); if (FAILED(hr)) { @@ -483,11 +483,11 @@ LPCWSTR skip_schema(LPCWSTR url) static const WCHAR msits_schema[] = {'m','s','-','i','t','s',':'}; static const WCHAR mk_schema[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':'}; - if(!strncmpiW(its_schema, url, ARRAY_SIZE(its_schema))) + if(!_wcsnicmp(its_schema, url, ARRAY_SIZE(its_schema))) return url + ARRAY_SIZE(its_schema); - if(!strncmpiW(msits_schema, url, ARRAY_SIZE(msits_schema))) + if(!_wcsnicmp(msits_schema, url, ARRAY_SIZE(msits_schema))) return url + ARRAY_SIZE(msits_schema); - if(!strncmpiW(mk_schema, url, ARRAY_SIZE(mk_schema))) + if(!_wcsnicmp(mk_schema, url, ARRAY_SIZE(mk_schema))) return url + ARRAY_SIZE(mk_schema); return url; @@ -500,15 +500,15 @@ void SetChmPath(ChmPath *file, LPCWSTR base_file, LPCWSTR path) path = skip_schema(path); - ptr = strstrW(path, separatorW); + ptr = wcsstr(path, separatorW); if(ptr) { WCHAR chm_file[MAX_PATH]; WCHAR rel_path[MAX_PATH]; WCHAR base_path[MAX_PATH]; LPWSTR p; - strcpyW(base_path, base_file); - p = strrchrW(base_path, '\\'); + lstrcpyW(base_path, base_file); + p = wcsrchr(base_path, '\\'); if(p) *p = 0; @@ -595,7 +595,7 @@ WCHAR *GetDocumentTitle(CHMInfo *info, LPCWSTR document) TRACE("%s\n", node.buf); - if(!strcasecmp(node_name.buf, "title")) { + if(!_strnicmp(node_name.buf, "title", -1)) { if(next_content(&stream, &content) && content.len > 1) { document_title = strdupnAtoW(&content.buf[1], content.len-1); diff --git a/dll/win32/hhctrl.ocx/content.c b/dll/win32/hhctrl.ocx/content.c index 6a7c8f8a8c2..0bf374344d0 100644 --- a/dll/win32/hhctrl.ocx/content.c +++ b/dll/win32/hhctrl.ocx/content.c @@ -62,11 +62,11 @@ static void parse_obj_node_param(ContentItem *item, ContentItem *hhc_root, const return; } - if(!strncasecmp("name", ptr, len)) { + if(!_strnicmp("name", ptr, len)) { param = &item->name; - }else if(!strncasecmp("merge", ptr, len)) { + }else if(!_strnicmp("merge", ptr, len)) { param = &merge; - }else if(!strncasecmp("local", ptr, len)) { + }else if(!_strnicmp("local", ptr, len)) { param = &item->local; }else { WARN("unhandled param %s\n", debugstr_an(ptr, len)); @@ -148,9 +148,9 @@ static ContentItem *parse_sitemap_object(HHInfo *info, stream_t *stream, Content TRACE("%s\n", node.buf); - if(!strcasecmp(node_name.buf, "/object")) + if(!_strnicmp(node_name.buf, "/object", -1)) break; - if(!strcasecmp(node_name.buf, "param")) + if(!_strnicmp(node_name.buf, "param", -1)) parse_obj_node_param(item, hhc_root, node.buf, info->pCHMInfo->codePage); strbuf_zero(&node); @@ -195,7 +195,7 @@ static ContentItem *parse_ul(HHInfo *info, stream_t *stream, ContentItem *hhc_ro TRACE("%s\n", node.buf); - if(!strcasecmp(node_name.buf, "object")) { + if(!_strnicmp(node_name.buf, "object", -1)) { const char *ptr; int len; @@ -210,10 +210,10 @@ static ContentItem *parse_ul(HHInfo *info, stream_t *stream, ContentItem *hhc_ro if(!ret) ret = prev; } - }else if(!strcasecmp(node_name.buf, "ul")) { + }else if(!_strnicmp(node_name.buf, "ul", -1)) { new_item = parse_ul(info, stream, hhc_root); insert_item(prev, new_item, INSERT_CHILD); - }else if(!strcasecmp(node_name.buf, "/ul")) { + }else if(!_strnicmp(node_name.buf, "/ul", -1)) { break; } @@ -245,7 +245,7 @@ static ContentItem *parse_hhc(HHInfo *info, IStream *str, ContentItem *hhc_root, TRACE("%s\n", node.buf); - if(!strcasecmp(node_name.buf, "ul")) { + if(!_strnicmp(node_name.buf, "ul", -1)) { ContentItem *item = parse_ul(info, &stream, hhc_root); prev = insert_item(prev, item, INSERT_CHILD); if(!ret) @@ -268,7 +268,7 @@ static void insert_content_item(HWND hwnd, ContentItem *parent, ContentItem *ite memset(&tvis, 0, sizeof(tvis)); tvis.u.item.mask = TVIF_TEXT|TVIF_PARAM|TVIF_IMAGE|TVIF_SELECTEDIMAGE; - tvis.u.item.cchTextMax = strlenW(item->name)+1; + tvis.u.item.cchTextMax = lstrlenW(item->name)+1; tvis.u.item.pszText = item->name; tvis.u.item.lParam = (LPARAM)item; tvis.u.item.iImage = item->child ? HHTV_FOLDER : HHTV_DOCUMENT; diff --git a/dll/win32/hhctrl.ocx/help.c b/dll/win32/hhctrl.ocx/help.c index 75b28f2f57d..06f73358f44 100644 --- a/dll/win32/hhctrl.ocx/help.c +++ b/dll/win32/hhctrl.ocx/help.c @@ -216,7 +216,7 @@ BOOL NavigateToUrl(HHInfo *info, LPCWSTR surl) TRACE("%s\n", debugstr_w(surl)); - if (strstrW(surl, url_indicator)) { + if (wcsstr(surl, url_indicator)) { hres = navigate_url(info, surl); if(SUCCEEDED(hres)) return TRUE; @@ -288,7 +288,7 @@ static void DoSync(HHInfo *info) static const WCHAR delimW[] = {':',':','/',0}; const WCHAR *index; - index = strstrW(url, delimW); + index = wcsstr(url, delimW); if (index) ActivateContentTopic(info->tabs[TAB_CONTENTS].hwnd, index + 3, info->content); /* skip over ::/ */ @@ -639,7 +639,7 @@ static LRESULT OnTopicChange(HHInfo *info, void *user_data) memset(&lvi, 0, sizeof(lvi)); lvi.iItem = i; lvi.mask = LVIF_TEXT|LVIF_PARAM; - lvi.cchTextMax = strlenW(name)+1; + lvi.cchTextMax = lstrlenW(name)+1; lvi.pszText = name; lvi.lParam = (LPARAM) item; SendMessageW(info->popup.hwndList, LVM_INSERTITEMW, 0, (LPARAM)&lvi); @@ -1025,7 +1025,7 @@ static BOOL HH_AddToolbar(HHInfo *pHHInfo) for (dwIndex = 0; dwIndex < dwNumButtons; dwIndex++) { LPWSTR szBuf = HH_LoadString(buttons[dwIndex].idCommand); - DWORD dwLen = strlenW(szBuf); + DWORD dwLen = lstrlenW(szBuf); szBuf[dwLen + 1] = 0; /* Double-null terminate */ buttons[dwIndex].iString = (DWORD)SendMessageW(hToolbar, TB_ADDSTRINGW, 0, (LPARAM)szBuf); @@ -1958,7 +1958,7 @@ HHInfo *find_window(const WCHAR *window) LIST_FOR_EACH_ENTRY(info, &window_list, HHInfo, entry) { - if (strcmpW(info->WinType.pszType, window) == 0) + if (lstrcmpW(info->WinType.pszType, window) == 0) return info; } return NULL; diff --git a/dll/win32/hhctrl.ocx/hhctrl.c b/dll/win32/hhctrl.ocx/hhctrl.c index 7efca002f9f..893cdde6ea7 100644 --- a/dll/win32/hhctrl.ocx/hhctrl.c +++ b/dll/win32/hhctrl.ocx/hhctrl.c @@ -97,38 +97,43 @@ static const char *command_to_string(UINT command) #undef X } -static BOOL resolve_filename(const WCHAR *filename, WCHAR *fullname, DWORD buflen, WCHAR **index, WCHAR **window) +static BOOL resolve_filename(const WCHAR *env_filename, WCHAR *fullname, DWORD buflen, WCHAR **index, WCHAR **window) { - const WCHAR *extra; - WCHAR chm_file[MAX_PATH]; - static const WCHAR helpW[] = {'\\','h','e','l','p','\\',0}; static const WCHAR delimW[] = {':',':',0}; static const WCHAR delim2W[] = {'>',0}; - filename = skip_schema(filename); + DWORD env_len; + WCHAR *filename, *extra; + + env_filename = skip_schema(env_filename); /* the format is "helpFile[::/index][>window]" */ if (index) *index = NULL; if (window) *window = NULL; - extra = strstrW(filename, delim2W); + env_len = ExpandEnvironmentStringsW(env_filename, NULL, 0); + if (!env_len) + return 0; + + filename = heap_alloc(env_len * sizeof(WCHAR)); + if (filename == NULL) + return 0; + + ExpandEnvironmentStringsW(env_filename, filename, env_len); + + extra = wcsstr(filename, delim2W); if (extra) { - memcpy(chm_file, filename, (extra-filename)*sizeof(WCHAR)); - chm_file[extra-filename] = 0; - filename = chm_file; + *extra = 0; if (window) *window = strdupW(extra+1); } - extra = strstrW(filename, delimW); + extra = wcsstr(filename, delimW); if (extra) { - if (filename != chm_file) - memcpy(chm_file, filename, (extra-filename)*sizeof(WCHAR)); - chm_file[extra-filename] = 0; - filename = chm_file; + *extra = 0; if (index) *index = strdupW(extra+2); } @@ -137,9 +142,12 @@ static BOOL resolve_filename(const WCHAR *filename, WCHAR *fullname, DWORD bufle if (GetFileAttributesW(fullname) == INVALID_FILE_ATTRIBUTES) { GetWindowsDirectoryW(fullname, buflen); - strcatW(fullname, helpW); - strcatW(fullname, filename); + lstrcatW(fullname, helpW); + lstrcatW(fullname, filename); } + + heap_free(filename); + return (GetFileAttributesW(fullname) != INVALID_FILE_ATTRIBUTES); } @@ -206,12 +214,12 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat static const WCHAR delimW[] = {':',':',0}; const WCHAR *i = (const WCHAR *)data; - index = strstrW(i, delimW); + index = wcsstr(i, delimW); if(index) { if(memcmp(info->pCHMInfo->szFile, i, index-i)) FIXME("Opening a CHM file in the context of another is not supported.\n"); - index += strlenW(delimW); + index += lstrlenW(delimW); } else index = i; diff --git a/dll/win32/hhctrl.ocx/hhctrl.h b/dll/win32/hhctrl.ocx/hhctrl.h index b358f543788..a03d09f5633 100644 --- a/dll/win32/hhctrl.ocx/hhctrl.h +++ b/dll/win32/hhctrl.ocx/hhctrl.h @@ -26,6 +26,7 @@ #include "windef.h" #include "winbase.h" +#include "wine/winternl.h" #include "winuser.h" #include "winnls.h" #include "htmlhelp.h" @@ -39,7 +40,6 @@ #endif #include "wine/itss.h" -#include "wine/unicode.h" #include "wine/heap.h" #include "wine/list.h" @@ -258,7 +258,7 @@ static inline LPWSTR strdupW(LPCWSTR str) if(!str) return NULL; - size = (strlenW(str)+1)*sizeof(WCHAR); + size = (lstrlenW(str)+1)*sizeof(WCHAR); ret = heap_alloc(size); memcpy(ret, str, size); diff --git a/dll/win32/hhctrl.ocx/index.c b/dll/win32/hhctrl.ocx/index.c index 8b80ce24e79..54151d0821e 100644 --- a/dll/win32/hhctrl.ocx/index.c +++ b/dll/win32/hhctrl.ocx/index.c @@ -43,7 +43,7 @@ static void fill_index_tree(HWND hwnd, IndexItem *item) lvi.iItem = index++; lvi.mask = LVIF_TEXT|LVIF_PARAM|LVIF_INDENT; lvi.iIndent = item->indentLevel; - lvi.cchTextMax = strlenW(item->keyword)+1; + lvi.cchTextMax = lstrlenW(item->keyword)+1; lvi.pszText = item->keyword; lvi.lParam = (LPARAM)item; item->id = (HTREEITEM)SendMessageW(hwnd, LVM_INSERTITEMW, 0, (LPARAM)&lvi); @@ -83,20 +83,20 @@ static void parse_index_obj_node_param(IndexItem *item, const char *text, UINT c /* Allocate a new sub-item, either on the first run or whenever a * sub-topic has filled out both the "name" and "local" params. */ - if(item->itemFlags == 0x11 && (!strncasecmp("name", ptr, len) || !strncasecmp("local", ptr, len))) + if(item->itemFlags == 0x11 && (!_strnicmp("name", ptr, len) || !_strnicmp("local", ptr, len))) item_realloc(item, item->nItems+1); - if(!strncasecmp("keyword", ptr, len)) { + if(!_strnicmp("keyword", ptr, len)) { param = &item->keyword; - }else if(!item->keyword && !strncasecmp("name", ptr, len)) { + }else if(!item->keyword && !_strnicmp("name", ptr, len)) { /* Some HTML Help index files use an additional "name" parameter * rather than the "keyword" parameter. In this case, the first * occurrence of the "name" parameter is the keyword. */ param = &item->keyword; - }else if(!strncasecmp("name", ptr, len)) { + }else if(!_strnicmp("name", ptr, len)) { item->itemFlags |= 0x01; param = &item->items[item->nItems-1].name; - }else if(!strncasecmp("local", ptr, len)) { + }else if(!_strnicmp("local", ptr, len)) { item->itemFlags |= 0x10; param = &item->items[item->nItems-1].local; }else { @@ -137,9 +137,9 @@ static IndexItem *parse_index_sitemap_object(HHInfo *info, stream_t *stream) TRACE("%s\n", node.buf); - if(!strcasecmp(node_name.buf, "param")) { + if(!_strnicmp(node_name.buf, "param", -1)) { parse_index_obj_node_param(item, node.buf, info->pCHMInfo->codePage); - }else if(!strcasecmp(node_name.buf, "/object")) { + }else if(!_strnicmp(node_name.buf, "/object", -1)) { break; }else { WARN("Unhandled tag! %s\n", node_name.buf); @@ -173,7 +173,7 @@ static IndexItem *parse_li(HHInfo *info, stream_t *stream) TRACE("%s\n", node.buf); - if(!strcasecmp(node_name.buf, "object")) { + if(!_strnicmp(node_name.buf, "object", -1)) { const char *ptr; int len; @@ -228,11 +228,11 @@ static void parse_hhindex(HHInfo *info, IStream *str, IndexItem *item) TRACE("%s\n", node.buf); - if(!strcasecmp(node_name.buf, "li")) { + if(!_strnicmp(node_name.buf, "li", -1)) { IndexItem *new_item; new_item = parse_li(info, &stream); - if(new_item && item->keyword && strcmpW(new_item->keyword, item->keyword) == 0) { + if(new_item && item->keyword && lstrcmpW(new_item->keyword, item->keyword) == 0) { int num_items = item->nItems; item_realloc(item, num_items+1); @@ -246,9 +246,9 @@ static void parse_hhindex(HHInfo *info, IStream *str, IndexItem *item) item = item->next; item->indentLevel = indent_level; } - }else if(!strcasecmp(node_name.buf, "ul")) { + }else if(!_strnicmp(node_name.buf, "ul", -1)) { indent_level++; - }else if(!strcasecmp(node_name.buf, "/ul")) { + }else if(!_strnicmp(node_name.buf, "/ul", -1)) { indent_level--; }else { WARN("Unhandled tag! %s\n", node_name.buf); diff --git a/dll/win32/hhctrl.ocx/search.c b/dll/win32/hhctrl.ocx/search.c index 0e198b87367..f9c13a91312 100644 --- a/dll/win32/hhctrl.ocx/search.c +++ b/dll/win32/hhctrl.ocx/search.c @@ -29,7 +29,7 @@ static SearchItem *SearchCHM_Folder(SearchItem *item, IStorage *pStorage, /* Allocate a ListView entry for a search result. */ static SearchItem *alloc_search_item(WCHAR *title, const WCHAR *filename) { - int filename_len = filename ? (strlenW(filename)+1)*sizeof(WCHAR) : 0; + int filename_len = filename ? (lstrlenW(filename)+1)*sizeof(WCHAR) : 0; SearchItem *item; item = heap_alloc_zero(sizeof(SearchItem)); @@ -56,7 +56,7 @@ static void fill_search_tree(HWND hwndList, SearchItem *item) memset(&lvi, 0, sizeof(lvi)); lvi.iItem = index++; lvi.mask = LVIF_TEXT|LVIF_PARAM; - lvi.cchTextMax = strlenW(item->title)+1; + lvi.cchTextMax = lstrlenW(item->title)+1; lvi.pszText = item->title; lvi.lParam = (LPARAM)item; item->id = (HTREEITEM)SendMessageW(hwndList, LVM_INSERTITEMW, 0, (LPARAM)&lvi); @@ -102,7 +102,7 @@ static WCHAR *SearchCHM_File(IStorage *pStorage, const WCHAR *file, const char * char *text = &content.buf[1]; int textlen = content.len-1; - if(!strcasecmp(node_name.buf, "title")) + if(!_strnicmp(node_name.buf, "title", -1)) { int wlen = MultiByteToWideChar(CP_ACP, 0, text, textlen, NULL, 0); title = heap_alloc((wlen+1)*sizeof(WCHAR)); @@ -168,14 +168,14 @@ static SearchItem *SearchCHM_Storage(SearchItem *item, IStorage *pStorage, while (IEnumSTATSTG_Next(elem, 1, &entries, &retr) == NOERROR) { filename = entries.pwcsName; - while(strchrW(filename, '/')) - filename = strchrW(filename, '/')+1; + while(wcschr(filename, '/')) + filename = wcschr(filename, '/')+1; switch(entries.type) { case STGTY_STORAGE: item = SearchCHM_Folder(item, pStorage, filename, needle); break; case STGTY_STREAM: - if(strstrW(filename, szHTMext)) + if(wcsstr(filename, szHTMext)) { WCHAR *title = SearchCHM_File(pStorage, filename, needle); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index fdc5b31dc7f..01c8ef6cb1e 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -70,7 +70,7 @@ dll/win32/faultrep # Synced to WineStaging-4.18 dll/win32/fontsub # Synced to WineStaging-2.9 dll/win32/fusion # Synced to WineStaging-4.18 dll/win32/gdiplus # Synced to WineStaging-4.0 -dll/win32/hhctrl.ocx # Synced to WineStaging-4.0 +dll/win32/hhctrl.ocx # Synced to WineStaging-4.18 dll/win32/hlink # Synced to WineStaging-4.0 dll/win32/hnetcfg # Synced to WineStaging-4.18 dll/win32/httpapi # Synced to WineStaging-3.3
5 years
1
0
0
0
[reactos] 01/01: [FUSION_WINETEST] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7046ddd63ce6b6991b906…
commit 7046ddd63ce6b6991b9069e6bed08a8170abf307 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Oct 26 22:56:35 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Oct 26 22:56:35 2019 +0100 [FUSION_WINETEST] Sync with Wine Staging 4.18. CORE-16441 --- modules/rostests/winetests/fusion/asmenum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rostests/winetests/fusion/asmenum.c b/modules/rostests/winetests/fusion/asmenum.c index 5091be464a1..115089e6741 100644 --- a/modules/rostests/winetests/fusion/asmenum.c +++ b/modules/rostests/winetests/fusion/asmenum.c @@ -242,10 +242,10 @@ static void enum_gac_assembly_dirs(struct list *assemblies, const char *parent, *end = 0; /* Directories with no dll or exe will not be enumerated */ - snprintf(end, path + MAX_PATH - end, "%s\\%s.dll", ffd.cFileName, parent); + sprintf(end, "%s\\%s.dll", ffd.cFileName, parent); if (GetFileAttributesA(path) == INVALID_FILE_ATTRIBUTES) { - snprintf(end, path + MAX_PATH - end, "%s\\%s.exe", ffd.cFileName, parent); + sprintf(end, "%s\\%s.exe", ffd.cFileName, parent); if (GetFileAttributesA(path) == INVALID_FILE_ATTRIBUTES) continue; }
5 years
1
0
0
0
[reactos] 01/01: [FUSION] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=88179a5d0f277c9e758ec…
commit 88179a5d0f277c9e758ecfe26f2c9242d89a56d1 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Oct 26 22:56:11 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Oct 26 22:56:11 2019 +0100 [FUSION] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/fusion/CMakeLists.txt | 2 +- dll/win32/fusion/asmcache.c | 44 ++++++++++++----------- dll/win32/fusion/asmenum.c | 58 ++++++++++++++++-------------- dll/win32/fusion/asmname.c | 30 ++++++++-------- dll/win32/fusion/assembly.c | 44 ++++++++--------------- dll/win32/fusion/fusion.c | 20 ++++++----- dll/win32/fusion/fusion_1_1/CMakeLists.txt | 2 +- dll/win32/fusion/fusion_2_0/CMakeLists.txt | 2 +- dll/win32/fusion/fusionpriv.h | 3 ++ dll/win32/fusion/precomp.h | 1 - media/doc/README.WINE | 2 +- 11 files changed, 102 insertions(+), 106 deletions(-) diff --git a/dll/win32/fusion/CMakeLists.txt b/dll/win32/fusion/CMakeLists.txt index 7e151d9db52..5a19f11ac93 100644 --- a/dll/win32/fusion/CMakeLists.txt +++ b/dll/win32/fusion/CMakeLists.txt @@ -21,7 +21,7 @@ add_library(fusion MODULE set_module_type(fusion win32dll) target_link_libraries(fusion fusion_common uuid wine) -add_importlibs(fusion advapi32 dbghelp shlwapi user32 msvcrt kernel32 ntdll) +add_importlibs(fusion bcrypt advapi32 dbghelp shlwapi user32 msvcrt kernel32 ntdll) add_pch(fusion_common precomp.h COMMON_SOURCE) add_cd_file(TARGET fusion DESTINATION
reactos/Microsoft.NET/Framework/v1.0.3705
FOR all) add_cd_file(TARGET fusion DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/fusion/asmcache.c b/dll/win32/fusion/asmcache.c index deca5f4c37b..cf16eb851b7 100644 --- a/dll/win32/fusion/asmcache.c +++ b/dll/win32/fusion/asmcache.c @@ -22,6 +22,9 @@ #include <stdio.h> #define COBJMACROS +#ifdef __REACTOS__ +#define WIN32_NO_STATUS +#endif #include "windef.h" #include "winbase.h" @@ -37,7 +40,6 @@ #include "fusionpriv.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(fusion); @@ -63,11 +65,11 @@ static BOOL create_full_path(LPCWSTR path) BOOL ret = TRUE; int len; - if (!(new_path = heap_alloc((strlenW(path) + 1) * sizeof(WCHAR)))) return FALSE; + if (!(new_path = heap_alloc((lstrlenW(path) + 1) * sizeof(WCHAR)))) return FALSE; - strcpyW(new_path, path); + lstrcpyW(new_path, path); - while ((len = strlenW(new_path)) && new_path[len - 1] == '\\') + while ((len = lstrlenW(new_path)) && new_path[len - 1] == '\\') new_path[len - 1] = 0; while (!CreateDirectoryW(new_path, NULL)) @@ -84,7 +86,7 @@ static BOOL create_full_path(LPCWSTR path) break; } - if(!(slash = strrchrW(new_path, '\\'))) + if(!(slash = wcsrchr(new_path, '\\'))) { ret = FALSE; break; @@ -116,14 +118,14 @@ static BOOL get_assembly_directory(LPWSTR dir, DWORD size, const char *version, if (!strcmp(version, "v4.0.30319")) { - strcpyW(dir + len, dotnet); + lstrcpyW(dir + len, dotnet); len += ARRAY_SIZE(dotnet) - 1; - strcpyW(dir + len, gac + 1); + lstrcpyW(dir + len, gac + 1); len += ARRAY_SIZE(gac) - 2; } else { - strcpyW(dir + len, gac); + lstrcpyW(dir + len, gac); len += ARRAY_SIZE(gac) - 1; } switch (architecture) @@ -132,15 +134,15 @@ static BOOL get_assembly_directory(LPWSTR dir, DWORD size, const char *version, break; case peMSIL: - strcpyW(dir + len, msil); + lstrcpyW(dir + len, msil); break; case peI386: - strcpyW(dir + len, x86); + lstrcpyW(dir + len, x86); break; case peAMD64: - strcpyW(dir + len, amd64); + lstrcpyW(dir + len, amd64); break; default: @@ -267,11 +269,11 @@ static HRESULT WINAPI IAssemblyCacheImpl_UninstallAssembly(IAssemblyCache *iface if (DeleteFileW( path )) { - if ((p = strrchrW( path, '\\' ))) + if ((p = wcsrchr( path, '\\' ))) { *p = 0; RemoveDirectoryW( path ); - if ((p = strrchrW( path, '\\' ))) + if ((p = wcsrchr( path, '\\' ))) { *p = 0; RemoveDirectoryW( path ); @@ -393,13 +395,13 @@ static HRESULT copy_file( const WCHAR *src_dir, DWORD src_len, const WCHAR *dst_ const WCHAR *filename ) { WCHAR *src_file, *dst_file; - DWORD len = strlenW( filename ); + DWORD len = lstrlenW( filename ); HRESULT hr = S_OK; if (!(src_file = heap_alloc( (src_len + len + 1) * sizeof(WCHAR) ))) return E_OUTOFMEMORY; memcpy( src_file, src_dir, src_len * sizeof(WCHAR) ); - strcpyW( src_file + src_len, filename ); + lstrcpyW( src_file + src_len, filename ); if (!(dst_file = heap_alloc( (dst_len + len + 1) * sizeof(WCHAR) ))) { @@ -407,7 +409,7 @@ static HRESULT copy_file( const WCHAR *src_dir, DWORD src_len, const WCHAR *dst_ return E_OUTOFMEMORY; } memcpy( dst_file, dst_dir, dst_len * sizeof(WCHAR) ); - strcpyW( dst_file + dst_len, filename ); + lstrcpyW( dst_file + dst_len, filename ); if (!CopyFileW( src_file, dst_file, FALSE )) hr = HRESULT_FROM_WIN32( GetLastError() ); heap_free( src_file ); @@ -442,7 +444,7 @@ static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface, if (!pszManifestFilePath || !*pszManifestFilePath) return E_INVALIDARG; - if (!(extension = strrchrW(pszManifestFilePath, '.'))) + if (!(extension = wcsrchr(pszManifestFilePath, '.'))) return HRESULT_FROM_WIN32(ERROR_INVALID_NAME); if (lstrcmpiW(extension, ext_exe) && lstrcmpiW(extension, ext_dll)) @@ -483,16 +485,16 @@ static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface, architecture = assembly_get_architecture(assembly); get_assembly_directory(asmdir, MAX_PATH, clr_version, architecture); - dst_len += strlenW(asmdir) + strlenW(name) + strlenW(version) + strlenW(token); + dst_len += lstrlenW(asmdir) + lstrlenW(name) + lstrlenW(version) + lstrlenW(token); if (!(dst_dir = heap_alloc(dst_len * sizeof(WCHAR)))) { hr = E_OUTOFMEMORY; goto done; } if (!strcmp(clr_version, "v4.0.30319")) - dst_len = sprintfW(dst_dir, format_v40, asmdir, name, version, token); + dst_len = swprintf(dst_dir, format_v40, asmdir, name, version, token); else - dst_len = sprintfW(dst_dir, format, asmdir, name, version, token); + dst_len = swprintf(dst_dir, format, asmdir, name, version, token); create_full_path(dst_dir); @@ -500,7 +502,7 @@ static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface, if (FAILED(hr)) goto done; - if ((p = strrchrW(asmpath, '\\'))) + if ((p = wcsrchr(asmpath, '\\'))) { filename = p + 1; src_dir = asmpath; diff --git a/dll/win32/fusion/asmenum.c b/dll/win32/fusion/asmenum.c index ba86818a2c6..49acfb1f1bb 100644 --- a/dll/win32/fusion/asmenum.c +++ b/dll/win32/fusion/asmenum.c @@ -20,6 +20,11 @@ #include <stdarg.h> +#ifdef __REACTOS__ +#include <wchar.h> +#define WIN32_NO_STATUS +#endif + #define COBJMACROS #define NONAMELESSUNION #define NONAMELESSSTRUCT @@ -34,7 +39,6 @@ #include "fusionpriv.h" #include "wine/debug.h" -#include "wine/unicode.h" #include "wine/list.h" WINE_DEFAULT_DEBUG_CHANNEL(fusion); @@ -187,9 +191,9 @@ static void build_file_mask(IAssemblyName *name, int depth, const WCHAR *path, if (!name) { if (prefix && depth == 1) - sprintfW(buf, star_prefix_fmt, path, prefix); + swprintf(buf, star_prefix_fmt, path, prefix); else - sprintfW(buf, star_fmt, path); + swprintf(buf, star_fmt, path); return; } if (depth == 0) @@ -198,9 +202,9 @@ static void build_file_mask(IAssemblyName *name, int depth, const WCHAR *path, *disp = '\0'; hr = IAssemblyName_GetName(name, &size, disp); if (SUCCEEDED(hr)) - sprintfW(buf, ss_fmt, path, disp); + swprintf(buf, ss_fmt, path, disp); else - sprintfW(buf, ss_fmt, path, star); + swprintf(buf, ss_fmt, path, star); } else if (depth == 1) { @@ -219,7 +223,7 @@ static void build_file_mask(IAssemblyName *name, int depth, const WCHAR *path, if (!major_size || !minor_size || !build_size || !revision_size) verptr = star; else { - sprintfW(version, ver_fmt, major, minor, build, revision); + swprintf(version, ver_fmt, major, minor, build, revision); verptr = version; } @@ -234,9 +238,9 @@ static void build_file_mask(IAssemblyName *name, int depth, const WCHAR *path, } if (prefix) - sprintfW(buf, ssss_fmt, path, prefix, verptr, pubkeyptr); + swprintf(buf, ssss_fmt, path, prefix, verptr, pubkeyptr); else - sprintfW(buf, sss_fmt, path, verptr, pubkeyptr); + swprintf(buf, sss_fmt, path, verptr, pubkeyptr); } } @@ -254,7 +258,7 @@ static int compare_assembly_names(ASMNAME *asmname1, ASMNAME *asmname2) size = sizeof(name2); IAssemblyName_GetProperty(asmname2->name, ASM_NAME_NAME, name2, &size); - if ((ret = strcmpiW(name1, name2))) return ret; + if ((ret = wcsicmp(name1, name2))) return ret; for (i = ASM_NAME_MAJOR_VERSION; i < ASM_NAME_CULTURE; i++) { @@ -277,7 +281,7 @@ static int compare_assembly_names(ASMNAME *asmname1, ASMNAME *asmname2) token_to_str(token1, token_str1); token_to_str(token2, token_str2); - if ((ret = strcmpiW(token_str1, token_str2))) return ret; + if ((ret = wcsicmp(token_str1, token_str2))) return ret; return 0; } @@ -331,7 +335,7 @@ static HRESULT enum_gac_assemblies(struct list *assemblies, IAssemblyName *name, if (depth == 0) { if (name) - ptr = strrchrW(buf, '\\') + 1; + ptr = wcsrchr(buf, '\\') + 1; else ptr = ffd.cFileName; @@ -341,19 +345,19 @@ static HRESULT enum_gac_assemblies(struct list *assemblies, IAssemblyName *name, { const WCHAR *token, *version = ffd.cFileName; - sprintfW(asmpath, path_fmt, path, ffd.cFileName, parent); - ptr = strstrW(ffd.cFileName, dblunder); + swprintf(asmpath, path_fmt, path, ffd.cFileName, parent); + ptr = wcsstr(ffd.cFileName, dblunder); *ptr = '\0'; token = ptr + 2; if (prefix) { - unsigned int prefix_len = strlenW(prefix); - if (strlenW(ffd.cFileName) >= prefix_len && - !memicmpW(ffd.cFileName, prefix, prefix_len)) + unsigned int prefix_len = lstrlenW(prefix); + if (lstrlenW(ffd.cFileName) >= prefix_len && + !_wcsnicmp(ffd.cFileName, prefix, prefix_len)) version += prefix_len; } - sprintfW(disp, name_fmt, parent, version, token); + swprintf(disp, name_fmt, parent, version, token); if (!(asmname = heap_alloc(sizeof(*asmname)))) { @@ -381,7 +385,7 @@ static HRESULT enum_gac_assemblies(struct list *assemblies, IAssemblyName *name, continue; } - sprintfW(buf, ss_fmt, path, ffd.cFileName); + swprintf(buf, ss_fmt, path, ffd.cFileName); hr = enum_gac_assemblies(assemblies, name, depth + 1, prefix, buf); if (FAILED(hr)) break; @@ -408,21 +412,21 @@ static HRESULT enumerate_gac(IAssemblyEnumImpl *asmenum, IAssemblyName *pName) if (FAILED(hr)) return hr; - strcpyW(path, buf); + lstrcpyW(path, buf); GetNativeSystemInfo(&info); if (info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) { - strcpyW(path + size - 1, gac_64); + lstrcpyW(path + size - 1, gac_64); hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, v40, path); if (FAILED(hr)) return hr; } - strcpyW(path + size - 1, gac_32); + lstrcpyW(path + size - 1, gac_32); hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, v40, path); if (FAILED(hr)) return hr; - strcpyW(path + size - 1, gac_msil); + lstrcpyW(path + size - 1, gac_msil); hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, v40, path); if (FAILED(hr)) return hr; @@ -432,25 +436,25 @@ static HRESULT enumerate_gac(IAssemblyEnumImpl *asmenum, IAssemblyName *pName) if (FAILED(hr)) return hr; - strcpyW(path, buf); + lstrcpyW(path, buf); if (info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) { - strcpyW(path + size - 1, gac_64); + lstrcpyW(path + size - 1, gac_64); hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, NULL, path); if (FAILED(hr)) return hr; } - strcpyW(path + size - 1, gac_32); + lstrcpyW(path + size - 1, gac_32); hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, NULL, path); if (FAILED(hr)) return hr; - strcpyW(path + size - 1, gac_msil); + lstrcpyW(path + size - 1, gac_msil); hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, NULL, path); if (FAILED(hr)) return hr; - strcpyW(path + size - 1, gac); + lstrcpyW(path + size - 1, gac); hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, NULL, path); if (FAILED(hr)) return hr; diff --git a/dll/win32/fusion/asmname.c b/dll/win32/fusion/asmname.c index c5d07009a39..61774308809 100644 --- a/dll/win32/fusion/asmname.c +++ b/dll/win32/fusion/asmname.c @@ -23,6 +23,9 @@ #define COBJMACROS #define INITGUID +#ifdef __REACTOS__ +#define WIN32_NO_STATUS +#endif #include "windef.h" #include "winbase.h" @@ -34,7 +37,6 @@ #include "strsafe.h" #include "wine/debug.h" -#include "wine/unicode.h" #include "fusionpriv.h" WINE_DEFAULT_DEBUG_CHANNEL(fusion); @@ -277,7 +279,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetDisplayName(IAssemblyName *iface, if (!name->displayname || !*name->displayname) return FUSION_E_INVALID_NAME; - size = strlenW(name->displayname) + 1; + size = lstrlenW(name->displayname) + 1; if (*pccDisplayName < size) { @@ -285,7 +287,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetDisplayName(IAssemblyName *iface, return E_NOT_SUFFICIENT_BUFFER; } - if (szDisplayName) strcpyW(szDisplayName, name->displayname); + if (szDisplayName) lstrcpyW(szDisplayName, name->displayname); *pccDisplayName = size; return S_OK; @@ -417,7 +419,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetName(IAssemblyName *iface, TRACE("(%p, %p, %p)\n", iface, lpcwBuffer, pwzName); if (name->name) - len = strlenW(name->name) + 1; + len = lstrlenW(name->name) + 1; else len = 0; @@ -427,7 +429,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetName(IAssemblyName *iface, return E_NOT_SUFFICIENT_BUFFER; } if (!name->name) lpcwBuffer[0] = 0; - else strcpyW(pwzName, name->name); + else lstrcpyW(pwzName, name->name); *lpcwBuffer = len; return S_OK; @@ -465,7 +467,7 @@ static HRESULT WINAPI IAssemblyNameImpl_IsEqual(IAssemblyName *iface, if (!pName) return S_FALSE; if (flags & ~ASM_CMPF_IL_ALL) FIXME("unsupported flags\n"); - if ((flags & ASM_CMPF_NAME) && strcmpW(name1->name, name2->name)) return S_FALSE; + if ((flags & ASM_CMPF_NAME) && lstrcmpW(name1->name, name2->name)) return S_FALSE; if (name1->versize && name2->versize) { if ((flags & ASM_CMPF_MAJOR_VERSION) && @@ -483,7 +485,7 @@ static HRESULT WINAPI IAssemblyNameImpl_IsEqual(IAssemblyName *iface, if ((flags & ASM_CMPF_CULTURE) && name1->culture && name2->culture && - strcmpW(name1->culture, name2->culture)) return S_FALSE; + lstrcmpW(name1->culture, name2->culture)) return S_FALSE; return S_OK; } @@ -560,10 +562,10 @@ static HRESULT parse_version(IAssemblyNameImpl *name, LPWSTR version) if (!*beg) return S_OK; - end = strchrW(beg, '.'); + end = wcschr(beg, '.'); if (end) *end = '\0'; - name->version[i] = atolW(beg); + name->version[i] = wcstol(beg, NULL, 10); name->versize++; if (!end && i < 3) @@ -700,11 +702,11 @@ static HRESULT parse_display_name(IAssemblyNameImpl *name, LPCWSTR szAssemblyNam goto done; } - ptr = strchrW(str, ','); + ptr = wcschr(str, ','); if (ptr) *ptr = '\0'; /* no ',' but ' ' only */ - if( !ptr && strchrW(str, ' ') ) + if( !ptr && wcschr(str, ' ') ) { hr = FUSION_E_INVALID_NAME; goto done; @@ -723,7 +725,7 @@ static HRESULT parse_display_name(IAssemblyNameImpl *name, LPCWSTR szAssemblyNam str = ptr + 1; while (!done) { - ptr = strchrW(str, '='); + ptr = wcschr(str, '='); if (!ptr) { hr = FUSION_E_INVALID_NAME; @@ -737,9 +739,9 @@ static HRESULT parse_display_name(IAssemblyNameImpl *name, LPCWSTR szAssemblyNam goto done; } - if (!(ptr2 = strchrW(ptr, ','))) + if (!(ptr2 = wcschr(ptr, ','))) { - if (!(ptr2 = strchrW(ptr, '\0'))) + if (!(ptr2 = wcschr(ptr, '\0'))) { hr = FUSION_E_INVALID_NAME; goto done; diff --git a/dll/win32/fusion/assembly.c b/dll/win32/fusion/assembly.c index ec380ef442b..a80a25655a2 100644 --- a/dll/win32/fusion/assembly.c +++ b/dll/win32/fusion/assembly.c @@ -21,11 +21,13 @@ #include <stdarg.h> #include <stdio.h> +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "windef.h" #include "winbase.h" #include "winuser.h" #include "winver.h" -#include "wincrypt.h" +#include "bcrypt.h" #include "dbghelp.h" #include "ole2.h" #include "fusion.h" @@ -33,7 +35,6 @@ #include "fusionpriv.h" #include "wine/debug.h" -#include "wine/unicode.h" #define TableFromToken(tk) (TypeFromToken(tk) >> 24) #define TokenFromTable(idx) (idx << 24) @@ -748,10 +749,10 @@ HRESULT assembly_get_name(ASSEMBLY *assembly, LPWSTR *name) HRESULT assembly_get_path(const ASSEMBLY *assembly, LPWSTR *path) { - WCHAR *cpy = heap_alloc((strlenW(assembly->path) + 1) * sizeof(WCHAR)); + WCHAR *cpy = heap_alloc((lstrlenW(assembly->path) + 1) * sizeof(WCHAR)); *path = cpy; if (cpy) - strcpyW(cpy, assembly->path); + lstrcpyW(cpy, assembly->path); else return E_OUTOFMEMORY; @@ -775,10 +776,10 @@ HRESULT assembly_get_version(ASSEMBLY *assembly, LPWSTR *version) if (!asmtbl) return E_FAIL; - if (!(*version = heap_alloc(sizeof(format) + 4 * strlen("65535") * sizeof(WCHAR)))) + if (!(*version = heap_alloc(24 * sizeof(WCHAR)))) return E_OUTOFMEMORY; - sprintfW(*version, format, asmtbl->MajorVersion, asmtbl->MinorVersion, + swprintf(*version, format, asmtbl->MajorVersion, asmtbl->MinorVersion, asmtbl->BuildNumber, asmtbl->RevisionNumber); return S_OK; @@ -807,9 +808,8 @@ HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token) { ULONG i, size; LONG offset; - BYTE *hashdata, *pubkey, *ptr; - HCRYPTPROV crypt; - HCRYPTHASH hash; + BYTE hashdata[20], *pubkey, *ptr; + BCRYPT_ALG_HANDLE alg; BYTE tokbytes[BYTES_PER_TOKEN]; HRESULT hr = E_FAIL; LPWSTR tok; @@ -833,29 +833,16 @@ HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token) pubkey = assembly_get_blob(assembly, idx, &size); - if (!CryptAcquireContextA(&crypt, NULL, NULL, PROV_RSA_FULL, - CRYPT_VERIFYCONTEXT)) + if (BCryptOpenAlgorithmProvider(&alg, BCRYPT_SHA1_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0) != STATUS_SUCCESS) return E_FAIL; - if (!CryptCreateHash(crypt, CALG_SHA1, 0, 0, &hash)) - return E_FAIL; - - if (!CryptHashData(hash, pubkey, size, 0)) - return E_FAIL; - - size = 0; - if (!CryptGetHashParam(hash, HP_HASHVAL, NULL, &size, 0)) - return E_FAIL; - - if (!(hashdata = heap_alloc(size))) + if (BCryptHash(alg, NULL, 0, pubkey, size, hashdata, sizeof(hashdata)) != STATUS_SUCCESS) { - hr = E_OUTOFMEMORY; + hr = E_FAIL; goto done; } - if (!CryptGetHashParam(hash, HP_HASHVAL, hashdata, &size, 0)) - goto done; - + size = sizeof(hashdata); for (i = size - 1; i >= size - 8; i--) tokbytes[size - i - 1] = hashdata[i]; @@ -871,10 +858,7 @@ HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPWSTR *token) hr = S_OK; done: - heap_free(hashdata); - CryptDestroyHash(hash); - CryptReleaseContext(crypt, 0); - + BCryptCloseAlgorithmProvider(alg, 0); return hr; } diff --git a/dll/win32/fusion/fusion.c b/dll/win32/fusion/fusion.c index a57d7e067c5..802021129af 100644 --- a/dll/win32/fusion/fusion.c +++ b/dll/win32/fusion/fusion.c @@ -19,6 +19,9 @@ */ #include <stdarg.h> +#ifdef __REACTOS__ +#include <wchar.h> +#endif #define COBJMACROS @@ -28,7 +31,6 @@ #include "ole2.h" #include "fusion.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(fusion); @@ -128,7 +130,7 @@ HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath, return E_INVALIDARG; len = GetWindowsDirectoryW(windir, MAX_PATH); - strcpyW(path, windir); + lstrcpyW(path, windir); switch (dwCacheFlags) { @@ -138,14 +140,14 @@ HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath, if (FAILED(hr)) return hr; - len = sprintfW(path, zapfmt, windir, assembly + 1, nativeimg, version); + len = swprintf(path, zapfmt, windir, assembly + 1, nativeimg, version); break; } case ASM_CACHE_GAC: { - strcpyW(path + len, assembly); + lstrcpyW(path + len, assembly); len += ARRAY_SIZE(assembly) - 1; - strcpyW(path + len, gac); + lstrcpyW(path + len, gac); len += ARRAY_SIZE(gac) - 1; break; } @@ -155,13 +157,13 @@ HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath, return E_FAIL; } case ASM_CACHE_ROOT: - strcpyW(path + len, assembly); + lstrcpyW(path + len, assembly); len += ARRAY_SIZE(assembly) - 1; break; case ASM_CACHE_ROOT_EX: - strcpyW(path + len, dotnet); + lstrcpyW(path + len, dotnet); len += ARRAY_SIZE(dotnet) - 1; - strcpyW(path + len, assembly); + lstrcpyW(path + len, assembly); len += ARRAY_SIZE(assembly) - 1; break; default: @@ -172,7 +174,7 @@ HRESULT WINAPI GetCachePath(ASM_CACHE_FLAGS dwCacheFlags, LPWSTR pwzCachePath, if (*pcchPath <= len || !pwzCachePath) hr = E_NOT_SUFFICIENT_BUFFER; else if (pwzCachePath) - strcpyW(pwzCachePath, path); + lstrcpyW(pwzCachePath, path); *pcchPath = len; return hr; diff --git a/dll/win32/fusion/fusion_1_1/CMakeLists.txt b/dll/win32/fusion/fusion_1_1/CMakeLists.txt index 802fecf8c34..7a36802d264 100644 --- a/dll/win32/fusion/fusion_1_1/CMakeLists.txt +++ b/dll/win32/fusion/fusion_1_1/CMakeLists.txt @@ -9,5 +9,5 @@ add_library(fusion_1_1 MODULE set_module_type(fusion_1_1 win32dll) target_link_libraries(fusion_1_1 fusion_common uuid wine) set_target_properties(fusion_1_1 PROPERTIES OUTPUT_NAME "fusion" PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") -add_importlibs(fusion_1_1 advapi32 dbghelp shlwapi user32 msvcrt kernel32 ntdll) +add_importlibs(fusion_1_1 bcrypt advapi32 dbghelp shlwapi user32 msvcrt kernel32 ntdll) add_cd_file(TARGET fusion_1_1 DESTINATION
reactos/Microsoft.NET/Framework/v1.1.4322
FOR all) diff --git a/dll/win32/fusion/fusion_2_0/CMakeLists.txt b/dll/win32/fusion/fusion_2_0/CMakeLists.txt index 035da8ed61c..b91372f9fa7 100644 --- a/dll/win32/fusion/fusion_2_0/CMakeLists.txt +++ b/dll/win32/fusion/fusion_2_0/CMakeLists.txt @@ -9,5 +9,5 @@ add_library(fusion_2_0 MODULE set_module_type(fusion_2_0 win32dll) target_link_libraries(fusion_2_0 fusion_common uuid wine) set_target_properties(fusion_2_0 PROPERTIES OUTPUT_NAME "fusion" PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") -add_importlibs(fusion_2_0 advapi32 dbghelp shlwapi user32 msvcrt kernel32 ntdll) +add_importlibs(fusion_2_0 bcrypt advapi32 dbghelp shlwapi user32 msvcrt kernel32 ntdll) add_cd_file(TARGET fusion_2_0 DESTINATION
reactos/Microsoft.NET/Framework/v2.0.50727
FOR all) diff --git a/dll/win32/fusion/fusionpriv.h b/dll/win32/fusion/fusionpriv.h index 24c932d156c..ea5953a6a79 100644 --- a/dll/win32/fusion/fusionpriv.h +++ b/dll/win32/fusion/fusionpriv.h @@ -23,6 +23,9 @@ #include <stdarg.h> +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "windef.h" #include "windef.h" #include "winbase.h" #include "winuser.h" diff --git a/dll/win32/fusion/precomp.h b/dll/win32/fusion/precomp.h index de2c9a84b0d..5a1353f3877 100644 --- a/dll/win32/fusion/precomp.h +++ b/dll/win32/fusion/precomp.h @@ -2,7 +2,6 @@ #ifndef _WINE_FUSION_PRECOMP_H_ #define _WINE_FUSION_PRECOMP_H_ -#define WIN32_NO_STATUS #define _INC_WINDOWS #define COM_NO_WINDOWS_H diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 343cfdc7633..fdc5b31dc7f 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -68,7 +68,7 @@ dll/win32/dbghelp # Synced to WineStaging-3.9 dll/win32/dciman32 # Synced to WineStaging-3.3 dll/win32/faultrep # Synced to WineStaging-4.18 dll/win32/fontsub # Synced to WineStaging-2.9 -dll/win32/fusion # Synced to WineStaging-3.17 +dll/win32/fusion # Synced to WineStaging-4.18 dll/win32/gdiplus # Synced to WineStaging-4.0 dll/win32/hhctrl.ocx # Synced to WineStaging-4.0 dll/win32/hlink # Synced to WineStaging-4.0
5 years
1
0
0
0
[reactos] 01/01: [FAULTREP] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=683b9f8f983aa1e537cb7…
commit 683b9f8f983aa1e537cb755add84f16105ac62f7 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Oct 26 22:55:45 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Oct 26 22:55:45 2019 +0100 [FAULTREP] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/faultrep/faultrep.c | 3 +-- media/doc/README.WINE | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dll/win32/faultrep/faultrep.c b/dll/win32/faultrep/faultrep.c index 83f9027967d..3191659cd6c 100644 --- a/dll/win32/faultrep/faultrep.c +++ b/dll/win32/faultrep/faultrep.c @@ -24,7 +24,6 @@ #include "winnls.h" #include "winreg.h" #include "wine/debug.h" -#include "wine/unicode.h" #include "errorrep.h" @@ -62,7 +61,7 @@ BOOL WINAPI AddERExcludedApplicationW(LPCWSTR lpAppFileName) LONG res; TRACE("(%s)\n", wine_dbgstr_w(lpAppFileName)); - bslash = strrchrW(lpAppFileName, '\\'); + bslash = wcsrchr(lpAppFileName, '\\'); if (bslash != NULL) lpAppFileName = bslash + 1; if (*lpAppFileName == '\0') diff --git a/media/doc/README.WINE b/media/doc/README.WINE index c46f8b29eb1..343cfdc7633 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -66,7 +66,7 @@ dll/win32/cryptnet # Synced to WineStaging-4.18 dll/win32/cryptui # Synced to WineStaging-4.18 dll/win32/dbghelp # Synced to WineStaging-3.9 dll/win32/dciman32 # Synced to WineStaging-3.3 -dll/win32/faultrep # Synced to WineStaging-2.9 +dll/win32/faultrep # Synced to WineStaging-4.18 dll/win32/fontsub # Synced to WineStaging-2.9 dll/win32/fusion # Synced to WineStaging-3.17 dll/win32/gdiplus # Synced to WineStaging-4.0
5 years
1
0
0
0
[reactos] 01/01: [CRYPTUI] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b81745a3a07b7bf829514…
commit b81745a3a07b7bf829514ecf54fef007b0dab77f Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Oct 26 22:55:21 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Oct 26 22:55:21 2019 +0100 [CRYPTUI] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/cryptui/main.c | 117 ++++++++++++++++++++++++++--------------------- media/doc/README.WINE | 2 +- 2 files changed, 65 insertions(+), 54 deletions(-) diff --git a/dll/win32/cryptui/main.c b/dll/win32/cryptui/main.c index 41938f5177b..3d27d82e64f 100644 --- a/dll/win32/cryptui/main.c +++ b/dll/win32/cryptui/main.c @@ -16,9 +16,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include <stdarg.h> +#include <wchar.h> #define COBJMACROS #define NONAMELESSUNION @@ -40,7 +39,6 @@ #include "hlink.h" #include "winreg.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(cryptui); @@ -895,11 +893,11 @@ static void get_cert_usages(PCCERT_CONTEXT cert, LPWSTR *str) CRYPT_ENHKEY_USAGE_OID_GROUP_ID); if (info) - len += strlenW(info->pwszName); + len += lstrlenW(info->pwszName); else len += strlen(usage->rgpszUsageIdentifier[i]); if (i < usage->cUsageIdentifier - 1) - len += strlenW(commaSpace); + len += lstrlenW(commaSpace); } *str = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); if (*str) @@ -913,8 +911,8 @@ static void get_cert_usages(PCCERT_CONTEXT cert, LPWSTR *str) if (info) { - strcpyW(ptr, info->pwszName); - ptr += strlenW(info->pwszName); + lstrcpyW(ptr, info->pwszName); + ptr += lstrlenW(info->pwszName); } else { @@ -926,8 +924,8 @@ static void get_cert_usages(PCCERT_CONTEXT cert, LPWSTR *str) } if (i < usage->cUsageIdentifier - 1) { - strcpyW(ptr, commaSpace); - ptr += strlenW(commaSpace); + lstrcpyW(ptr, commaSpace); + ptr += lstrlenW(commaSpace); } } *ptr = 0; @@ -1087,7 +1085,7 @@ static int cert_mgr_sort_by_text(HWND lv, int col, int index1, int index2) item.pszText = buf2; item.iItem = index2; SendMessageW(lv, LVM_GETITEMW, 0, (LPARAM)&item); - return strcmpW(buf1, buf2); + return lstrcmpW(buf1, buf2); } static int CALLBACK cert_mgr_sort_by_subject(LPARAM lp1, LPARAM lp2, LPARAM lp) @@ -1389,12 +1387,12 @@ static BOOL WINAPI enum_store_callback(const void *pvSystemStore, { storeInfo->type = SystemStore; storeInfo->u.name = HeapAlloc(GetProcessHeap(), 0, - (strlenW(pvSystemStore) + 1) * sizeof(WCHAR)); + (lstrlenW(pvSystemStore) + 1) * sizeof(WCHAR)); if (storeInfo->u.name) { tvis.u.item.mask |= TVIF_PARAM; tvis.u.item.lParam = (LPARAM)storeInfo; - strcpyW(storeInfo->u.name, pvSystemStore); + lstrcpyW(storeInfo->u.name, pvSystemStore); } else { @@ -1994,7 +1992,7 @@ static void add_local_oid_text_to_control(HWND text, LPCSTR oid) len = LoadStringW(hInstance, entry->id, (LPWSTR)&str, 0); ptr = str; do { - if ((linebreak = memchrW(ptr, '\n', len))) + if ((linebreak = wmemchr(ptr, '\n', len))) { WCHAR copy[MAX_STRING_LEN]; @@ -2247,9 +2245,9 @@ static WCHAR *get_user_notice_from_qualifier(const CRYPT_OBJID_BLOB *qualifier) &qualifierValue, &size)) { str = HeapAlloc(GetProcessHeap(), 0, - (strlenW(qualifierValue->pszDisplayText) + 1) * sizeof(WCHAR)); + (lstrlenW(qualifierValue->pszDisplayText) + 1) * sizeof(WCHAR)); if (str) - strcpyW(str, qualifierValue->pszDisplayText); + lstrcpyW(str, qualifierValue->pszDisplayText); LocalFree(qualifierValue); } return str; @@ -2459,7 +2457,7 @@ static LRESULT CALLBACK user_notice_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, text = GetDlgItem(hwnd, IDC_USERNOTICE); issuerStatement = (struct IssuerStatement *)lp; add_unformatted_text_to_control(text, issuerStatement->userNotice, - strlenW(issuerStatement->userNotice)); + lstrlenW(issuerStatement->userNotice)); if (issuerStatement->cps) SetWindowLongPtrW(hwnd, DWLP_USER, (LPARAM)issuerStatement->cps); else @@ -2588,7 +2586,7 @@ static WCHAR *field_format_version(PCCERT_CONTEXT cert) WCHAR *buf = HeapAlloc(GetProcessHeap(), 0, 12 * sizeof(WCHAR)); if (buf) - sprintfW(buf, fmt, cert->pCertInfo->dwVersion); + swprintf(buf, fmt, cert->pCertInfo->dwVersion); return buf; } @@ -2603,7 +2601,7 @@ static WCHAR *format_hex_string(void *pb, DWORD cb) WCHAR *ptr; for (i = 0, ptr = buf; i < cb; i++, ptr += 3) - sprintfW(ptr, fmt, ((BYTE *)pb)[i]); + swprintf(ptr, fmt, ((BYTE *)pb)[i]); } return buf; } @@ -2706,7 +2704,7 @@ static WCHAR *field_format_public_key(PCCERT_CONTEXT cert) * good idea, but as this isn't a sentence fragment, it shouldn't * be word-order dependent. */ - len = strlenW(fmt) + strlenW(oidInfo->pwszName) + + len = lstrlenW(fmt) + lstrlenW(oidInfo->pwszName) + cert->pCertInfo->SubjectPublicKeyInfo.PublicKey.cbData * 8; buf = HeapAlloc(GetProcessHeap(), 0, len * sizeof(*buf)); if (buf) @@ -2898,7 +2896,7 @@ static WCHAR *field_format_extension_hex_with_ascii(const CERT_EXTENSION *ext) { /* Output as hex bytes first */ for (j = i; j < min(i + 8, ext->Value.cbData); j++, ptr += 3) - sprintfW(ptr, fmt, ext->Value.pbData[j]); + swprintf(ptr, fmt, ext->Value.pbData[j]); /* Pad the hex output with spaces for alignment */ if (j == ext->Value.cbData && j % 8) { @@ -2907,15 +2905,15 @@ static WCHAR *field_format_extension_hex_with_ascii(const CERT_EXTENSION *ext) for (; j % 8; j++, ptr += ARRAY_SIZE(pad)) memcpy(ptr, pad, sizeof(pad)); } - /* The last sprintfW included a space, so just insert one + /* The last swprintf included a space, so just insert one * more space between the hex bytes and the ASCII output */ *ptr++ = ' '; /* Output as ASCII bytes */ for (j = i; j < min(i + 8, ext->Value.cbData); j++, ptr++) { - if (isprintW(ext->Value.pbData[j]) && - !isspaceW(ext->Value.pbData[j])) + if (iswprint(ext->Value.pbData[j]) && + !iswspace(ext->Value.pbData[j])) *ptr = ext->Value.pbData[j]; else *ptr = '.'; @@ -3502,7 +3500,7 @@ static void set_cert_string_property(PCCERT_CONTEXT cert, DWORD prop, CRYPT_DATA_BLOB blob; blob.pbData = (BYTE *)str; - blob.cbData = (strlenW(str) + 1) * sizeof(WCHAR); + blob.cbData = (lstrlenW(str) + 1) * sizeof(WCHAR); CertSetCertificateContextProperty(cert, prop, 0, &blob); } else @@ -3836,7 +3834,7 @@ static LRESULT CALLBACK detail_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, */ SendMessageW(valueCtl, EM_SETSEL, 0, -1); add_unformatted_text_to_control(valueCtl, val, - val ? strlenW(val) : 0); + val ? lstrlenW(val) : 0); if (val != buf) HeapFree(GetProcessHeap(), 0, val); } @@ -4931,7 +4929,7 @@ static WCHAR *make_import_file_filter(DWORD dwFlags) (dwFlags & import_filters[i].allowFlags)) { len = LoadStringW(hInstance, import_filters[i].id, (LPWSTR)&str, 0); - totalLen += len + strlenW(import_filters[i].filter) + 2; + totalLen += len + lstrlenW(import_filters[i].filter) + 2; } } filter = HeapAlloc(GetProcessHeap(), 0, totalLen * sizeof(WCHAR)); @@ -4950,8 +4948,8 @@ static WCHAR *make_import_file_filter(DWORD dwFlags) memcpy(ptr, str, len * sizeof(WCHAR)); ptr += len; *ptr++ = 0; - strcpyW(ptr, import_filters[i].filter); - ptr += strlenW(import_filters[i].filter) + 1; + lstrcpyW(ptr, import_filters[i].filter); + ptr += lstrlenW(import_filters[i].filter) + 1; } } *ptr++ = 0; @@ -5010,19 +5008,19 @@ static BOOL import_validate_filename(HWND hwnd, struct ImportWizData *data, FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, (LPWSTR) &msgBuf, 0, NULL); fullError = HeapAlloc(GetProcessHeap(), 0, - (strlenW(error) + strlenW(fileName) + strlenW(msgBuf) + 3) + (lstrlenW(error) + lstrlenW(fileName) + lstrlenW(msgBuf) + 3) * sizeof(WCHAR)); if (fullError) { LPWSTR ptr = fullError; - strcpyW(ptr, error); - ptr += strlenW(error); - strcpyW(ptr, fileName); - ptr += strlenW(fileName); + lstrcpyW(ptr, error); + ptr += lstrlenW(error); + lstrcpyW(ptr, fileName); + ptr += lstrlenW(fileName); *ptr++ = ':'; *ptr++ = '\n'; - strcpyW(ptr, msgBuf); + lstrcpyW(ptr, msgBuf); MessageBoxW(hwnd, fullError, pTitle, MB_ICONERROR | MB_OK); HeapFree(GetProcessHeap(), 0, fullError); } @@ -5994,7 +5992,7 @@ static LRESULT CALLBACK export_password_dlg_proc(HWND hwnd, UINT msg, (LPARAM)password); SendMessageW(passwordConfirmEdit, WM_GETTEXT, passwordConfirmLen + 1, (LPARAM)passwordConfirm); - if (strcmpW(password, passwordConfirm)) + if (lstrcmpW(password, passwordConfirm)) { export_password_mismatch(hwnd, data); SetWindowLongPtrW(hwnd, DWLP_MSGRESULT, 1); @@ -6057,17 +6055,17 @@ static LPWSTR export_append_extension(const struct ExportWizData *data, extension = cer; } } - dot = strrchrW(fileName, '.'); + dot = wcsrchr(fileName, '.'); if (dot) - appendExtension = strcmpiW(dot, extension) != 0; + appendExtension = wcsicmp(dot, extension) != 0; else appendExtension = TRUE; if (appendExtension) { fileName = HeapReAlloc(GetProcessHeap(), 0, fileName, - (strlenW(fileName) + strlenW(extension) + 1) * sizeof(WCHAR)); + (lstrlenW(fileName) + lstrlenW(extension) + 1) * sizeof(WCHAR)); if (fileName) - strcatW(fileName, extension); + lstrcatW(fileName, extension); } return fileName; } @@ -6128,19 +6126,19 @@ static BOOL export_validate_filename(HWND hwnd, struct ExportWizData *data, FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, (LPWSTR) &msgBuf, 0, NULL); fullError = HeapAlloc(GetProcessHeap(), 0, - (strlenW(error) + strlenW(fileName) + strlenW(msgBuf) + 3) + (lstrlenW(error) + lstrlenW(fileName) + lstrlenW(msgBuf) + 3) * sizeof(WCHAR)); if (fullError) { LPWSTR ptr = fullError; - strcpyW(ptr, error); - ptr += strlenW(error); - strcpyW(ptr, fileName); - ptr += strlenW(fileName); + lstrcpyW(ptr, error); + ptr += lstrlenW(error); + lstrcpyW(ptr, fileName); + ptr += lstrlenW(fileName); *ptr++ = ':'; *ptr++ = '\n'; - strcpyW(ptr, msgBuf); + lstrcpyW(ptr, msgBuf); MessageBoxW(hwnd, fullError, pTitle, MB_ICONERROR | MB_OK); HeapFree(GetProcessHeap(), 0, fullError); } @@ -6199,9 +6197,9 @@ static WCHAR *make_export_file_filter(DWORD exportFormat, DWORD subjectChoice) } } baseLen = LoadStringW(hInstance, baseID, (LPWSTR)&baseFilter, 0); - totalLen += baseLen + strlenW(filterStr) + 2; + totalLen += baseLen + lstrlenW(filterStr) + 2; allLen = LoadStringW(hInstance, IDS_IMPORT_FILTER_ALL, (LPWSTR)&all, 0); - totalLen += allLen + strlenW(filter_all) + 2; + totalLen += allLen + lstrlenW(filter_all) + 2; filter = HeapAlloc(GetProcessHeap(), 0, totalLen * sizeof(WCHAR)); if (filter) { @@ -6211,13 +6209,13 @@ static WCHAR *make_export_file_filter(DWORD exportFormat, DWORD subjectChoice) memcpy(ptr, baseFilter, baseLen * sizeof(WCHAR)); ptr += baseLen; *ptr++ = 0; - strcpyW(ptr, filterStr); - ptr += strlenW(filterStr) + 1; + lstrcpyW(ptr, filterStr); + ptr += lstrlenW(filterStr) + 1; memcpy(ptr, all, allLen * sizeof(WCHAR)); ptr += allLen; *ptr++ = 0; - strcpyW(ptr, filter_all); - ptr += strlenW(filter_all) + 1; + lstrcpyW(ptr, filter_all); + ptr += lstrlenW(filter_all) + 1; *ptr++ = 0; } return filter; @@ -7550,8 +7548,21 @@ PCCERT_CONTEXT WINAPI CryptUIDlgSelectCertificateFromStore(HCERTSTORE hCertStore LPCWSTR pwszDisplayString, DWORD dwDontUseColumn, DWORD dwFlags, void *pvReserved) { - FIXME("%p %p %s %s %d %d %p: stub\n", hCertStore, hwnd, debugstr_w(pwszTitle), debugstr_w(pwszDisplayString), dwDontUseColumn, dwFlags, pvReserved); - return NULL; + CRYPTUI_SELECTCERTIFICATE_STRUCTW sc; + + TRACE("%p %p %s %s %x %x %p\n", hCertStore, hwnd, debugstr_w(pwszTitle), debugstr_w(pwszDisplayString), dwDontUseColumn, dwFlags, pvReserved); + + memset(&sc, 0, sizeof(sc)); + + sc.dwSize = sizeof(sc); + sc.hwndParent = hwnd; + sc.dwFlags = dwFlags; + sc.szTitle = pwszTitle; + sc.szDisplayString = pwszDisplayString; + sc.dwDontUseColumn = dwDontUseColumn; + sc.cDisplayStores = 1; + sc.rghDisplayStores = &hCertStore; + return CryptUIDlgSelectCertificateW(&sc); } BOOL WINAPI CryptUIWizDigitalSign(DWORD flags, HWND parent, LPCWSTR title, PCCRYPTUI_WIZ_DIGITAL_SIGN_INFO info, diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 806eb9aec5d..c46f8b29eb1 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -63,7 +63,7 @@ dll/win32/crypt32 # Synced to WineStaging-4.0 dll/win32/cryptdlg # Synced to WineStaging-4.18 dll/win32/cryptdll # Synced to WineStaging-4.18 dll/win32/cryptnet # Synced to WineStaging-4.18 -dll/win32/cryptui # Synced to WineStaging-4.0 +dll/win32/cryptui # Synced to WineStaging-4.18 dll/win32/dbghelp # Synced to WineStaging-3.9 dll/win32/dciman32 # Synced to WineStaging-3.3 dll/win32/faultrep # Synced to WineStaging-2.9
5 years
1
0
0
0
[reactos] 01/01: [CRYPTNET_WINETEST] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2e19c82751636fcb89bfd…
commit 2e19c82751636fcb89bfd5ced534a8a8a35cf366 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Oct 26 22:54:56 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Oct 26 22:54:56 2019 +0100 [CRYPTNET_WINETEST] Sync with Wine Staging 4.18. CORE-16441 --- modules/rostests/winetests/cryptnet/cryptnet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rostests/winetests/cryptnet/cryptnet.c b/modules/rostests/winetests/cryptnet/cryptnet.c index 8600fda645d..0b017604c04 100644 --- a/modules/rostests/winetests/cryptnet/cryptnet.c +++ b/modules/rostests/winetests/cryptnet/cryptnet.c @@ -316,7 +316,7 @@ static void make_tmp_file(LPSTR path) static void test_retrieveObjectByUrl(void) { BOOL ret; - char tmpfile[MAX_PATH * 2], url[MAX_PATH + 8]; + char tmpfile[MAX_PATH], url[MAX_PATH + 8]; CRYPT_BLOB_ARRAY *pBlobArray; PCCERT_CONTEXT cert; PCCRL_CONTEXT crl; @@ -332,7 +332,7 @@ static void test_retrieveObjectByUrl(void) GetLastError(), GetLastError()); make_tmp_file(tmpfile); - snprintf(url, sizeof(url), "file://%s", tmpfile); + sprintf(url, "file://%s", tmpfile); pBlobArray = (CRYPT_BLOB_ARRAY *)0xdeadbeef; ret = CryptRetrieveObjectByUrlA(url, NULL, 0, 0, (void **)&pBlobArray,
5 years
1
0
0
0
[reactos] 01/01: [CRYPTNET] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f4663f8ef0b025ed65320…
commit f4663f8ef0b025ed65320ae2f1a8e67f81898895 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Oct 26 22:54:32 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Oct 26 22:54:32 2019 +0100 [CRYPTNET] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/cryptnet/cryptnet_main.c | 3 --- media/doc/README.WINE | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/dll/win32/cryptnet/cryptnet_main.c b/dll/win32/cryptnet/cryptnet_main.c index be38ca35b3f..380605a20db 100644 --- a/dll/win32/cryptnet/cryptnet_main.c +++ b/dll/win32/cryptnet/cryptnet_main.c @@ -18,9 +18,6 @@ * */ -#include "config.h" -#include "wine/port.h" - #define NONAMELESSUNION #define CERT_REVOCATION_PARA_HAS_EXTRA_FIELDS diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 4e0426d8f32..806eb9aec5d 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -62,7 +62,7 @@ dll/win32/credui # Synced to WineStaging-4.18 dll/win32/crypt32 # Synced to WineStaging-4.0 dll/win32/cryptdlg # Synced to WineStaging-4.18 dll/win32/cryptdll # Synced to WineStaging-4.18 -dll/win32/cryptnet # Synced to WineStaging-3.3 +dll/win32/cryptnet # Synced to WineStaging-4.18 dll/win32/cryptui # Synced to WineStaging-4.0 dll/win32/dbghelp # Synced to WineStaging-3.9 dll/win32/dciman32 # Synced to WineStaging-3.3
5 years
1
0
0
0
[reactos] 01/01: [CRYPTDLL] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e6e75f1cb3c5ab7ebe2e3…
commit e6e75f1cb3c5ab7ebe2e38db19915798d864bef5 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Oct 26 22:54:07 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Oct 26 22:54:07 2019 +0100 [CRYPTDLL] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/cryptdll/cryptdll.c | 1 - media/doc/README.WINE | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dll/win32/cryptdll/cryptdll.c b/dll/win32/cryptdll/cryptdll.c index 1146a6d1ee1..963a2684e08 100644 --- a/dll/win32/cryptdll/cryptdll.c +++ b/dll/win32/cryptdll/cryptdll.c @@ -16,7 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" #include <stdarg.h> #include <stdlib.h> #include "windef.h" diff --git a/media/doc/README.WINE b/media/doc/README.WINE index b02af3fd117..4e0426d8f32 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -61,7 +61,7 @@ dll/win32/compstui # Synced to WineStaging-4.18 dll/win32/credui # Synced to WineStaging-4.18 dll/win32/crypt32 # Synced to WineStaging-4.0 dll/win32/cryptdlg # Synced to WineStaging-4.18 -dll/win32/cryptdll # Synced to WineStaging-3.3 +dll/win32/cryptdll # Synced to WineStaging-4.18 dll/win32/cryptnet # Synced to WineStaging-3.3 dll/win32/cryptui # Synced to WineStaging-4.0 dll/win32/dbghelp # Synced to WineStaging-3.9
5 years
1
0
0
0
[reactos] 01/01: [CRYPTDLG] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2fdfd36ca507268a0b93f…
commit 2fdfd36ca507268a0b93fb3df8cb1f5adba73497 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Oct 26 22:53:42 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Oct 26 22:53:42 2019 +0100 [CRYPTDLG] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/cryptdlg/main.c | 188 +++++++++++++++++++++++----------------------- media/doc/README.WINE | 2 +- 2 files changed, 95 insertions(+), 95 deletions(-) diff --git a/dll/win32/cryptdlg/main.c b/dll/win32/cryptdlg/main.c index e3eaec1e19f..5a3e6bf418f 100644 --- a/dll/win32/cryptdlg/main.c +++ b/dll/win32/cryptdlg/main.c @@ -18,9 +18,10 @@ #define NONAMELESSUNION -#include "config.h" - #include <stdarg.h> +#ifdef __REACTOS__ +#include <wchar.h> +#endif #include "windef.h" #include "winbase.h" @@ -33,7 +34,6 @@ #include "cryptdlg.h" #include "cryptuiapi.h" #include "cryptres.h" -#include "wine/unicode.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(cryptdlg); @@ -501,9 +501,9 @@ static BOOL CRYPT_FormatHexString(const BYTE *pbEncoded, DWORD cbEncoded, for (i = 0; i < cbEncoded; i++) { if (i < cbEncoded - 1) - ptr += sprintfW(ptr, fmt, pbEncoded[i]); + ptr += swprintf(ptr, fmt, pbEncoded[i]); else - ptr += sprintfW(ptr, endFmt, pbEncoded[i]); + ptr += swprintf(ptr, endFmt, pbEncoded[i]); } } else @@ -538,31 +538,31 @@ static BOOL CRYPT_FormatCPS(DWORD dwCertEncodingType, else sep = commaSep; - sepLen = strlenW(sep); + sepLen = lstrlenW(sep); if (dwFormatStrType & CRYPT_FORMAT_STR_MULTI_LINE) { - charsNeeded += 3 * strlenW(indent); + charsNeeded += 3 * lstrlenW(indent); if (str && *pcchStr >= charsNeeded) { - strcpyW(str, indent); - str += strlenW(indent); - strcpyW(str, indent); - str += strlenW(indent); - strcpyW(str, indent); - str += strlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); } } charsNeeded += cpsValue->Value.cbData / sizeof(WCHAR); if (str && *pcchStr >= charsNeeded) { - strcpyW(str, (LPWSTR)cpsValue->Value.pbData); + lstrcpyW(str, (LPWSTR)cpsValue->Value.pbData); str += cpsValue->Value.cbData / sizeof(WCHAR); } charsNeeded += sepLen; if (str && *pcchStr >= charsNeeded) { - strcpyW(str, sep); + lstrcpyW(str, sep); str += sepLen; } LocalFree(cpsValue); @@ -619,8 +619,8 @@ static BOOL CRYPT_FormatUserNotice(DWORD dwCertEncodingType, headingSep = colonSpace; sep = commaSep; } - sepLen = strlenW(sep); - headingSepLen = strlenW(headingSep); + sepLen = lstrlenW(sep); + headingSepLen = lstrlenW(headingSep); if (pNoticeRef) { @@ -629,15 +629,15 @@ static BOOL CRYPT_FormatUserNotice(DWORD dwCertEncodingType, if (dwFormatStrType & CRYPT_FORMAT_STR_MULTI_LINE) { - charsNeeded += 3 * strlenW(indent); + charsNeeded += 3 * lstrlenW(indent); if (str && *pcchStr >= charsNeeded) { - strcpyW(str, indent); - str += strlenW(indent); - strcpyW(str, indent); - str += strlenW(indent); - strcpyW(str, indent); - str += strlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); } } charsNeeded += noticeRefLen; @@ -649,22 +649,22 @@ static BOOL CRYPT_FormatUserNotice(DWORD dwCertEncodingType, charsNeeded += headingSepLen; if (str && *pcchStr >= charsNeeded) { - strcpyW(str, headingSep); + lstrcpyW(str, headingSep); str += headingSepLen; } if (dwFormatStrType & CRYPT_FORMAT_STR_MULTI_LINE) { - charsNeeded += 4 * strlenW(indent); + charsNeeded += 4 * lstrlenW(indent); if (str && *pcchStr >= charsNeeded) { - strcpyW(str, indent); - str += strlenW(indent); - strcpyW(str, indent); - str += strlenW(indent); - strcpyW(str, indent); - str += strlenW(indent); - strcpyW(str, indent); - str += strlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); } } charsNeeded += organizationLen; @@ -681,24 +681,24 @@ static BOOL CRYPT_FormatUserNotice(DWORD dwCertEncodingType, charsNeeded += sepLen; if (str && *pcchStr >= charsNeeded) { - strcpyW(str, sep); + lstrcpyW(str, sep); str += sepLen; } for (k = 0; k < pNoticeRef->cNoticeNumbers; k++) { if (dwFormatStrType & CRYPT_FORMAT_STR_MULTI_LINE) { - charsNeeded += 4 * strlenW(indent); + charsNeeded += 4 * lstrlenW(indent); if (str && *pcchStr >= charsNeeded) { - strcpyW(str, indent); - str += strlenW(indent); - strcpyW(str, indent); - str += strlenW(indent); - strcpyW(str, indent); - str += strlenW(indent); - strcpyW(str, indent); - str += strlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); } } charsNeeded += noticeNumLen; @@ -707,17 +707,17 @@ static BOOL CRYPT_FormatUserNotice(DWORD dwCertEncodingType, memcpy(str, noticeNum, noticeNumLen * sizeof(WCHAR)); str += noticeNumLen; } - sprintfW(noticeNumStr, numFmt, k + 1); - charsNeeded += strlenW(noticeNumStr); + swprintf(noticeNumStr, numFmt, k + 1); + charsNeeded += lstrlenW(noticeNumStr); if (str && *pcchStr >= charsNeeded) { - strcpyW(str, noticeNumStr); - str += strlenW(noticeNumStr); + lstrcpyW(str, noticeNumStr); + str += lstrlenW(noticeNumStr); } charsNeeded += sepLen; if (str && *pcchStr >= charsNeeded) { - strcpyW(str, sep); + lstrcpyW(str, sep); str += sepLen; } } @@ -726,15 +726,15 @@ static BOOL CRYPT_FormatUserNotice(DWORD dwCertEncodingType, { if (dwFormatStrType & CRYPT_FORMAT_STR_MULTI_LINE) { - charsNeeded += 3 * strlenW(indent); + charsNeeded += 3 * lstrlenW(indent); if (str && *pcchStr >= charsNeeded) { - strcpyW(str, indent); - str += strlenW(indent); - strcpyW(str, indent); - str += strlenW(indent); - strcpyW(str, indent); - str += strlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); } } charsNeeded += noticeTextLen; @@ -743,16 +743,16 @@ static BOOL CRYPT_FormatUserNotice(DWORD dwCertEncodingType, memcpy(str, noticeText, noticeTextLen * sizeof(WCHAR)); str += noticeTextLen; } - charsNeeded += strlenW(notice->pszDisplayText); + charsNeeded += lstrlenW(notice->pszDisplayText); if (str && *pcchStr >= charsNeeded) { - strcpyW(str, notice->pszDisplayText); - str += strlenW(notice->pszDisplayText); + lstrcpyW(str, notice->pszDisplayText); + str += lstrlenW(notice->pszDisplayText); } charsNeeded += sepLen; if (str && *pcchStr >= charsNeeded) { - strcpyW(str, sep); + lstrcpyW(str, sep); str += sepLen; } } @@ -826,8 +826,8 @@ BOOL WINAPI FormatVerisignExtension(DWORD dwCertEncodingType, headingSep = colonSpace; sep = commaSep; } - sepLen = strlenW(sep); - headingSepLen = strlenW(headingSep); + sepLen = lstrlenW(sep); + headingSepLen = lstrlenW(headingSep); for (i = 0; ret && i < policies->cPolicyInfo; i++) { @@ -838,12 +838,12 @@ BOOL WINAPI FormatVerisignExtension(DWORD dwCertEncodingType, charsNeeded += 1; /* '['*/ if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) *str++ = '['; - sprintfW(policyNum, numFmt, i + 1); - charsNeeded += strlenW(policyNum); + swprintf(policyNum, numFmt, i + 1); + charsNeeded += lstrlenW(policyNum); if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) { - strcpyW(str, policyNum); - str += strlenW(policyNum); + lstrcpyW(str, policyNum); + str += lstrlenW(policyNum); } charsNeeded += 1; /* ']'*/ if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) @@ -857,16 +857,16 @@ BOOL WINAPI FormatVerisignExtension(DWORD dwCertEncodingType, charsNeeded += headingSepLen; if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) { - strcpyW(str, headingSep); + lstrcpyW(str, headingSep); str += headingSepLen; } if (dwFormatStrType & CRYPT_FORMAT_STR_MULTI_LINE) { - charsNeeded += strlenW(indent); + charsNeeded += lstrlenW(indent); if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) { - strcpyW(str, indent); - str += strlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); } } charsNeeded += policyIdLen; @@ -885,7 +885,7 @@ BOOL WINAPI FormatVerisignExtension(DWORD dwCertEncodingType, charsNeeded += sepLen; if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) { - strcpyW(str, sep); + lstrcpyW(str, sep); str += sepLen; } for (j = 0; j < policy->cPolicyQualifier; j++) @@ -896,31 +896,31 @@ BOOL WINAPI FormatVerisignExtension(DWORD dwCertEncodingType, if (dwFormatStrType & CRYPT_FORMAT_STR_MULTI_LINE) { - charsNeeded += strlenW(indent); + charsNeeded += lstrlenW(indent); if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) { - strcpyW(str, indent); - str += strlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); } } charsNeeded += 1; /* '['*/ if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) *str++ = '['; - charsNeeded += strlenW(policyNum); + charsNeeded += lstrlenW(policyNum); if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) { - strcpyW(str, policyNum); - str += strlenW(policyNum); + lstrcpyW(str, policyNum); + str += lstrlenW(policyNum); } charsNeeded += 1; /* ','*/ if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) *str++ = ','; - sprintfW(policyQualifierNum, numFmt, j + 1); - charsNeeded += strlenW(policyQualifierNum); + swprintf(policyQualifierNum, numFmt, j + 1); + charsNeeded += lstrlenW(policyQualifierNum); if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) { - strcpyW(str, policyQualifierNum); - str += strlenW(policyQualifierNum); + lstrcpyW(str, policyQualifierNum); + str += lstrlenW(policyQualifierNum); } charsNeeded += 1; /* ']'*/ if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) @@ -935,18 +935,18 @@ BOOL WINAPI FormatVerisignExtension(DWORD dwCertEncodingType, charsNeeded += headingSepLen; if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) { - strcpyW(str, headingSep); + lstrcpyW(str, headingSep); str += headingSepLen; } if (dwFormatStrType & CRYPT_FORMAT_STR_MULTI_LINE) { - charsNeeded += 2 * strlenW(indent); + charsNeeded += 2 * lstrlenW(indent); if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) { - strcpyW(str, indent); - str += strlenW(indent); - strcpyW(str, indent); - str += strlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); } } charsNeeded += policyQualifierIdLen; @@ -989,18 +989,18 @@ BOOL WINAPI FormatVerisignExtension(DWORD dwCertEncodingType, charsNeeded += sepLen; if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) { - strcpyW(str, sep); + lstrcpyW(str, sep); str += sepLen; } if (dwFormatStrType & CRYPT_FORMAT_STR_MULTI_LINE) { - charsNeeded += 2 * strlenW(indent); + charsNeeded += 2 * lstrlenW(indent); if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) { - strcpyW(str, indent); - str += strlenW(indent); - strcpyW(str, indent); - str += strlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); + lstrcpyW(str, indent); + str += lstrlenW(indent); } } charsNeeded += qualifierLen; @@ -1012,7 +1012,7 @@ BOOL WINAPI FormatVerisignExtension(DWORD dwCertEncodingType, charsNeeded += headingSepLen; if (str && *pcbFormat >= charsNeeded * sizeof(WCHAR)) { - strcpyW(str, headingSep); + lstrcpyW(str, headingSep); str += headingSepLen; } /* This if block is deliberately redundant with the same if diff --git a/media/doc/README.WINE b/media/doc/README.WINE index e04177e80b1..b02af3fd117 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -60,7 +60,7 @@ dll/win32/comdlg32 # Synced to WineStaging-4.18 dll/win32/compstui # Synced to WineStaging-4.18 dll/win32/credui # Synced to WineStaging-4.18 dll/win32/crypt32 # Synced to WineStaging-4.0 -dll/win32/cryptdlg # Synced to WineStaging-3.3 +dll/win32/cryptdlg # Synced to WineStaging-4.18 dll/win32/cryptdll # Synced to WineStaging-3.3 dll/win32/cryptnet # Synced to WineStaging-3.3 dll/win32/cryptui # Synced to WineStaging-4.0
5 years
1
0
0
0
[reactos] 01/01: [CREDUI] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=98ef8700d2f1aa335c3dd…
commit 98ef8700d2f1aa335c3ddc94eb7beb39d18e48e3 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Oct 26 22:53:18 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Oct 26 22:53:18 2019 +0100 [CREDUI] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/credui/credui_main.c | 70 ++++++++++++++++++++++-------------------- media/doc/README.WINE | 2 +- 2 files changed, 37 insertions(+), 35 deletions(-) diff --git a/dll/win32/credui/credui_main.c b/dll/win32/credui/credui_main.c index 99aa9a12dd9..56789bc57d6 100644 --- a/dll/win32/credui/credui_main.c +++ b/dll/win32/credui/credui_main.c @@ -19,6 +19,9 @@ */ #include <stdarg.h> +#ifdef __REACTOS__ +#include <wchar.h> +#endif #include "windef.h" #include "winbase.h" @@ -32,7 +35,6 @@ #include "credui_resources.h" #include "wine/debug.h" -#include "wine/unicode.h" #include "wine/list.h" WINE_DEFAULT_DEBUG_CHANNEL(credui); @@ -89,7 +91,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) HeapFree(GetProcessHeap(), 0, entry->pszTargetName); HeapFree(GetProcessHeap(), 0, entry->pszUsername); - SecureZeroMemory(entry->pszPassword, strlenW(entry->pszPassword) * sizeof(WCHAR)); + SecureZeroMemory(entry->pszPassword, lstrlenW(entry->pszPassword) * sizeof(WCHAR)); HeapFree(GetProcessHeap(), 0, entry->pszPassword); HeapFree(GetProcessHeap(), 0, entry); } @@ -111,7 +113,7 @@ static DWORD save_credentials(PCWSTR pszTargetName, PCWSTR pszUsername, cred.Type = generic ? CRED_TYPE_GENERIC : CRED_TYPE_DOMAIN_PASSWORD; cred.TargetName = (LPWSTR)pszTargetName; cred.Comment = NULL; - cred.CredentialBlobSize = strlenW(pszPassword) * sizeof(WCHAR); + cred.CredentialBlobSize = lstrlenW(pszPassword) * sizeof(WCHAR); cred.CredentialBlob = (LPBYTE)pszPassword; cred.Persist = CRED_PERSIST_ENTERPRISE; cred.AttributeCount = 0; @@ -180,7 +182,7 @@ static void CredDialogFillUsernameCombo(HWND hwndUsername, const struct cred_dia /* don't add another item with the same name if we've already added it */ for (j = 0; j < i; j++) if (credentials[j]->UserName - && !strcmpW(credentials[i]->UserName, credentials[j]->UserName)) + && !lstrcmpW(credentials[i]->UserName, credentials[j]->UserName)) { duplicate = TRUE; break; @@ -391,7 +393,7 @@ static BOOL CredDialogInit(HWND hwndDlg, struct cred_dialog_params *params) WCHAR format[256]; WCHAR message[256]; LoadStringW(hinstCredUI, IDS_MESSAGEFORMAT, format, ARRAY_SIZE(format)); - snprintfW(message, ARRAY_SIZE(message), format, params->pszTargetName); + swprintf(message, format, params->pszTargetName); SetDlgItemTextW(hwndDlg, IDC_MESSAGE, message); } SetWindowTextW(hwndUsername, params->pszUsername); @@ -416,7 +418,7 @@ static BOOL CredDialogInit(HWND hwndDlg, struct cred_dialog_params *params) WCHAR format[256]; WCHAR title[256]; LoadStringW(hinstCredUI, IDS_TITLEFORMAT, format, ARRAY_SIZE(format)); - snprintfW(title, ARRAY_SIZE(title), format, params->pszTargetName); + swprintf(title, format, params->pszTargetName); SetWindowTextW(hwndDlg, title); } @@ -455,9 +457,9 @@ static void CredDialogCommandOk(HWND hwndDlg, struct cred_dialog_params *params) return; } - if (!strchrW(user, '\\') && !strchrW(user, '@')) + if (!wcschr(user, '\\') && !wcschr(user, '@')) { - ULONG len_target = strlenW(params->pszTargetName); + ULONG len_target = lstrlenW(params->pszTargetName); memcpy(params->pszUsername, params->pszTargetName, min(len_target, params->ulUsernameMaxChars) * sizeof(WCHAR)); if (len_target + 1 < params->ulUsernameMaxChars) @@ -468,7 +470,7 @@ static void CredDialogCommandOk(HWND hwndDlg, struct cred_dialog_params *params) else if (params->ulUsernameMaxChars > 0) params->pszUsername[0] = '\0'; - len2 = strlenW(params->pszUsername); + len2 = lstrlenW(params->pszUsername); memcpy(params->pszUsername + len2, user, min(len, params->ulUsernameMaxChars - len2) * sizeof(WCHAR)); if (params->ulUsernameMaxChars) params->pszUsername[len2 + min(len, params->ulUsernameMaxChars - len2 - 1)] = '\0'; @@ -573,13 +575,13 @@ static BOOL find_existing_credential(const WCHAR *target, WCHAR *username, ULONG FIXME("no support for type %u credentials\n", credentials[i]->Type); continue; } - if ((!*username || !strcmpW(username, credentials[i]->UserName)) && - strlenW(credentials[i]->UserName) < len_username && + if ((!*username || !lstrcmpW(username, credentials[i]->UserName)) && + lstrlenW(credentials[i]->UserName) < len_username && credentials[i]->CredentialBlobSize / sizeof(WCHAR) < len_password) { TRACE("found existing credential for %s\n", debugstr_w(credentials[i]->UserName)); - strcpyW(username, credentials[i]->UserName); + lstrcpyW(username, credentials[i]->UserName); memcpy(password, credentials[i]->CredentialBlob, credentials[i]->CredentialBlobSize); password[credentials[i]->CredentialBlobSize / sizeof(WCHAR)] = 0; @@ -676,27 +678,27 @@ DWORD WINAPI CredUIPromptForCredentialsW(PCREDUI_INFOW pUIInfo, /* find existing pending credentials for the same target and overwrite */ /* FIXME: is this correct? */ LIST_FOR_EACH_ENTRY(entry, &pending_credentials_list, struct pending_credentials, entry) - if (!strcmpW(pszTargetName, entry->pszTargetName)) + if (!lstrcmpW(pszTargetName, entry->pszTargetName)) { found = TRUE; HeapFree(GetProcessHeap(), 0, entry->pszUsername); - SecureZeroMemory(entry->pszPassword, strlenW(entry->pszPassword) * sizeof(WCHAR)); + SecureZeroMemory(entry->pszPassword, lstrlenW(entry->pszPassword) * sizeof(WCHAR)); HeapFree(GetProcessHeap(), 0, entry->pszPassword); } if (!found) { entry = HeapAlloc(GetProcessHeap(), 0, sizeof(*entry)); - len = strlenW(pszTargetName); + len = lstrlenW(pszTargetName); entry->pszTargetName = HeapAlloc(GetProcessHeap(), 0, (len + 1)*sizeof(WCHAR)); memcpy(entry->pszTargetName, pszTargetName, (len + 1)*sizeof(WCHAR)); list_add_tail(&pending_credentials_list, &entry->entry); } - len = strlenW(params.pszUsername); + len = lstrlenW(params.pszUsername); entry->pszUsername = HeapAlloc(GetProcessHeap(), 0, (len + 1)*sizeof(WCHAR)); memcpy(entry->pszUsername, params.pszUsername, (len + 1)*sizeof(WCHAR)); - len = strlenW(params.pszPassword); + len = lstrlenW(params.pszPassword); entry->pszPassword = HeapAlloc(GetProcessHeap(), 0, (len + 1)*sizeof(WCHAR)); memcpy(entry->pszPassword, params.pszPassword, (len + 1)*sizeof(WCHAR)); entry->generic = (dwFlags & CREDUI_FLAGS_GENERIC_CREDENTIALS) != 0; @@ -728,7 +730,7 @@ DWORD WINAPI CredUIConfirmCredentialsW(PCWSTR pszTargetName, BOOL bConfirm) LIST_FOR_EACH_ENTRY(entry, &pending_credentials_list, struct pending_credentials, entry) { - if (!strcmpW(pszTargetName, entry->pszTargetName)) + if (!lstrcmpW(pszTargetName, entry->pszTargetName)) { if (bConfirm) result = save_credentials(entry->pszTargetName, entry->pszUsername, @@ -740,7 +742,7 @@ DWORD WINAPI CredUIConfirmCredentialsW(PCWSTR pszTargetName, BOOL bConfirm) HeapFree(GetProcessHeap(), 0, entry->pszTargetName); HeapFree(GetProcessHeap(), 0, entry->pszUsername); - SecureZeroMemory(entry->pszPassword, strlenW(entry->pszPassword) * sizeof(WCHAR)); + SecureZeroMemory(entry->pszPassword, lstrlenW(entry->pszPassword) * sizeof(WCHAR)); HeapFree(GetProcessHeap(), 0, entry->pszPassword); HeapFree(GetProcessHeap(), 0, entry); @@ -771,37 +773,37 @@ DWORD WINAPI CredUIParseUserNameW(PCWSTR pszUserName, PWSTR pszUser, /* FIXME: handle marshaled credentials */ - p = strchrW(pszUserName, '\\'); + p = wcschr(pszUserName, '\\'); if (p) { if (p - pszUserName > ulMaxDomainChars - 1) return ERROR_INSUFFICIENT_BUFFER; - if (strlenW(p + 1) > ulMaxUserChars - 1) + if (lstrlenW(p + 1) > ulMaxUserChars - 1) return ERROR_INSUFFICIENT_BUFFER; - strcpyW(pszUser, p + 1); + lstrcpyW(pszUser, p + 1); memcpy(pszDomain, pszUserName, (p - pszUserName)*sizeof(WCHAR)); pszDomain[p - pszUserName] = '\0'; return ERROR_SUCCESS; } - p = strrchrW(pszUserName, '@'); + p = wcsrchr(pszUserName, '@'); if (p) { if (p + 1 - pszUserName > ulMaxUserChars - 1) return ERROR_INSUFFICIENT_BUFFER; - if (strlenW(p + 1) > ulMaxDomainChars - 1) + if (lstrlenW(p + 1) > ulMaxDomainChars - 1) return ERROR_INSUFFICIENT_BUFFER; - strcpyW(pszDomain, p + 1); + lstrcpyW(pszDomain, p + 1); memcpy(pszUser, pszUserName, (p - pszUserName)*sizeof(WCHAR)); pszUser[p - pszUserName] = '\0'; return ERROR_SUCCESS; } - if (strlenW(pszUserName) > ulMaxUserChars - 1) + if (lstrlenW(pszUserName) > ulMaxUserChars - 1) return ERROR_INSUFFICIENT_BUFFER; - strcpyW(pszUser, pszUserName); + lstrcpyW(pszUser, pszUserName); pszDomain[0] = '\0'; return ERROR_SUCCESS; @@ -884,8 +886,8 @@ ULONG SEC_ENTRY SspiPromptForCredentialsW( PCWSTR target, void *info, error, debugstr_w(package), input_id, output_id, save, sspi_flags ); if (!target) return ERROR_INVALID_PARAMETER; - if (!package || (strcmpiW( package, basicW ) && strcmpiW( package, ntlmW ) && - strcmpiW( package, negotiateW ))) + if (!package || (wcsicmp( package, basicW ) && wcsicmp( package, ntlmW ) && + wcsicmp( package, negotiateW ))) { FIXME( "package %s not supported\n", debugstr_w(package) ); return ERROR_NO_SUCH_PACKAGE; @@ -920,19 +922,19 @@ ULONG SEC_ENTRY SspiPromptForCredentialsW( PCWSTR target, void *info, DWORD size = sizeof(*id), len_domain = 0; WCHAR *ptr, *user = username, *domain = NULL; - if ((ptr = strchrW( username, '\\' ))) + if ((ptr = wcschr( username, '\\' ))) { user = ptr + 1; - len_username = strlenW( user ); - if (!strcmpiW( package, ntlmW ) || !strcmpiW( package, negotiateW )) + len_username = lstrlenW( user ); + if (!wcsicmp( package, ntlmW ) || !wcsicmp( package, negotiateW )) { domain = username; len_domain = ptr - username; } *ptr = 0; } - else len_username = strlenW( username ); - len_password = strlenW( password ); + else len_username = lstrlenW( username ); + len_password = lstrlenW( password ); size += (len_username + 1) * sizeof(WCHAR); size += (len_domain + 1) * sizeof(WCHAR); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 0359c978b45..e04177e80b1 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -58,7 +58,7 @@ dll/win32/comcat # Synced to WineStaging-3.3 dll/win32/comctl32 # Synced to WineStaging-3.3 dll/win32/comdlg32 # Synced to WineStaging-4.18 dll/win32/compstui # Synced to WineStaging-4.18 -dll/win32/credui # Synced to WineStaging-4.0 +dll/win32/credui # Synced to WineStaging-4.18 dll/win32/crypt32 # Synced to WineStaging-4.0 dll/win32/cryptdlg # Synced to WineStaging-3.3 dll/win32/cryptdll # Synced to WineStaging-3.3
5 years
1
0
0
0
← Newer
1
2
3
4
5
6
...
18
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Results per page:
10
25
50
100
200