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
May 2019
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1019 discussions
Start a n
N
ew thread
Jacek Caban : server: Store pending flag in async object.
by Alexandre Julliard
23 May '19
23 May '19
Module: wine Branch: master Commit: 215adcefa35b4ff7b60e6836337e48f49a55a05d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=215adcefa35b4ff7b60e6836…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu May 23 19:36:06 2019 +0200 server: Store pending flag in async object. Instead of abusing direct_result. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/async.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/server/async.c b/server/async.c index b88dd16..c0b84c2 100644 --- a/server/async.c +++ b/server/async.c @@ -45,12 +45,13 @@ struct async unsigned int status; /* current status */ struct timeout_user *timeout; unsigned int timeout_status; /* status to report upon timeout */ - int signaled; struct event *event; async_data_t data; /* data for async I/O call */ struct iosb *iosb; /* I/O status block */ obj_handle_t wait_handle; /* pre-allocated wait handle */ - int direct_result; /* a flag if we're passing result directly from request instead of APC */ + unsigned int signaled :1; + unsigned int pending :1; /* request is succesfully queued, but pending */ + unsigned int direct_result :1;/* a flag if we're passing result directly from request instead of APC */ struct completion *completion; /* completion associated with fd */ apc_param_t comp_key; /* completion key associated with fd */ unsigned int comp_flags; /* completion flags */ @@ -238,6 +239,7 @@ struct async *create_async( struct fd *fd, struct thread *thread, const async_da async->queue = NULL; async->fd = (struct fd *)grab_object( fd ); async->signaled = 0; + async->pending = 1; async->wait_handle = 0; async->direct_result = 0; async->completion = fd_get_completion( fd, &async->comp_key ); @@ -278,8 +280,9 @@ struct async *create_request_async( struct fd *fd, unsigned int comp_flags, cons release_object( async ); return NULL; } + async->pending = 0; async->direct_result = 1; - async->comp_flags = comp_flags; + async->comp_flags = comp_flags; } return async; } @@ -317,6 +320,7 @@ obj_handle_t async_handoff( struct async *async, int success, data_size_t *resul else { async->direct_result = 0; + async->pending = 1; if (!force_blocking && async->fd && is_fd_overlapped( async->fd )) { close_handle( async->thread->process, async->wait_handle); @@ -381,7 +385,7 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota data.user.args[2] = 0; thread_queue_apc( NULL, async->thread, NULL, &data ); } - else if (async->data.apc_context && (!async->direct_result || + else if (async->data.apc_context && (async->pending || !(async->comp_flags & FILE_SKIP_COMPLETION_PORT_ON_SUCCESS))) { add_async_completion( async, async->data.apc_context, status, total );
1
0
0
0
Jacek Caban : ntdll: Introduce wait_async helper.
by Alexandre Julliard
23 May '19
23 May '19
Module: wine Branch: master Commit: c09a903bfac4153b3061c0da95de58387a278cb7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c09a903bfac4153b3061c0da…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu May 23 19:35:51 2019 +0200 ntdll: Introduce wait_async helper. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/file.c | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 3dafdcf..1f93c52 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -425,6 +425,12 @@ static async_data_t server_async( HANDLE handle, struct async_fileio *user, HAND return async; } +static NTSTATUS wait_async( HANDLE handle, BOOL alertable, IO_STATUS_BLOCK *io ) +{ + NtWaitForSingleObject( handle, alertable, NULL ); + return io->u.Status; +} + /* callback for irp async I/O completion */ static NTSTATUS irp_completion( void *user, IO_STATUS_BLOCK *io, NTSTATUS status ) { @@ -588,12 +594,7 @@ static NTSTATUS server_read_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE a if (status != STATUS_PENDING) RtlFreeHeap( GetProcessHeap(), 0, async ); - if (wait_handle) - { - NtWaitForSingleObject( wait_handle, (options & FILE_SYNCHRONOUS_IO_ALERT), NULL ); - status = io->u.Status; - } - + if (wait_handle) status = wait_async( wait_handle, (options & FILE_SYNCHRONOUS_IO_ALERT), io ); return status; } @@ -631,12 +632,7 @@ static NTSTATUS server_write_file( HANDLE handle, HANDLE event, PIO_APC_ROUTINE if (status != STATUS_PENDING) RtlFreeHeap( GetProcessHeap(), 0, async ); - if (wait_handle) - { - NtWaitForSingleObject( wait_handle, (options & FILE_SYNCHRONOUS_IO_ALERT), NULL ); - status = io->u.Status; - } - + if (wait_handle) status = wait_async( wait_handle, (options & FILE_SYNCHRONOUS_IO_ALERT), io ); return status; } @@ -1550,12 +1546,7 @@ static NTSTATUS server_ioctl_file( HANDLE handle, HANDLE event, if (status != STATUS_PENDING) RtlFreeHeap( GetProcessHeap(), 0, async ); - if (wait_handle) - { - NtWaitForSingleObject( wait_handle, (options & FILE_SYNCHRONOUS_IO_ALERT), NULL ); - status = io->u.Status; - } - + if (wait_handle) status = wait_async( wait_handle, (options & FILE_SYNCHRONOUS_IO_ALERT), io ); return status; } @@ -3350,11 +3341,7 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE hFile, IO_STATUS_BLOCK *io ) if (ret != STATUS_PENDING) RtlFreeHeap( GetProcessHeap(), 0, async ); - if (wait_handle) - { - NtWaitForSingleObject( wait_handle, FALSE, NULL ); - ret = io->u.Status; - } + if (wait_handle) ret = wait_async( wait_handle, FALSE, io ); } if (needs_close) close( fd );
1
0
0
0
Nikolay Sivov : kernelbase: Add GetAcceptLanguages().
by Alexandre Julliard
23 May '19
23 May '19
Module: wine Branch: master Commit: 6892d0a559c7dc1cafe67701233a7d3f606c74c3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6892d0a559c7dc1cafe67701…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu May 23 14:20:22 2019 +0300 kernelbase: Add GetAcceptLanguages(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/kernelbase.spec | 4 +- dlls/kernelbase/main.c | 122 ++++++++++++++++++++++++++++++++++++++++ include/shlwapi.h | 8 +++ 3 files changed, 132 insertions(+), 2 deletions(-) diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 844cff1..193af89 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -403,8 +403,8 @@ @ stdcall GenerateConsoleCtrlEvent(long long) kernel32.GenerateConsoleCtrlEvent # @ stub GenerateGPNotificationInternal @ stdcall GetACP() kernel32.GetACP -@ stdcall GetAcceptLanguagesA(ptr ptr) shlwapi.GetAcceptLanguagesA -@ stdcall GetAcceptLanguagesW(ptr ptr) shlwapi.GetAcceptLanguagesW +@ stdcall GetAcceptLanguagesA(ptr ptr) +@ stdcall GetAcceptLanguagesW(ptr ptr) @ stdcall GetAce(ptr long ptr) advapi32.GetAce @ stdcall GetAclInformation(ptr ptr long long) advapi32.GetAclInformation # @ stub GetAdjustObjectAttributesForPrivateNamespaceRoutine diff --git a/dlls/kernelbase/main.c b/dlls/kernelbase/main.c index 3fce236..58f3c33 100644 --- a/dlls/kernelbase/main.c +++ b/dlls/kernelbase/main.c @@ -26,6 +26,7 @@ #include "shlwapi.h" #include "wine/debug.h" +#include "wine/heap.h" #include "winternl.h" WINE_DEFAULT_DEBUG_CHANNEL(kernelbase); @@ -165,3 +166,124 @@ HRESULT WINAPI QISearch(void *base, const QITAB *table, REFIID riid, void **obj) *obj = NULL; return E_NOINTERFACE; } + +HRESULT WINAPI GetAcceptLanguagesA(LPSTR langbuf, DWORD *buflen) +{ + DWORD buflenW, convlen; + WCHAR *langbufW; + HRESULT hr; + + TRACE("%p, %p, *%p: %d\n", langbuf, buflen, buflen, buflen ? *buflen : -1); + + if (!langbuf || !buflen || !*buflen) + return E_FAIL; + + buflenW = *buflen; + langbufW = heap_alloc(sizeof(WCHAR) * buflenW); + hr = GetAcceptLanguagesW(langbufW, &buflenW); + + if (hr == S_OK) + { + convlen = WideCharToMultiByte(CP_ACP, 0, langbufW, -1, langbuf, *buflen, NULL, NULL); + convlen--; /* do not count the terminating 0 */ + } + else /* copy partial string anyway */ + { + convlen = WideCharToMultiByte(CP_ACP, 0, langbufW, *buflen, langbuf, *buflen, NULL, NULL); + if (convlen < *buflen) + { + langbuf[convlen] = 0; + convlen--; /* do not count the terminating 0 */ + } + else + { + convlen = *buflen; + } + } + *buflen = buflenW ? convlen : 0; + + heap_free(langbufW); + return hr; +} + +static HRESULT lcid_to_rfc1766(LCID lcid, WCHAR *rfc1766, INT len) +{ + WCHAR buffer[6 /* MAX_RFC1766_NAME */]; + INT n = GetLocaleInfoW(lcid, LOCALE_SISO639LANGNAME, buffer, ARRAY_SIZE(buffer)); + INT i; + + if (n) + { + i = PRIMARYLANGID(lcid); + if ((((i == LANG_ENGLISH) || (i == LANG_CHINESE) || (i == LANG_ARABIC)) && + (SUBLANGID(lcid) == SUBLANG_DEFAULT)) || + (SUBLANGID(lcid) > SUBLANG_DEFAULT)) { + + buffer[n - 1] = '-'; + i = GetLocaleInfoW(lcid, LOCALE_SISO3166CTRYNAME, buffer + n, ARRAY_SIZE(buffer) - n); + if (!i) + buffer[n - 1] = '\0'; + } + else + i = 0; + + LCMapStringW(LOCALE_USER_DEFAULT, LCMAP_LOWERCASE, buffer, n + i, rfc1766, len); + return ((n + i) > len) ? E_INVALIDARG : S_OK; + } + return E_FAIL; +} + +HRESULT WINAPI GetAcceptLanguagesW(WCHAR *langbuf, DWORD *buflen) +{ + static const WCHAR keyW[] = { + 'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r','\\', + 'I','n','t','e','r','n','a','t','i','o','n','a','l',0}; + static const WCHAR valueW[] = {'A','c','c','e','p','t','L','a','n','g','u','a','g','e',0}; + DWORD mystrlen, mytype; + WCHAR *mystr; + LCID mylcid; + HKEY mykey; + LONG lres; + DWORD len; + + TRACE("%p, %p, *%p: %d\n", langbuf, buflen, buflen, buflen ? *buflen : -1); + + if (!langbuf || !buflen || !*buflen) + return E_FAIL; + + mystrlen = (*buflen > 20) ? *buflen : 20 ; + len = mystrlen * sizeof(WCHAR); + mystr = heap_alloc(len); + mystr[0] = 0; + RegOpenKeyW(HKEY_CURRENT_USER, keyW, &mykey); + lres = RegQueryValueExW(mykey, valueW, 0, &mytype, (PBYTE)mystr, &len); + RegCloseKey(mykey); + len = lstrlenW(mystr); + + if (!lres && (*buflen > len)) + { + lstrcpyW(langbuf, mystr); + *buflen = len; + heap_free(mystr); + return S_OK; + } + + /* Did not find a value in the registry or the user buffer is too small */ + mylcid = GetUserDefaultLCID(); + lcid_to_rfc1766(mylcid, mystr, mystrlen); + len = lstrlenW(mystr); + + memcpy(langbuf, mystr, min(*buflen, len + 1)*sizeof(WCHAR)); + heap_free(mystr); + + if (*buflen > len) + { + *buflen = len; + return S_OK; + } + + *buflen = 0; + return E_NOT_SUFFICIENT_BUFFER; +} diff --git a/include/shlwapi.h b/include/shlwapi.h index 138fcd9..0cd50e9 100644 --- a/include/shlwapi.h +++ b/include/shlwapi.h @@ -31,6 +31,14 @@ extern "C" { #include <pshpack8.h> +#ifndef NO_SHLWAPI_HTTP + +HRESULT WINAPI GetAcceptLanguagesA(char *buffer, DWORD *buff_len); +HRESULT WINAPI GetAcceptLanguagesW(WCHAR *buffer, DWORD *buff_len); +#define GetAcceptLanguages WINELIB_NAME_AW(GetAcceptLanguages) + +#endif /* NO_SHLWAPI_HTTP */ + #ifndef NO_SHLWAPI_REG /* Registry functions */
1
0
0
0
Nikolay Sivov : kernelbase: Add remaining path functions.
by Alexandre Julliard
23 May '19
23 May '19
Module: wine Branch: master Commit: d97a164cd4bbfead415a67d4d1b93e92145a0313 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d97a164cd4bbfead415a67d4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu May 23 14:20:21 2019 +0300 kernelbase: Add remaining path functions. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/kernelbase.spec | 8 +-- dlls/kernelbase/path.c | 137 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+), 4 deletions(-) diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index e2bee49..844cff1 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1097,8 +1097,8 @@ # @ stub PathMatchSpecExA # @ stub PathMatchSpecExW @ stdcall PathMatchSpecW(wstr wstr) -@ stdcall PathParseIconLocationA(str) shlwapi.PathParseIconLocationA -@ stdcall PathParseIconLocationW(wstr) shlwapi.PathParseIconLocationW +@ stdcall PathParseIconLocationA(str) +@ stdcall PathParseIconLocationW(wstr) @ stdcall PathQuoteSpacesA(str) @ stdcall PathQuoteSpacesW(wstr) @ stdcall PathRelativePathToA(ptr str long str long) @@ -1121,8 +1121,8 @@ @ stdcall PathStripPathW(wstr) @ stdcall PathStripToRootA(str) @ stdcall PathStripToRootW(wstr) -@ stdcall PathUnExpandEnvStringsA(str ptr long) shlwapi.PathUnExpandEnvStringsA -@ stdcall PathUnExpandEnvStringsW(wstr ptr long) shlwapi.PathUnExpandEnvStringsW +@ stdcall PathUnExpandEnvStringsA(str ptr long) +@ stdcall PathUnExpandEnvStringsW(wstr ptr long) @ stdcall PathUnquoteSpacesA(str) @ stdcall PathUnquoteSpacesW(wstr) # @ stub PcwAddQueryItem diff --git a/dlls/kernelbase/path.c b/dlls/kernelbase/path.c index b6dc35f..76f8610 100644 --- a/dlls/kernelbase/path.c +++ b/dlls/kernelbase/path.c @@ -2627,6 +2627,143 @@ BOOL WINAPI PathFileExistsW(const WCHAR *path) return attrs != INVALID_FILE_ATTRIBUTES; } +int WINAPI PathParseIconLocationA(char *path) +{ + int ret = 0; + char *comma; + + TRACE("%s\n", debugstr_a(path)); + + if (!path) + return 0; + + if ((comma = strchr(path, ','))) + { + *comma++ = '\0'; + ret = StrToIntA(comma); + } + PathUnquoteSpacesA(path); + PathRemoveBlanksA(path); + + return ret; +} + +int WINAPI PathParseIconLocationW(WCHAR *path) +{ + WCHAR *comma; + int ret = 0; + + TRACE("%s\n", debugstr_w(path)); + + if (!path) + return 0; + + if ((comma = StrChrW(path, ','))) + { + *comma++ = '\0'; + ret = StrToIntW(comma); + } + PathUnquoteSpacesW(path); + PathRemoveBlanksW(path); + + return ret; +} + +BOOL WINAPI PathUnExpandEnvStringsA(const char *path, char *buffer, UINT buf_len) +{ + WCHAR bufferW[MAX_PATH], *pathW; + DWORD len; + BOOL ret; + + TRACE("%s, %p, %d\n", debugstr_a(path), buffer, buf_len); + + pathW = heap_strdupAtoW(path); + if (!pathW) return FALSE; + + ret = PathUnExpandEnvStringsW(pathW, bufferW, MAX_PATH); + HeapFree(GetProcessHeap(), 0, pathW); + if (!ret) return FALSE; + + len = WideCharToMultiByte(CP_ACP, 0, bufferW, -1, NULL, 0, NULL, NULL); + if (buf_len < len + 1) return FALSE; + + WideCharToMultiByte(CP_ACP, 0, bufferW, -1, buffer, buf_len, NULL, NULL); + return TRUE; +} + +static const WCHAR allusersprofileW[] = {'%','A','L','L','U','S','E','R','S','P','R','O','F','I','L','E','%',0}; +static const WCHAR appdataW[] = {'%','A','P','P','D','A','T','A','%',0}; +static const WCHAR programfilesW[] = {'%','P','r','o','g','r','a','m','F','i','l','e','s','%',0}; +static const WCHAR systemrootW[] = {'%','S','y','s','t','e','m','R','o','o','t','%',0}; +static const WCHAR systemdriveW[] = {'%','S','y','s','t','e','m','D','r','i','v','e','%',0}; +static const WCHAR userprofileW[] = {'%','U','S','E','R','P','R','O','F','I','L','E','%',0}; + +struct envvars_map +{ + const WCHAR *var; + UINT varlen; + WCHAR path[MAX_PATH]; + DWORD len; +}; + +static void init_envvars_map(struct envvars_map *map) +{ + while (map->var) + { + map->len = ExpandEnvironmentStringsW(map->var, map->path, ARRAY_SIZE(map->path)); + /* exclude null from length */ + if (map->len) map->len--; + map++; + } +} + +BOOL WINAPI PathUnExpandEnvStringsW(const WCHAR *path, WCHAR *buffer, UINT buf_len) +{ + static struct envvars_map null_var = {NULL, 0, {0}, 0}; + struct envvars_map *match = &null_var, *cur; + struct envvars_map envvars[] = + { + { allusersprofileW, ARRAY_SIZE(allusersprofileW) }, + { appdataW, ARRAY_SIZE(appdataW) }, + { programfilesW, ARRAY_SIZE(programfilesW) }, + { systemrootW, ARRAY_SIZE(systemrootW) }, + { systemdriveW, ARRAY_SIZE(systemdriveW) }, + { userprofileW, ARRAY_SIZE(userprofileW) }, + { NULL } + }; + DWORD pathlen; + UINT needed; + + TRACE("%s, %p, %d\n", debugstr_w(path), buffer, buf_len); + + pathlen = strlenW(path); + init_envvars_map(envvars); + cur = envvars; + while (cur->var) + { + /* path can't contain expanded value or value wasn't retrieved */ + if (cur->len == 0 || cur->len > pathlen || strncmpiW(cur->path, path, cur->len)) + { + cur++; + continue; + } + + if (cur->len > match->len) + match = cur; + cur++; + } + + /* 'varlen' includes NULL termination char */ + needed = match->varlen + pathlen - match->len; + if (match->len == 0 || needed > buf_len) return FALSE; + + strcpyW(buffer, match->var); + strcatW(buffer, &path[match->len]); + TRACE("ret %s\n", debugstr_w(buffer)); + + return TRUE; +} + static const struct { URL_SCHEME scheme_number;
1
0
0
0
Nikolay Sivov : kernelbase: Add more URL API functions from shlwapi.
by Alexandre Julliard
23 May '19
23 May '19
Module: wine Branch: master Commit: 3dc7bf3fd441687135c07fb6b8d3d1eec9b94f9e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3dc7bf3fd441687135c07fb6…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu May 23 14:20:20 2019 +0300 kernelbase: Add more URL API functions from shlwapi. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/Makefile.in | 2 +- dlls/kernelbase/kernelbase.spec | 34 +- dlls/kernelbase/path.c | 838 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 856 insertions(+), 18 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=3dc7bf3fd441687135c0…
1
0
0
0
Fabian Maurer : setupapi: Correct function parameter for CM_Set_Class_Registry_PropertyA/W.
by Alexandre Julliard
23 May '19
23 May '19
Module: wine Branch: master Commit: c77ba713d273bc8395f7340e05546aab8cffdb99 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c77ba713d273bc8395f7340e…
Author: Fabian Maurer <dark.shadow4(a)web.de> Date: Thu May 23 05:59:56 2019 +0200 setupapi: Correct function parameter for CM_Set_Class_Registry_PropertyA/W. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47249
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/setupapi/stubs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/setupapi/stubs.c b/dlls/setupapi/stubs.c index e6d1f1a..47dca6c 100644 --- a/dlls/setupapi/stubs.c +++ b/dlls/setupapi/stubs.c @@ -513,7 +513,7 @@ CONFIGRET WINAPI CM_Reenumerate_DevNode_Ex(DEVINST dnDevInst, ULONG ulFlags, HMA /*********************************************************************** * CM_Set_Class_Registry_PropertyA (SETUPAPI.@) */ -CONFIGRET WINAPI CM_Set_Class_Registry_PropertyA(LPGUID class, ULONG prop, PVOID buf, ULONG len, +CONFIGRET WINAPI CM_Set_Class_Registry_PropertyA(LPGUID class, ULONG prop, LPCVOID buf, ULONG len, ULONG flags, HMACHINE machine) { FIXME("%p %u %p %u 0x%08x %p: stub\n", class, prop, buf, len, flags, machine); @@ -523,7 +523,7 @@ CONFIGRET WINAPI CM_Set_Class_Registry_PropertyA(LPGUID class, ULONG prop, PVOID /*********************************************************************** * CM_Set_Class_Registry_PropertyW (SETUPAPI.@) */ -CONFIGRET WINAPI CM_Set_Class_Registry_PropertyW(LPGUID class, ULONG prop, PVOID buf, ULONG len, +CONFIGRET WINAPI CM_Set_Class_Registry_PropertyW(LPGUID class, ULONG prop, LPCVOID buf, ULONG len, ULONG flags, HMACHINE machine) { FIXME("%p %u %p %u 0x%08x %p: stub\n", class, prop, buf, len, flags, machine);
1
0
0
0
Zebediah Figura : setupapi: Implement SetupDiInstallDeviceInterfaces().
by Alexandre Julliard
23 May '19
23 May '19
Module: wine Branch: master Commit: a37c4262e9f21e67d9ada0e57daeab65c3d2b051 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a37c4262e9f21e67d9ada0e5…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed May 22 22:55:57 2019 -0500 setupapi: Implement SetupDiInstallDeviceInterfaces(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/setupapi/devinst.c | 84 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 77 insertions(+), 7 deletions(-) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index cb7ede6..864e6dd 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -2619,6 +2619,11 @@ HKEY WINAPI SetupDiCreateDeviceInterfaceRegKeyA( return key; } +static LONG create_iface_key(const struct device_iface *iface, REGSAM access, HKEY *key) +{ + return RegCreateKeyExW(iface->refstr_key, DeviceParameters, 0, NULL, 0, access, NULL, key, NULL); +} + /*********************************************************************** * SetupDiCreateDeviceInterfaceRegKeyW (SETUPAPI.@) */ @@ -2642,8 +2647,7 @@ HKEY WINAPI SetupDiCreateDeviceInterfaceRegKeyW(HDEVINFO devinfo, return INVALID_HANDLE_VALUE; } - ret = RegCreateKeyExW(iface->refstr_key, DeviceParameters, 0, NULL, 0, access, - NULL, ¶ms_key, NULL); + ret = create_iface_key(iface, access, ¶ms_key); if (ret) { SetLastError(ret); @@ -3678,9 +3682,10 @@ BOOL WINAPI SetupDiCallClassInstaller(DI_FUNCTION function, HDEVINFO devinfo, SP return SetupDiRegisterCoDeviceInstallers(devinfo, device_data); case DIF_INSTALLDEVICEFILES: return SetupDiInstallDriverFiles(devinfo, device_data); + case DIF_INSTALLINTERFACES: + return SetupDiInstallDeviceInterfaces(devinfo, device_data); case DIF_FINISHINSTALL_ACTION: case DIF_INSTALLDEVICE: - case DIF_INSTALLINTERFACES: case DIF_PROPERTYCHANGE: case DIF_SELECTDEVICE: case DIF_UNREMOVE: @@ -4227,12 +4232,77 @@ BOOL WINAPI SetupDiGetDevicePropertyW(HDEVINFO devinfo, PSP_DEVINFO_DATA device_ /*********************************************************************** * SetupDiInstallDeviceInterfaces (SETUPAPI.@) */ -BOOL WINAPI SetupDiInstallDeviceInterfaces(HDEVINFO dev, PSP_DEVINFO_DATA info_data) +BOOL WINAPI SetupDiInstallDeviceInterfaces(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data) { - FIXME("%p, %p stub\n", dev, info_data); + WCHAR section[LINE_LEN], section_ext[LINE_LEN], iface_section[LINE_LEN], refstr[LINE_LEN], guidstr[39]; + UINT install_flags = SPINST_ALL; + struct device_iface *iface; + struct device *device; + struct driver *driver; + void *callback_ctx; + GUID iface_guid; + INFCONTEXT ctx; + HKEY iface_key; + HINF hinf; + LONG l; - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; + TRACE("devinfo %p, device_data %p.\n", devinfo, device_data); + + if (!(device = get_device(devinfo, device_data))) + return FALSE; + + if (!(driver = device->selected_driver)) + { + ERR("No driver selected for device %p.\n", devinfo); + SetLastError(ERROR_NO_DRIVER_SELECTED); + return FALSE; + } + + if ((hinf = SetupOpenInfFileW(driver->inf_path, NULL, INF_STYLE_WIN4, NULL)) == INVALID_HANDLE_VALUE) + return FALSE; + + SetupFindFirstLineW(hinf, driver->mfg_key, driver->description, &ctx); + SetupGetStringFieldW(&ctx, 1, section, ARRAY_SIZE(section), NULL); + SetupDiGetActualSectionToInstallW(hinf, section, section_ext, ARRAY_SIZE(section_ext), NULL, NULL); + + if (device->params.Flags & DI_NOFILECOPY) + install_flags &= ~SPINST_FILES; + + callback_ctx = SetupInitDefaultQueueCallback(NULL); + + lstrcatW(section_ext, dotInterfaces); + if (SetupFindFirstLineW(hinf, section_ext, AddInterface, &ctx)) + { + do { + SetupGetStringFieldW(&ctx, 1, guidstr, ARRAY_SIZE(guidstr), NULL); + SetupGetStringFieldW(&ctx, 2, refstr, ARRAY_SIZE(refstr), NULL); + guidstr[37] = 0; + UuidFromStringW(&guidstr[1], &iface_guid); + + if (!(iface = SETUPDI_CreateDeviceInterface(device, &iface_guid, refstr))) + { + ERR("Failed to create device interface, error %#x.\n", GetLastError()); + continue; + } + + if ((l = create_iface_key(iface, KEY_ALL_ACCESS, &iface_key))) + { + ERR("Failed to create interface key, error %u.\n", l); + continue; + } + + SetupGetStringFieldW(&ctx, 3, iface_section, ARRAY_SIZE(iface_section), NULL); + SetupInstallFromInfSectionW(NULL, hinf, iface_section, install_flags, iface_key, + NULL, SP_COPY_NEWER_ONLY, SetupDefaultQueueCallbackW, callback_ctx, NULL, NULL); + + RegCloseKey(iface_key); + } while (SetupFindNextMatchLineW(&ctx, AddInterface, &ctx)); + } + + SetupTermDefaultQueueCallback(callback_ctx); + + SetupCloseInfFile(hinf); + return TRUE; } /***********************************************************************
1
0
0
0
Zebediah Figura : setupapi: Process interface sections in SetupDiInstallDriverFiles().
by Alexandre Julliard
23 May '19
23 May '19
Module: wine Branch: master Commit: 94256fccaeb0fe28732b8c7bf808609c0b4923f3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=94256fccaeb0fe28732b8c7b…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed May 22 22:55:55 2019 -0500 setupapi: Process interface sections in SetupDiInstallDriverFiles(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/setupapi/devinst.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index 9903c48..cb7ede6 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -101,6 +101,8 @@ static const WCHAR Phantom[] = {'P','h','a','n','t','o','m',0}; static const WCHAR SymbolicLink[] = {'S','y','m','b','o','l','i','c','L','i','n','k',0}; static const WCHAR Control[] = {'C','o','n','t','r','o','l',0}; static const WCHAR Linked[] = {'L','i','n','k','e','d',0}; +static const WCHAR dotInterfaces[] = {'.','I','n','t','e','r','f','a','c','e','s',0}; +static const WCHAR AddInterface[] = {'A','d','d','I','n','t','e','r','f','a','c','e',0}; static const WCHAR backslashW[] = {'\\',0}; static const WCHAR emptyW[] = {0}; @@ -4559,7 +4561,7 @@ BOOL WINAPI SetupDiSelectBestCompatDrv(HDEVINFO devinfo, SP_DEVINFO_DATA *device */ BOOL WINAPI SetupDiInstallDriverFiles(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data) { - WCHAR section[LINE_LEN], section_ext[LINE_LEN]; + WCHAR section[LINE_LEN], section_ext[LINE_LEN], iface_section[LINE_LEN]; struct device *device; struct driver *driver; void *callback_ctx; @@ -4586,8 +4588,20 @@ BOOL WINAPI SetupDiInstallDriverFiles(HDEVINFO devinfo, SP_DEVINFO_DATA *device_ SetupDiGetActualSectionToInstallW(hinf, section, section_ext, ARRAY_SIZE(section_ext), NULL, NULL); callback_ctx = SetupInitDefaultQueueCallback(NULL); + SetupInstallFromInfSectionW(NULL, hinf, section_ext, SPINST_FILES, NULL, NULL, SP_COPY_NEWER_ONLY, SetupDefaultQueueCallbackW, callback_ctx, NULL, NULL); + + lstrcatW(section_ext, dotInterfaces); + if (SetupFindFirstLineW(hinf, section_ext, AddInterface, &ctx)) + { + do { + SetupGetStringFieldW(&ctx, 3, iface_section, ARRAY_SIZE(iface_section), NULL); + SetupInstallFromInfSectionW(NULL, hinf, iface_section, SPINST_FILES, NULL, NULL, + SP_COPY_NEWER_ONLY, SetupDefaultQueueCallbackW, callback_ctx, NULL, NULL); + } while (SetupFindNextMatchLineW(&ctx, AddInterface, &ctx)); + } + SetupTermDefaultQueueCallback(callback_ctx); SetupCloseInfFile(hinf);
1
0
0
0
Zebediah Figura : setupapi: Implement SetupDiInstallDriverFiles().
by Alexandre Julliard
23 May '19
23 May '19
Module: wine Branch: master Commit: 1c25cc09b51b40c8c562bd697a08a59790401082 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1c25cc09b51b40c8c562bd69…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed May 22 22:55:53 2019 -0500 setupapi: Implement SetupDiInstallDriverFiles(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/setupapi/devinst.c | 43 ++++++++++++++++++++++++++++++++++++++++++- dlls/setupapi/setupapi.spec | 2 +- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index 07288e5..9903c48 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -3674,9 +3674,10 @@ BOOL WINAPI SetupDiCallClassInstaller(DI_FUNCTION function, HDEVINFO devinfo, SP return SetupDiSelectBestCompatDrv(devinfo, device_data); case DIF_REGISTER_COINSTALLERS: return SetupDiRegisterCoDeviceInstallers(devinfo, device_data); + case DIF_INSTALLDEVICEFILES: + return SetupDiInstallDriverFiles(devinfo, device_data); case DIF_FINISHINSTALL_ACTION: case DIF_INSTALLDEVICE: - case DIF_INSTALLDEVICEFILES: case DIF_INSTALLINTERFACES: case DIF_PROPERTYCHANGE: case DIF_SELECTDEVICE: @@ -4552,3 +4553,43 @@ BOOL WINAPI SetupDiSelectBestCompatDrv(HDEVINFO devinfo, SP_DEVINFO_DATA *device return TRUE; } + +/*********************************************************************** + * SetupDiInstallDriverFiles (SETUPAPI.@) + */ +BOOL WINAPI SetupDiInstallDriverFiles(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data) +{ + WCHAR section[LINE_LEN], section_ext[LINE_LEN]; + struct device *device; + struct driver *driver; + void *callback_ctx; + INFCONTEXT ctx; + HINF hinf; + + TRACE("devinfo %p, device_data %p.\n", devinfo, device_data); + + if (!(device = get_device(devinfo, device_data))) + return FALSE; + + if (!(driver = device->selected_driver)) + { + ERR("No driver selected for device %p.\n", devinfo); + SetLastError(ERROR_NO_DRIVER_SELECTED); + return FALSE; + } + + if ((hinf = SetupOpenInfFileW(driver->inf_path, NULL, INF_STYLE_WIN4, NULL)) == INVALID_HANDLE_VALUE) + return FALSE; + + SetupFindFirstLineW(hinf, driver->mfg_key, driver->description, &ctx); + SetupGetStringFieldW(&ctx, 1, section, ARRAY_SIZE(section), NULL); + SetupDiGetActualSectionToInstallW(hinf, section, section_ext, ARRAY_SIZE(section_ext), NULL, NULL); + + callback_ctx = SetupInitDefaultQueueCallback(NULL); + SetupInstallFromInfSectionW(NULL, hinf, section_ext, SPINST_FILES, NULL, NULL, + SP_COPY_NEWER_ONLY, SetupDefaultQueueCallbackW, callback_ctx, NULL, NULL); + SetupTermDefaultQueueCallback(callback_ctx); + + SetupCloseInfFile(hinf); + return TRUE; +} diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec index 1d18870..97347f5 100644 --- a/dlls/setupapi/setupapi.spec +++ b/dlls/setupapi/setupapi.spec @@ -368,7 +368,7 @@ @ stdcall SetupDiInstallClassW(long wstr long ptr) @ stub SetupDiInstallDevice @ stdcall SetupDiInstallDeviceInterfaces(ptr ptr) -@ stub SetupDiInstallDriverFiles +@ stdcall SetupDiInstallDriverFiles(ptr ptr) @ stdcall SetupDiLoadClassIcon(ptr ptr ptr) @ stub SetupDiMoveDuplicateDevice @ stdcall SetupDiOpenClassRegKey(ptr long)
1
0
0
0
Zebediah Figura : quartz/parser: Use strmbase_filter_cleanup().
by Alexandre Julliard
23 May '19
23 May '19
Module: wine Branch: master Commit: e5346c59869de149a1cf9fbd775c743b892ceb35 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e5346c59869de149a1cf9fbd…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed May 22 21:44:55 2019 -0500 quartz/parser: Use strmbase_filter_cleanup(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index 9798ea7..2af8a1f 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -125,7 +125,7 @@ HRESULT Parser_Create(ParserImpl *pParser, const IBaseFilterVtbl *Parser_Vtbl, else { CoTaskMemFree(pParser->ppPins); - BaseFilterImpl_Release(&pParser->filter.IBaseFilter_iface); + strmbase_filter_cleanup(&pParser->filter); CoTaskMemFree(pParser); }
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
102
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
101
102
Results per page:
10
25
50
100
200