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
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
List overview
Download
Ros-diffs
November 2019
----- 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
ros-diffs@reactos.org
24 participants
322 discussions
Start a n
N
ew thread
[reactos] 01/01: [MSACM32_WINETEST] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b7117625d7a9c9aee205f…
commit b7117625d7a9c9aee205fa9af3921ffdca6dc5dd Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 9 21:56:59 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 9 21:56:59 2019 +0100 [MSACM32_WINETEST] Sync with Wine Staging 4.18. CORE-16441 --- modules/rostests/winetests/msacm32/msacm.c | 42 +++++++++++++++++++----------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/modules/rostests/winetests/msacm32/msacm.c b/modules/rostests/winetests/msacm32/msacm.c index ce1837c0a8b..7b27c1781b9 100644 --- a/modules/rostests/winetests/msacm32/msacm.c +++ b/modules/rostests/winetests/msacm32/msacm.c @@ -1106,7 +1106,7 @@ static void test_convert(void) MMRESULT mmr; unsigned i; - for (i = 0; i < sizeof(expected_output)/sizeof(struct stream_output); i++) + for (i = 0; i < ARRAY_SIZE(expected_output); i++) { mmr = acmStreamOpen(&has, NULL, (WAVEFORMATEX *)&expected_output[i].src, (WAVEFORMATEX *)&expected_output[i].dst, NULL, 0, 0, 0); ok(mmr == MMSYSERR_NOERROR, "#%d: open failed: 0x%x\n", i, mmr); @@ -1322,28 +1322,40 @@ static void test_mp3(void) src.nBlockSize = 0; mr = acmStreamOpen(&has, NULL, (WAVEFORMATEX*)&src, &dst, NULL, 0, 0, 0); - ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr); - mr = acmStreamClose(has, 0); - ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr); - + ok(mr == MMSYSERR_NOERROR || broken(mr == ACMERR_NOTPOSSIBLE) /* Win 2008 */, + "failed with error 0x%x\n", mr); + if (mr == MMSYSERR_NOERROR) + { + mr = acmStreamClose(has, 0); + ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr); + } src.nBlockSize = 576; src.wfx.nAvgBytesPerSec = 0; mr = acmStreamOpen(&has, NULL, (WAVEFORMATEX*)&src, &dst, NULL, 0, 0, 0); - ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr); - /* causes a division by zero exception */ - if (0) acmStreamSize(has, 4000, &output, ACM_STREAMSIZEF_SOURCE); - mr = acmStreamClose(has, 0); - ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr); + ok(mr == MMSYSERR_NOERROR || broken(mr == ACMERR_NOTPOSSIBLE) /* Win 2008 */, + "failed with error 0x%x\n", mr); + if (mr == MMSYSERR_NOERROR) + { + /* causes a division by zero exception in XP, Vista, + but throws ACMERR_NOTPOSSIBLE on others */ + if (0) acmStreamSize(has, 4000, &output, ACM_STREAMSIZEF_SOURCE); + mr = acmStreamClose(has, 0); + ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr); + } src.wfx.nAvgBytesPerSec = 2000; mr = acmStreamOpen(&has, NULL, (WAVEFORMATEX*)&src, &dst, NULL, 0, 0, 0); - ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr); - mr = acmStreamSize(has, 4000, &output, ACM_STREAMSIZEF_SOURCE); - ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr); - mr = acmStreamClose(has, 0); - ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr); + ok(mr == MMSYSERR_NOERROR || broken(mr == ACMERR_NOTPOSSIBLE) /* Win 2008 */, + "failed with error 0x%x\n", mr); + if (mr == MMSYSERR_NOERROR) + { + mr = acmStreamSize(has, 4000, &output, ACM_STREAMSIZEF_SOURCE); + ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr); + mr = acmStreamClose(has, 0); + ok(mr == MMSYSERR_NOERROR, "failed with error 0x%x\n", mr); + } } static struct
5 years, 1 month
1
0
0
0
[reactos] 01/01: [MSACM32] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=323975a79ec326490d20b…
commit 323975a79ec326490d20bc31d2c5e78734e320fd Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 9 21:56:33 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 9 21:56:33 2019 +0100 [MSACM32] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/msacm32/driver.c | 14 +++------ dll/win32/msacm32/format.c | 11 +++---- dll/win32/msacm32/internal.c | 66 ++++++++++++++++++++++++---------------- dll/win32/msacm32/pcmconverter.c | 1 - dll/win32/msacm32/precomp.h | 3 -- dll/win32/msacm32/wineacm.h | 1 + media/doc/README.WINE | 2 +- 7 files changed, 51 insertions(+), 47 deletions(-) diff --git a/dll/win32/msacm32/driver.c b/dll/win32/msacm32/driver.c index e0c5fdd90ef..f0d003f648b 100644 --- a/dll/win32/msacm32/driver.c +++ b/dll/win32/msacm32/driver.c @@ -21,8 +21,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" #include <stdarg.h> #include <stdio.h> @@ -38,7 +36,6 @@ #include "msacmdrv.h" #include "wineacm.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(msacm); @@ -441,11 +438,11 @@ LRESULT WINAPI acmDriverMessage(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARA pConfigInfo->dwDCISize = iStructSize; - section_name = HeapAlloc(MSACM_hHeap, 0, (strlenW(drivers32) + 1) * sizeof(WCHAR)); - if (section_name) strcpyW(section_name, drivers32); + section_name = HeapAlloc(MSACM_hHeap, 0, (lstrlenW(drivers32) + 1) * sizeof(WCHAR)); + if (section_name) lstrcpyW(section_name, drivers32); pConfigInfo->lpszDCISectionName = section_name; - alias_name = HeapAlloc(MSACM_hHeap, 0, (strlenW(pAlias) + 1) * sizeof(WCHAR)); - if (alias_name) strcpyW(alias_name, pAlias); + alias_name = HeapAlloc(MSACM_hHeap, 0, (lstrlenW(pAlias) + 1) * sizeof(WCHAR)); + if (alias_name) lstrcpyW(alias_name, pAlias); pConfigInfo->lpszDCIAliasName = alias_name; if (pConfigInfo->lpszDCISectionName == NULL || pConfigInfo->lpszDCIAliasName == NULL) { @@ -600,8 +597,7 @@ MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpe return MMSYSERR_NOERROR; gotError: WARN("failed: ret = %08x\n", ret); - if (pad && !pad->hDrvr) - HeapFree(MSACM_hHeap, 0, pad); + HeapFree(MSACM_hHeap, 0, pad); return ret; } diff --git a/dll/win32/msacm32/format.c b/dll/win32/msacm32/format.c index fcc0d9b1c62..284633ccefe 100644 --- a/dll/win32/msacm32/format.c +++ b/dll/win32/msacm32/format.c @@ -27,7 +27,6 @@ #include "winerror.h" #include "wingdi.h" #include "winuser.h" -#include "wine/unicode.h" #include "wine/debug.h" #include "mmsystem.h" #include "mmreg.h" @@ -75,7 +74,7 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid, } break; case WINE_ACMFF_FORMAT: - if (strcmpW(affd->szFormatTag, paftd->szFormatTag) == 0) { + if (lstrcmpW(affd->szFormatTag, paftd->szFormatTag) == 0) { HACMDRIVER had; if (acmDriverOpen(&had, hadid, 0) == MMSYSERR_NOERROR) { @@ -102,7 +101,7 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid, mmr = acmFormatDetailsW(had, &afd, ACM_FORMATDETAILSF_INDEX); if (mmr == MMSYSERR_NOERROR) { lstrcpynW(buffer, afd.szFormat, ACMFORMATTAGDETAILS_FORMATTAG_CHARS + 1); - len = strlenW(buffer); + len = lstrlenW(buffer); for (j = len; j < ACMFORMATTAGDETAILS_FORMATTAG_CHARS; j++) buffer[j] = ' '; wsprintfW(buffer + ACMFORMATTAGDETAILS_FORMATTAG_CHARS, @@ -123,7 +122,7 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid, } break; case WINE_ACMFF_WFX: - if (strcmpW(affd->szFormatTag, paftd->szFormatTag) == 0) { + if (lstrcmpW(affd->szFormatTag, paftd->szFormatTag) == 0) { HACMDRIVER had; if (acmDriverOpen(&had, hadid, 0) == MMSYSERR_NOERROR) { @@ -504,8 +503,8 @@ MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD pafd->pwfx->wBitsPerSample); } MultiByteToWideChar(CP_ACP, 0, (pafd->pwfx->nChannels == 1) ? "; Mono" : "; Stereo", -1, - pafd->szFormat + strlenW(pafd->szFormat), - ARRAY_SIZE(pafd->szFormat) - strlenW(pafd->szFormat)); + pafd->szFormat + lstrlenW(pafd->szFormat), + ARRAY_SIZE(pafd->szFormat) - lstrlenW(pafd->szFormat)); } TRACE("=> %d\n", mmr); diff --git a/dll/win32/msacm32/internal.c b/dll/win32/msacm32/internal.c index aad071e8ade..222cf16d5d6 100644 --- a/dll/win32/msacm32/internal.c +++ b/dll/win32/msacm32/internal.c @@ -23,6 +23,9 @@ #include <stdarg.h> #include <string.h> +#ifdef __REACTOS__ +#include <wchar.h> +#endif #include "windef.h" #include "winbase.h" @@ -36,7 +39,6 @@ #include "msacmdrv.h" #include "wineacm.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(msacm); @@ -72,7 +74,7 @@ PWINE_ACMDRIVERID MSACM_RegisterDriverFromRegistry(LPCWSTR pszRegEntry) /* The requested registry entry must have the format msacm.XXXXX in order to be recognized in any future sessions of msacm */ - if (0 == strncmpiW(pszRegEntry, msacmW, ARRAY_SIZE(msacmW))) { + if (0 == _wcsnicmp(pszRegEntry, msacmW, ARRAY_SIZE(msacmW))) { lRet = RegOpenKeyExW(HKEY_LOCAL_MACHINE, drvkey, 0, KEY_QUERY_VALUE, &hKey); if (lRet != ERROR_SUCCESS) { WARN("unable to open registry key - 0x%08x\n", lRet); @@ -192,12 +194,12 @@ static LPWSTR MSACM_GetRegistryKey(const WINE_ACMDRIVERID* padid) ERR("No alias needed for registry entry\n"); return NULL; } - len = strlenW(baseKey); - ret = HeapAlloc(MSACM_hHeap, 0, (len + strlenW(padid->pszDriverAlias) + 1) * sizeof(WCHAR)); + len = lstrlenW(baseKey); + ret = HeapAlloc(MSACM_hHeap, 0, (len + lstrlenW(padid->pszDriverAlias) + 1) * sizeof(WCHAR)); if (!ret) return NULL; - strcpyW(ret, baseKey); - strcpyW(ret + len, padid->pszDriverAlias); + lstrcpyW(ret, baseKey); + lstrcpyW(ret + len, padid->pszDriverAlias); CharLowerW(ret + len); return ret; } @@ -296,23 +298,23 @@ PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileNa padid->pszDriverAlias = NULL; if (pszDriverAlias) { - padid->pszDriverAlias = HeapAlloc( MSACM_hHeap, 0, (strlenW(pszDriverAlias)+1) * sizeof(WCHAR) ); + padid->pszDriverAlias = HeapAlloc( MSACM_hHeap, 0, (lstrlenW(pszDriverAlias)+1) * sizeof(WCHAR) ); if (!padid->pszDriverAlias) { HeapFree(MSACM_hHeap, 0, padid); return NULL; } - strcpyW( padid->pszDriverAlias, pszDriverAlias ); + lstrcpyW( padid->pszDriverAlias, pszDriverAlias ); } padid->pszFileName = NULL; if (pszFileName) { - padid->pszFileName = HeapAlloc( MSACM_hHeap, 0, (strlenW(pszFileName)+1) * sizeof(WCHAR) ); + padid->pszFileName = HeapAlloc( MSACM_hHeap, 0, (lstrlenW(pszFileName)+1) * sizeof(WCHAR) ); if (!padid->pszFileName) { HeapFree(MSACM_hHeap, 0, padid->pszDriverAlias); HeapFree(MSACM_hHeap, 0, padid); return NULL; } - strcpyW( padid->pszFileName, pszFileName ); + lstrcpyW( padid->pszFileName, pszFileName ); } padid->pLocalDriver = pLocalDriver; @@ -376,8 +378,8 @@ void MSACM_RegisterAllDrivers(void) bufLen = ARRAY_SIZE(buf); lRet = RegEnumKeyExW(hKey, i, buf, &bufLen, 0, 0, 0, &lastWrite); if (lRet != ERROR_SUCCESS) continue; - if (strncmpiW(buf, msacmW, ARRAY_SIZE(msacmW))) continue; - if (!(name = strchrW(buf, '='))) continue; + if (_wcsnicmp(buf, msacmW, ARRAY_SIZE(msacmW))) continue; + if (!(name = wcschr(buf, '='))) continue; *name = 0; MSACM_RegisterDriver(buf, name + 1, 0); } @@ -386,7 +388,7 @@ void MSACM_RegisterAllDrivers(void) bufLen = sizeof(buf); while(RegEnumValueW(hKey, i, valname, &cnt, 0, &type, (BYTE*)buf, &bufLen) == ERROR_SUCCESS){ - if (!strncmpiW(valname, msacmW, ARRAY_SIZE(msacmW))) + if (!_wcsnicmp(valname, msacmW, ARRAY_SIZE(msacmW))) MSACM_RegisterDriver(valname, buf, 0); ++i; } @@ -395,10 +397,10 @@ void MSACM_RegisterAllDrivers(void) if (GetPrivateProfileSectionW(drv32, buf, ARRAY_SIZE(buf), sys)) { - for(s = buf; *s; s += strlenW(s) + 1) + for(s = buf; *s; s += lstrlenW(s) + 1) { - if (strncmpiW(s, msacmW, ARRAY_SIZE(msacmW))) continue; - if (!(name = strchrW(s, '='))) continue; + if (_wcsnicmp(s, msacmW, ARRAY_SIZE(msacmW))) continue; + if (!(name = wcschr(s, '='))) continue; *name = 0; MSACM_RegisterDriver(s, name + 1, 0); *name = '='; @@ -614,7 +616,7 @@ static void MSACM_ReorderDriversByPriority(void) static const WCHAR sPrefix[] = {'m','s','a','c','m','.','\0'}; /* Build expected entry name */ - snprintfW(szSubKey, 17, priorityTmpl, i + 1); + swprintf(szSubKey, priorityTmpl, i + 1); lBufferLength = sizeof(szBuffer); lError = RegQueryValueExW(hPriorityKey, szSubKey, NULL, NULL, (LPBYTE)szBuffer, (LPDWORD)&lBufferLength); if (lError != ERROR_SUCCESS) continue; @@ -623,11 +625,11 @@ static void MSACM_ReorderDriversByPriority(void) iTargetPosition = i; /* Locate driver alias in driver list */ - pAlias = strstrW(szBuffer, sPrefix); + pAlias = wcsstr(szBuffer, sPrefix); if (pAlias == NULL) continue; for (iCurrentPosition = 0; iCurrentPosition < iNumDrivers; iCurrentPosition++) { - if (strcmpiW(driverList[iCurrentPosition]->pszDriverAlias, pAlias) == 0) + if (wcsicmp(driverList[iCurrentPosition]->pszDriverAlias, pAlias) == 0) break; } if (iCurrentPosition < iNumDrivers && iTargetPosition != iCurrentPosition) { @@ -703,13 +705,13 @@ void MSACM_WriteCurrentPriorities(void) /* Build required value name */ dwPriorityCounter++; - snprintfW(szSubKey, 17, priorityTmpl, dwPriorityCounter); + swprintf(szSubKey, priorityTmpl, dwPriorityCounter); /* Value has a 1 in front for enabled drivers and 0 for disabled drivers */ - snprintfW(szBuffer, 256, valueTmpl, (padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) ? '0' : '1', padid->pszDriverAlias); - strlwrW(szBuffer); + swprintf(szBuffer, valueTmpl, (padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) ? '0' : '1', padid->pszDriverAlias); + _wcslwr(szBuffer); - lError = RegSetValueExW(hPriorityKey, szSubKey, 0, REG_SZ, (BYTE *)szBuffer, (strlenW(szBuffer) + 1) * sizeof(WCHAR)); + lError = RegSetValueExW(hPriorityKey, szSubKey, 0, REG_SZ, (BYTE *)szBuffer, (lstrlenW(szBuffer) + 1) * sizeof(WCHAR)); if (lError != ERROR_SUCCESS) { ERR("unable to write value for %s under key %s (0x%08x)\n", debugstr_w(padid->pszDriverAlias), debugstr_w(basePriorityKey), lError); @@ -718,12 +720,12 @@ void MSACM_WriteCurrentPriorities(void) /* Build required value name */ dwPriorityCounter++; - snprintfW(szSubKey, 17, priorityTmpl, dwPriorityCounter); + swprintf(szSubKey, priorityTmpl, dwPriorityCounter); /* Value has a 1 in front for enabled drivers and 0 for disabled drivers */ - snprintfW(szBuffer, 256, valueTmpl, '1', converterAlias); + swprintf(szBuffer, valueTmpl, '1', converterAlias); - lError = RegSetValueExW(hPriorityKey, szSubKey, 0, REG_SZ, (BYTE *)szBuffer, (strlenW(szBuffer) + 1) * sizeof(WCHAR)); + lError = RegSetValueExW(hPriorityKey, szSubKey, 0, REG_SZ, (BYTE *)szBuffer, (lstrlenW(szBuffer) + 1) * sizeof(WCHAR)); if (lError != ERROR_SUCCESS) { ERR("unable to write value for %s under key %s (0x%08x)\n", debugstr_w(converterAlias), debugstr_w(basePriorityKey), lError); @@ -737,12 +739,17 @@ static PWINE_ACMLOCALDRIVER MSACM_pLastACMLocalDriver; static PWINE_ACMLOCALDRIVER MSACM_UnregisterLocalDriver(PWINE_ACMLOCALDRIVER paldrv) { PWINE_ACMLOCALDRIVER pNextACMLocalDriver; + LONG ref; if (paldrv->pACMInstList) { ERR("local driver instances still present after closing all drivers - memory leak\n"); return NULL; } + ref = InterlockedDecrement(&paldrv->ref); + if (ref) + return paldrv; + if (paldrv == MSACM_pFirstACMLocalDriver) MSACM_pFirstACMLocalDriver = paldrv->pNextACMLocalDrv; if (paldrv == MSACM_pLastACMLocalDriver) @@ -883,7 +890,11 @@ PWINE_ACMLOCALDRIVER MSACM_RegisterLocalDriver(HMODULE hModule, DRIVERPROC lpDri /* look up previous instance of local driver module */ for (paldrv = MSACM_pFirstACMLocalDriver; paldrv; paldrv = paldrv->pNextACMLocalDrv) { - if (paldrv->hModule == hModule && paldrv->lpDrvProc == lpDriverProc) return paldrv; + if (paldrv->hModule == hModule && paldrv->lpDrvProc == lpDriverProc) + { + InterlockedIncrement(&paldrv->ref); + return paldrv; + } } paldrv = HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMLOCALDRIVER)); @@ -892,6 +903,7 @@ PWINE_ACMLOCALDRIVER MSACM_RegisterLocalDriver(HMODULE hModule, DRIVERPROC lpDri paldrv->hModule = hModule; paldrv->lpDrvProc = lpDriverProc; paldrv->pACMInstList = NULL; + paldrv->ref = 1; paldrv->pNextACMLocalDrv = NULL; paldrv->pPrevACMLocalDrv = MSACM_pLastACMLocalDriver; diff --git a/dll/win32/msacm32/pcmconverter.c b/dll/win32/msacm32/pcmconverter.c index dc10f11e7ad..d528a6d35fb 100644 --- a/dll/win32/msacm32/pcmconverter.c +++ b/dll/win32/msacm32/pcmconverter.c @@ -26,7 +26,6 @@ * embedded driver handling scheme in msacm32.dll which isn't done yet */ -#include "config.h" #include <assert.h> #include <stdarg.h> diff --git a/dll/win32/msacm32/precomp.h b/dll/win32/msacm32/precomp.h index dae503337ba..6beb48616ee 100644 --- a/dll/win32/msacm32/precomp.h +++ b/dll/win32/msacm32/precomp.h @@ -2,8 +2,6 @@ #ifndef _WINEACM_PRECOMP_H #define _WINEACM_PRECOMP_H -#include <wine/config.h> - #include <stdarg.h> #define WIN32_NO_STATUS @@ -12,6 +10,5 @@ #include "wineacm.h" #include <wine/debug.h> -#include <wine/unicode.h> #endif /* !_WINEACM_PRECOMP_H */ diff --git a/dll/win32/msacm32/wineacm.h b/dll/win32/msacm32/wineacm.h index 37d639d2150..72f6cdb3e1b 100644 --- a/dll/win32/msacm32/wineacm.h +++ b/dll/win32/msacm32/wineacm.h @@ -55,6 +55,7 @@ typedef struct _WINE_ACMLOCALDRIVER PWINE_ACMLOCALDRIVERINST pACMInstList; PWINE_ACMLOCALDRIVER pNextACMLocalDrv; PWINE_ACMLOCALDRIVER pPrevACMLocalDrv; + LONG ref; } WINE_ACMLOCALDRIVER; typedef struct _WINE_ACMLOCALDRIVERINST diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 4cf3263f96c..6ef81693421 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -101,7 +101,7 @@ dll/win32/mlang # Synced to WineStaging-4.18 dll/win32/mmdevapi # Synced to WineStaging-4.18 dll/win32/mpr # Synced to WineStaging-4.18 dll/win32/mprapi # Synced to WineStaging-3.3 -dll/win32/msacm32 # Synced to WineStaging-4.0 +dll/win32/msacm32 # Synced to WineStaging-4.18 dll/win32/msacm32.drv # Synced to WineStaging-3.3 dll/win32/msadp32.acm # Synced to WineStaging-4.0 dll/win32/mscat32 # Synced to WineStaging-3.3
5 years, 1 month
1
0
0
0
[reactos] 01/01: [MPR] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=36acadd7557f4153c6205…
commit 36acadd7557f4153c62056e9ab9835558656b622 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 9 21:55:56 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 9 21:55:56 2019 +0100 [MPR] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/mpr/mpr.spec | 6 +- dll/win32/mpr/nps.c | 3 - dll/win32/mpr/wnet.c | 193 ++++++++++++++++++++++++++++++++++++++++++------- media/doc/README.WINE | 2 +- 4 files changed, 170 insertions(+), 34 deletions(-) diff --git a/dll/win32/mpr/mpr.spec b/dll/win32/mpr/mpr.spec index b75900bafd8..971c53b2754 100644 --- a/dll/win32/mpr/mpr.spec +++ b/dll/win32/mpr/mpr.spec @@ -32,8 +32,8 @@ @ stdcall NPSDeviceGetNumberA(str ptr ptr) @ stdcall NPSDeviceGetStringA(long long ptr ptr) @ stdcall NPSGetProviderHandleA(ptr) -@ stdcall NPSGetProviderNameA(long ptr) -@ stdcall NPSGetSectionNameA(long ptr) +@ stdcall NPSGetProviderNameA(ptr ptr) +@ stdcall NPSGetSectionNameA(ptr ptr) @ stdcall NPSNotifyGetContextA(ptr) @ stdcall NPSNotifyRegisterA(long ptr) @ stdcall NPSSetCustomTextA(str) @@ -101,7 +101,7 @@ @ stdcall WNetOpenEnumW(long long long ptr ptr) @ stub WNetPasswordChangeNotify @ stub WNetPropertyDialogA -@ stdcall WNetRemoveCachedPassword(long long long) +@ stdcall WNetRemoveCachedPassword(ptr long long) @ stub WNetRestoreConnection @ stdcall WNetRestoreConnectionA(long str) @ stdcall WNetRestoreConnectionW(long wstr) diff --git a/dll/win32/mpr/nps.c b/dll/win32/mpr/nps.c index f8a143363f2..84ea08ec3c2 100644 --- a/dll/win32/mpr/nps.c +++ b/dll/win32/mpr/nps.c @@ -19,8 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include <stdarg.h> #include "windef.h" @@ -32,7 +30,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mpr); -#include "wine/unicode.h" #include "mprres.h" diff --git a/dll/win32/mpr/wnet.c b/dll/win32/mpr/wnet.c index e357654699a..27e72131a23 100644 --- a/dll/win32/mpr/wnet.c +++ b/dll/win32/mpr/wnet.c @@ -33,9 +33,11 @@ #define WINE_MOUNTMGR_EXTENSIONS #include "ddk/mountmgr.h" #include "wine/debug.h" -#include "wine/unicode.h" #include "mprres.h" #include "wnetpriv.h" +#ifdef __REACTOS__ +#include <wine/unicode.h> +#endif WINE_DEFAULT_DEBUG_CHANNEL(mpr); @@ -139,7 +141,7 @@ static void _tryLoadProvider(PCWSTR provider) HKEY hKey; TRACE("%s\n", debugstr_w(provider)); - snprintfW(serviceName, ARRAY_SIZE(serviceName), serviceFmt, servicePrefix, provider); + swprintf(serviceName, serviceFmt, servicePrefix, provider); serviceName[ARRAY_SIZE(serviceName) - 1] = '\0'; if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, serviceName, 0, KEY_READ, &hKey) == ERROR_SUCCESS) @@ -268,6 +270,85 @@ static void _tryLoadProvider(PCWSTR provider) debugstr_w(provider)); } +#ifdef __REACTOS__ +static void _restoreSavedConnection(HKEY connection, WCHAR * local) +{ + NETRESOURCEW net; + DWORD type, prov, index, size; + + net.lpProvider = NULL; + net.lpRemoteName = NULL; + net.lpLocalName = NULL; + + TRACE("Restoring: %S\n", local); + + size = sizeof(DWORD); + if (RegQueryValueExW(connection, L"ConnectionType", NULL, &type, (BYTE *)&net.dwType, &size) != ERROR_SUCCESS) + return; + + if (type != REG_DWORD || size != sizeof(DWORD)) + return; + + if (RegQueryValueExW(connection, L"ProviderName", NULL, &type, NULL, &size) != ERROR_SUCCESS) + return; + + if (type != REG_SZ) + return; + + net.lpProvider = HeapAlloc(GetProcessHeap(), 0, size); + if (!net.lpProvider) + return; + + if (RegQueryValueExW(connection, L"ProviderName", NULL, NULL, (BYTE *)net.lpProvider, &size) != ERROR_SUCCESS) + goto cleanup; + + size = sizeof(DWORD); + if (RegQueryValueExW(connection, L"ProviderType", NULL, &type, (BYTE *)&prov, &size) != ERROR_SUCCESS) + goto cleanup; + + if (type != REG_DWORD || size != sizeof(DWORD)) + goto cleanup; + + index = _findProviderIndexW(net.lpProvider); + if (index == BAD_PROVIDER_INDEX) + goto cleanup; + + if (providerTable->table[index].dwNetType != prov) + goto cleanup; + + if (RegQueryValueExW(connection, L"RemotePath", NULL, &type, NULL, &size) != ERROR_SUCCESS) + goto cleanup; + + if (type != REG_SZ) + goto cleanup; + + net.lpRemoteName = HeapAlloc(GetProcessHeap(), 0, size); + if (!net.lpRemoteName) + goto cleanup; + + if (RegQueryValueExW(connection, L"RemotePath", NULL, NULL, (BYTE *)net.lpRemoteName, &size) != ERROR_SUCCESS) + goto cleanup; + + size = strlenW(local); + net.lpLocalName = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR) + 2 * sizeof(WCHAR)); + if (!net.lpLocalName) + goto cleanup; + + strcpyW(net.lpLocalName, local); + net.lpLocalName[size] = ':'; + net.lpLocalName[size + 1] = 0; + + TRACE("Attempting connection\n"); + + WNetAddConnection2W(&net, NULL, NULL, 0); + +cleanup: + HeapFree(GetProcessHeap(), 0, net.lpProvider); + HeapFree(GetProcessHeap(), 0, net.lpRemoteName); + HeapFree(GetProcessHeap(), 0, net.lpLocalName); +} +#endif + void wnetInit(HINSTANCE hInstDll) { static const WCHAR providerOrderKey[] = { 'S','y','s','t','e','m','\\', @@ -304,7 +385,7 @@ void wnetInit(HINSTANCE hInstDll) * allocate space for */ for (ptr = providers, numToAllocate = 1; ptr; ) { - ptr = strchrW(ptr, ','); + ptr = wcschr(ptr, ','); if (ptr) { numToAllocate++; ptr++; @@ -334,7 +415,7 @@ void wnetInit(HINSTANCE hInstDll) for (ptr = providers; ptr; ) { ptrPrev = ptr; - ptr = strchrW(ptr, ','); + ptr = wcschr(ptr, ','); if (ptr) *ptr++ = '\0'; _tryLoadProvider(ptrPrev); @@ -346,6 +427,64 @@ void wnetInit(HINSTANCE hInstDll) } RegCloseKey(hKey); } + +#ifdef __REACTOS__ + if (providerTable) + { + HKEY user_profile; + + if (RegOpenCurrentUser(KEY_ALL_ACCESS, &user_profile) == ERROR_SUCCESS) + { + HKEY network; + WCHAR subkey[8] = {'N', 'e', 't', 'w', 'o', 'r', 'k', 0}; + + if (RegOpenKeyExW(user_profile, subkey, 0, KEY_READ, &network) == ERROR_SUCCESS) + { + DWORD size, max; + + TRACE("Enumerating remembered connections\n"); + + if (RegQueryInfoKey(network, NULL, NULL, NULL, &max, &size, NULL, NULL, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) + { + WCHAR *local; + + TRACE("There are %lu connections\n", max); + + local = HeapAlloc(GetProcessHeap(), 0, (size + 1) * sizeof(WCHAR)); + if (local) + { + DWORD index; + + for (index = 0; index < max; ++index) + { + DWORD len = size + 1; + HKEY connection; + + TRACE("Trying connection %lu\n", index); + + if (RegEnumKeyExW(network, index, local, &len, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) + continue; + + TRACE("It is %S\n", local); + + if (RegOpenKeyExW(network, local, 0, KEY_READ, &connection) != ERROR_SUCCESS) + continue; + + _restoreSavedConnection(connection, local); + RegCloseKey(connection); + } + + HeapFree(GetProcessHeap(), 0, local); + } + } + + RegCloseKey(network); + } + + RegCloseKey(user_profile); + } + } +#endif } void wnetFree(void) @@ -375,7 +514,7 @@ static DWORD _findProviderIndexW(LPCWSTR lpProvider) for (i = 0; i < providerTable->numProviders && ret == BAD_PROVIDER_INDEX; i++) - if (!strcmpW(lpProvider, providerTable->table[i].name)) + if (!lstrcmpW(lpProvider, providerTable->table[i].name)) ret = i; } return ret; @@ -400,10 +539,10 @@ static LPNETRESOURCEW _copyNetResourceForEnumW(LPNETRESOURCEW lpNet) ret->lpLocalName = ret->lpComment = ret->lpProvider = NULL; if (lpNet->lpRemoteName) { - len = strlenW(lpNet->lpRemoteName) + 1; + len = lstrlenW(lpNet->lpRemoteName) + 1; ret->lpRemoteName = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); if (ret->lpRemoteName) - strcpyW(ret->lpRemoteName, lpNet->lpRemoteName); + lstrcpyW(ret->lpRemoteName, lpNet->lpRemoteName); } } } @@ -813,7 +952,7 @@ DWORD WINAPI WNetOpenEnumW( DWORD dwScope, DWORD dwType, DWORD dwUsage, PWSTR RemoteName = lpNet->lpRemoteName; if ((lpNet->dwUsage & RESOURCEUSAGE_CONTAINER) && - RemoteName && !strcmpW(RemoteName, lpNet->lpProvider)) + RemoteName && !lstrcmpW(RemoteName, lpNet->lpProvider)) lpNet->lpRemoteName = NULL; ret = providerTable->table[index].openEnum( @@ -842,7 +981,7 @@ DWORD WINAPI WNetOpenEnumW( DWORD dwScope, DWORD dwType, DWORD dwUsage, } else { - if (lpNet->lpComment && !strcmpW(lpNet->lpComment, + if (lpNet->lpComment && !lstrcmpW(lpNet->lpComment, providerTable->entireNetwork)) { /* comment matches the "Entire Network", enumerate @@ -967,7 +1106,7 @@ static DWORD _countProviderBytesW(PWNetProvider provider) if (provider) { ret = sizeof(NETRESOURCEW); - ret += 2 * (strlenW(provider->name) + 1) * sizeof(WCHAR); + ret += 2 * (lstrlenW(provider->name) + 1) * sizeof(WCHAR); } else ret = 0; @@ -1024,14 +1163,14 @@ static DWORD _enumerateProvidersW(PWNetEnumerator enumerator, LPDWORD lpcCount, RESOURCEUSAGE_RESERVED; resource->lpLocalName = NULL; resource->lpRemoteName = strNext; - strcpyW(resource->lpRemoteName, + lstrcpyW(resource->lpRemoteName, providerTable->table[i + enumerator->providerIndex].name); - strNext += strlenW(resource->lpRemoteName) + 1; + strNext += lstrlenW(resource->lpRemoteName) + 1; resource->lpComment = NULL; resource->lpProvider = strNext; - strcpyW(resource->lpProvider, + lstrcpyW(resource->lpProvider, providerTable->table[i + enumerator->providerIndex].name); - strNext += strlenW(resource->lpProvider) + 1; + strNext += lstrlenW(resource->lpProvider) + 1; } enumerator->providerIndex += count; *lpcCount = count; @@ -1218,7 +1357,7 @@ static DWORD _enumerateContextW(PWNetEnumerator enumerator, LPDWORD lpcCount, if (!providerTable) return WN_NO_NETWORK; - cchEntireNetworkLen = strlenW(providerTable->entireNetwork) + 1; + cchEntireNetworkLen = lstrlenW(providerTable->entireNetwork) + 1; bytesNeeded = sizeof(NETRESOURCEW) + cchEntireNetworkLen * sizeof(WCHAR); if (*lpBufferSize < bytesNeeded) { @@ -1241,7 +1380,7 @@ static DWORD _enumerateContextW(PWNetEnumerator enumerator, LPDWORD lpcCount, */ lpNet->lpComment = (LPWSTR)((LPBYTE)lpBuffer + *lpBufferSize - (cchEntireNetworkLen * sizeof(WCHAR))); - strcpyW(lpNet->lpComment, providerTable->entireNetwork); + lstrcpyW(lpNet->lpComment, providerTable->entireNetwork); ret = WN_SUCCESS; } if (ret == WN_SUCCESS) @@ -1281,7 +1420,7 @@ static DWORD _copyStringToEnumW(const WCHAR *source, DWORD* left, void** end) DWORD len; WCHAR* local = *end; - len = strlenW(source) + 1; + len = lstrlenW(source) + 1; len *= sizeof(WCHAR); if (*left < len) return WN_MORE_DATA; @@ -1956,9 +2095,9 @@ static DWORD use_connection_pre_set_accessnameW(struct use_connection_context *c DWORD len; if (local_name) - len = strlenW(local_name); + len = lstrlenW(local_name); else - len = strlenW(ctxt->resource->lpRemoteName); + len = lstrlenW(ctxt->resource->lpRemoteName); if (++len > *ctxt->buffer_size) { @@ -1977,12 +2116,12 @@ static void use_connection_set_accessnameW(struct use_connection_context *ctxt, WCHAR *accessname = ctxt->accessname; if (local_name) { - strcpyW(accessname, local_name); + lstrcpyW(accessname, local_name); if (ctxt->result) *ctxt->result = CONNECT_LOCALDRIVE; } else - strcpyW(accessname, ctxt->resource->lpRemoteName); + lstrcpyW(accessname, ctxt->resource->lpRemoteName); } static DWORD wnet_use_provider( struct use_connection_context *ctxt, NETRESOURCEW * netres, WNetProvider *provider, BOOLEAN redirect ) @@ -2016,7 +2155,7 @@ static const WCHAR userName[] = { 'U','s','e','r','N','a','m','e',0 }; static DWORD wnet_use_connection( struct use_connection_context *ctxt ) { - WNetProvider *provider; + WNetProvider *provider = NULL; DWORD index, ret = WN_NO_NETWORK; BOOL redirect = FALSE; WCHAR letter[3] = {'Z', ':', 0}; @@ -2089,13 +2228,13 @@ static DWORD wnet_use_connection( struct use_connection_context *ctxt ) KEY_ALL_ACCESS, NULL, &network, NULL) == ERROR_SUCCESS) { DWORD dword_arg = RESOURCETYPE_DISK; - DWORD len = (strlenW(provider->name) + 1) * sizeof(WCHAR); + DWORD len = (lstrlenW(provider->name) + 1) * sizeof(WCHAR); static const WCHAR empty[1] = {0}; RegSetValueExW(network, connectionType, 0, REG_DWORD, (const BYTE *)&dword_arg, sizeof(DWORD)); RegSetValueExW(network, providerName, 0, REG_SZ, (const BYTE *)provider->name, len); RegSetValueExW(network, providerType, 0, REG_DWORD, (const BYTE *)&provider->dwNetType, sizeof(DWORD)); - len = (strlenW(netres.lpRemoteName) + 1) * sizeof(WCHAR); + len = (lstrlenW(netres.lpRemoteName) + 1) * sizeof(WCHAR); RegSetValueExW(network, remotePath, 0, REG_SZ, (const BYTE *)netres.lpRemoteName, len); len = sizeof(empty); RegSetValueExW(network, userName, 0, REG_SZ, (const BYTE *)empty, len); @@ -2303,7 +2442,7 @@ DWORD WINAPI WNetCancelConnection2W( LPCWSTR lpName, DWORD dwFlags, BOOL fForce HKEY user_profile; /* FIXME: Only remove it if that's a drive letter */ - if (isalphaW(lpName[0]) && lpName[1] == ':' && + if (iswalpha(lpName[0]) && lpName[1] == ':' && RegOpenCurrentUser(KEY_ALL_ACCESS, &user_profile) == ERROR_SUCCESS) { WCHAR subkey[10] = {'N', 'e', 't', 'w', 'o', 'r', 'k', '\\', lpName[0], 0}; @@ -3051,7 +3190,7 @@ DWORD WINAPI WNetGetProviderNameW( DWORD dwNetType, ; if (i < providerTable->numProviders) { - DWORD sizeNeeded = strlenW(providerTable->table[i].name) + 1; + DWORD sizeNeeded = lstrlenW(providerTable->table[i].name) + 1; if (*lpBufferSize < sizeNeeded) { @@ -3060,7 +3199,7 @@ DWORD WINAPI WNetGetProviderNameW( DWORD dwNetType, } else { - strcpyW(lpProvider, providerTable->table[i].name); + lstrcpyW(lpProvider, providerTable->table[i].name); ret = WN_SUCCESS; /* FIXME: is *lpBufferSize set to the number of characters * copied? */ diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 6155fe247c6..4cf3263f96c 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -99,7 +99,7 @@ dll/win32/mciwave # Synced to WineStaging-4.18 dll/win32/mgmtapi # Synced to WineStaging-3.3 dll/win32/mlang # Synced to WineStaging-4.18 dll/win32/mmdevapi # Synced to WineStaging-4.18 -dll/win32/mpr # Synced to WineStaging-3.17 +dll/win32/mpr # Synced to WineStaging-4.18 dll/win32/mprapi # Synced to WineStaging-3.3 dll/win32/msacm32 # Synced to WineStaging-4.0 dll/win32/msacm32.drv # Synced to WineStaging-3.3
5 years, 1 month
1
0
0
0
[reactos] 01/01: [MMDEVAPI_WINETEST] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b8949b0daddf13c383b6a…
commit b8949b0daddf13c383b6abea216fe9df30de9a34 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 9 21:55:28 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 9 21:55:28 2019 +0100 [MMDEVAPI_WINETEST] Sync with Wine Staging 4.18. CORE-16441 --- modules/rostests/winetests/mmdevapi/propstore.c | 9 ++++++--- modules/rostests/winetests/mmdevapi/render.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/rostests/winetests/mmdevapi/propstore.c b/modules/rostests/winetests/mmdevapi/propstore.c index 02340ba1f65..bdba19d158c 100644 --- a/modules/rostests/winetests/mmdevapi/propstore.c +++ b/modules/rostests/winetests/mmdevapi/propstore.c @@ -58,23 +58,26 @@ static void test_propertystore(IPropertyStore *store) { WideCharToMultiByte(CP_ACP, 0, pv.u.pwszVal, -1, temp, sizeof(temp)-1, NULL, NULL); trace("guid: %s\n", temp); - CoTaskMemFree(pv.u.pwszVal); + PropVariantClear(&pv); } pv.vt = VT_EMPTY; hr = IPropertyStore_GetValue(store, (const PROPERTYKEY*)&DEVPKEY_DeviceInterface_FriendlyName, &pv); ok(hr == S_OK, "Failed with %08x\n", hr); ok(pv.vt == VT_LPWSTR && pv.u.pwszVal, "FriendlyName value had wrong type: 0x%x or was NULL\n", pv.vt); + PropVariantClear(&pv); pv.vt = VT_EMPTY; hr = IPropertyStore_GetValue(store, (const PROPERTYKEY*)&DEVPKEY_DeviceInterface_Enabled, &pv); ok(hr == S_OK, "Failed with %08x\n", hr); ok(pv.vt == VT_EMPTY, "Key should not be found\n"); + PropVariantClear(&pv); pv.vt = VT_EMPTY; hr = IPropertyStore_GetValue(store, (const PROPERTYKEY*)&DEVPKEY_DeviceInterface_ClassGuid, &pv); ok(hr == S_OK, "Failed with %08x\n", hr); ok(pv.vt == VT_EMPTY, "Key should not be found\n"); + PropVariantClear(&pv); } static void test_deviceinterface(IPropertyStore *store) @@ -91,7 +94,7 @@ static void test_deviceinterface(IPropertyStore *store) ok(hr == S_OK, "GetValue failed: %08x\n", hr); ok(pv.vt == VT_LPWSTR, "Got wrong variant type: 0x%x\n", pv.vt); trace("device interface: %s\n", wine_dbgstr_w(pv.u.pwszVal)); - CoTaskMemFree(pv.u.pwszVal); + PropVariantClear(&pv); } static void test_getat(IPropertyStore *store) @@ -108,7 +111,7 @@ static void test_getat(IPropertyStore *store) hr = IPropertyStore_GetCount(store, &propcount); ok(hr == S_OK, "Failed with %08x\n", hr); - ok(propcount > 0, "Propcount %d should be greather than zero\n", propcount); + ok(propcount > 0, "Propcount %d should be greater than zero\n", propcount); for (prop = 0; prop < propcount; prop++) { hr = IPropertyStore_GetAt(store, prop, &pkey); diff --git a/modules/rostests/winetests/mmdevapi/render.c b/modules/rostests/winetests/mmdevapi/render.c index 7f43eae9e73..3e8fd4a0c65 100644 --- a/modules/rostests/winetests/mmdevapi/render.c +++ b/modules/rostests/winetests/mmdevapi/render.c @@ -747,7 +747,7 @@ static void test_padding(void) /* win10 appears not to clear the buffer */ for(i = 0; i < psize * pwfx->nBlockAlign; ++i){ if(buf[i] != silence){ - ok(0, "buffer has data in it already, i: %u, valu: %f\n", i, *((float*)buf)); + ok(0, "buffer has data in it already, i: %u, value: %f\n", i, *((float*)buf)); break; } }
5 years, 1 month
1
0
0
0
[reactos] 01/01: [MMDEVAPI] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0e18d6bc62bf6f6956060…
commit 0e18d6bc62bf6f69560601ea13c353e9dc480f48 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 9 21:54:42 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 9 21:54:42 2019 +0100 [MMDEVAPI] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/mmdevapi/audiovolume.c | 2 -- dll/win32/mmdevapi/devenum.c | 7 ++----- dll/win32/mmdevapi/main.c | 7 +------ dll/win32/mmdevapi/mmdevapi.h | 4 ---- dll/win32/mmdevapi/precomp.h | 5 +---- media/doc/README.WINE | 2 +- 6 files changed, 5 insertions(+), 22 deletions(-) diff --git a/dll/win32/mmdevapi/audiovolume.c b/dll/win32/mmdevapi/audiovolume.c index 76f9f4ec1e5..24d210a1c85 100644 --- a/dll/win32/mmdevapi/audiovolume.c +++ b/dll/win32/mmdevapi/audiovolume.c @@ -17,7 +17,6 @@ */ #define COBJMACROS -#include "config.h" #include <stdarg.h> @@ -26,7 +25,6 @@ #include "winnls.h" #include "winreg.h" #include "wine/debug.h" -#include "wine/unicode.h" #include "ole2.h" #include "mmdeviceapi.h" diff --git a/dll/win32/mmdevapi/devenum.c b/dll/win32/mmdevapi/devenum.c index 685ec27de62..82e1bb96c2a 100644 --- a/dll/win32/mmdevapi/devenum.c +++ b/dll/win32/mmdevapi/devenum.c @@ -16,8 +16,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include <stdarg.h> #define NONAMELESSUNION @@ -28,7 +26,6 @@ #include "winreg.h" #include "wine/debug.h" #include "wine/list.h" -#include "wine/unicode.h" #include "initguid.h" #include "ole2.h" @@ -448,7 +445,7 @@ static HRESULT load_devices_from_reg(void) && SUCCEEDED(MMDevice_GetPropValue(&guid, curflow, (const PROPERTYKEY*)&DEVPKEY_Device_FriendlyName, &pv)) && pv.vt == VT_LPWSTR) { - DWORD size_bytes = (strlenW(pv.u.pwszVal) + 1) * sizeof(WCHAR); + DWORD size_bytes = (lstrlenW(pv.u.pwszVal) + 1) * sizeof(WCHAR); WCHAR *name = HeapAlloc(GetProcessHeap(), 0, size_bytes); memcpy(name, pv.u.pwszVal, size_bytes); MMDevice_Create(name, &guid, curflow, @@ -1431,7 +1428,7 @@ static HRESULT WINAPI MMDevPropStore_GetAt(IPropertyStore *iface, DWORD prop, PR RegCloseKey(propkey); buffer[38] = 0; CLSIDFromString(buffer, &key->fmtid); - key->pid = atoiW(&buffer[39]); + key->pid = wcstol(&buffer[39], NULL, 10); return S_OK; } diff --git a/dll/win32/mmdevapi/main.c b/dll/win32/mmdevapi/main.c index 8886975c96a..7680b451381 100644 --- a/dll/win32/mmdevapi/main.c +++ b/dll/win32/mmdevapi/main.c @@ -17,16 +17,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" - #include <stdarg.h> #define COBJMACROS #include "windef.h" #include "winbase.h" #include "wingdi.h" -#include "wine/library.h" #include "ole2.h" #include "olectl.h" @@ -44,7 +40,6 @@ #include "mmdevapi.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(mmdevapi); @@ -139,7 +134,7 @@ static BOOL WINAPI init_driver(INIT_ONCE *once, void *param, void **context) TRACE("Loading driver list %s\n", wine_dbgstr_w(driver_list)); for(next = p = driver_list; next; p = next + 1){ - next = strchrW(p, ','); + next = wcschr(p, ','); if(next) *next = '\0'; diff --git a/dll/win32/mmdevapi/mmdevapi.h b/dll/win32/mmdevapi/mmdevapi.h index ecf44c6e9f6..18971893d22 100644 --- a/dll/win32/mmdevapi/mmdevapi.h +++ b/dll/win32/mmdevapi/mmdevapi.h @@ -18,10 +18,6 @@ #pragma once -#ifndef __WINE_CONFIG_H -# error You must include config.h to use this header -#endif - extern HRESULT MMDevEnum_Create(REFIID riid, void **ppv) DECLSPEC_HIDDEN; extern void MMDevEnum_Free(void) DECLSPEC_HIDDEN; diff --git a/dll/win32/mmdevapi/precomp.h b/dll/win32/mmdevapi/precomp.h index 9d554feba06..17fb891552b 100644 --- a/dll/win32/mmdevapi/precomp.h +++ b/dll/win32/mmdevapi/precomp.h @@ -2,9 +2,6 @@ #ifndef _MMDEVAPI_PRECOMP_H_ #define _MMDEVAPI_PRECOMP_H_ -#include <wine/config.h> -#include <wine/port.h> - #include <stdarg.h> #define WIN32_NO_STATUS @@ -18,13 +15,13 @@ #include <winbase.h> #include <wingdi.h> #include <winreg.h> +#include <winnls.h> #include <objbase.h> #include <audiopolicy.h> #include <endpointvolume.h> #include <mmdeviceapi.h> #include <wine/debug.h> -#include <wine/unicode.h> #include "mmdevapi.h" diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 52895acaf07..6155fe247c6 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -98,7 +98,7 @@ dll/win32/mciseq # Synced to WineStaging-4.18 dll/win32/mciwave # Synced to WineStaging-4.18 dll/win32/mgmtapi # Synced to WineStaging-3.3 dll/win32/mlang # Synced to WineStaging-4.18 -dll/win32/mmdevapi # Synced to WineStaging-4.0 +dll/win32/mmdevapi # Synced to WineStaging-4.18 dll/win32/mpr # Synced to WineStaging-3.17 dll/win32/mprapi # Synced to WineStaging-3.3 dll/win32/msacm32 # Synced to WineStaging-4.0
5 years, 1 month
1
0
0
0
[reactos] 01/01: [MLANG] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=853d6414766004f5386f9…
commit 853d6414766004f5386f9aad3dadbb306152fae4 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 9 21:53:58 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 9 21:53:58 2019 +0100 [MLANG] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/mlang/mlang.c | 16 +++++++--------- media/doc/README.WINE | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/dll/win32/mlang/mlang.c b/dll/win32/mlang/mlang.c index f12df298f13..372a7f4334b 100644 --- a/dll/win32/mlang/mlang.c +++ b/dll/win32/mlang/mlang.c @@ -21,7 +21,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" #include <stdarg.h> #include <stdio.h> @@ -38,7 +37,6 @@ #include "mlang.h" #include "mimeole.h" -#include "wine/unicode.h" #include "wine/debug.h" #include "wine/list.h" @@ -1283,12 +1281,12 @@ static HRESULT lcid_from_rfc1766(IEnumRfc1766 *iface, LCID *lcid, LPCWSTR rfc176 while (IEnumRfc1766_Next(iface, 1, &info, &num) == S_OK) { - if (!strcmpiW(info.wszRfc1766, rfc1766)) + if (!wcsicmp(info.wszRfc1766, rfc1766)) { *lcid = info.lcid; return S_OK; } - if (strlenW(rfc1766) == 2 && !memcmp(info.wszRfc1766, rfc1766, 2 * sizeof(WCHAR))) + if (lstrlenW(rfc1766) == 2 && !memcmp(info.wszRfc1766, rfc1766, 2 * sizeof(WCHAR))) { *lcid = PRIMARYLANGID(info.lcid); return S_OK; @@ -2426,7 +2424,7 @@ static BOOL CALLBACK enum_locales_proc(LPWSTR locale) info = &data->info[data->total]; - info->lcid = strtolW(locale, &end, 16); + info->lcid = wcstol(locale, &end, 16); if (*end) /* invalid number */ return FALSE; @@ -2764,14 +2762,14 @@ static HRESULT WINAPI fnIMultiLanguage3_GetCharsetInfo( { pCharsetInfo->uiCodePage = mlang_data[i].family_codepage; pCharsetInfo->uiInternetEncoding = mlang_data[i].mime_cp_info[n].cp; - strcpyW(pCharsetInfo->wszCharset, csetW); + lstrcpyW(pCharsetInfo->wszCharset, csetW); return S_OK; } if (mlang_data[i].mime_cp_info[n].alias && !lstrcmpiW(Charset, mlang_data[i].mime_cp_info[n].alias)) { pCharsetInfo->uiCodePage = mlang_data[i].family_codepage; pCharsetInfo->uiInternetEncoding = mlang_data[i].mime_cp_info[n].cp; - strcpyW(pCharsetInfo->wszCharset, mlang_data[i].mime_cp_info[n].alias); + lstrcpyW(pCharsetInfo->wszCharset, mlang_data[i].mime_cp_info[n].alias); return S_OK; } } @@ -2793,7 +2791,7 @@ static HRESULT WINAPI fnIMultiLanguage3_GetCharsetInfo( { pCharsetInfo->uiCodePage = mlang_data[i].family_codepage; pCharsetInfo->uiInternetEncoding = mlang_data[i].mime_cp_info[n].cp; - strcpyW(pCharsetInfo->wszCharset, csetW); + lstrcpyW(pCharsetInfo->wszCharset, csetW); return S_OK; } } @@ -3951,7 +3949,7 @@ static BOOL register_codepages(void) { for (info = family->mime_cp_info; info < family->mime_cp_info + family->number_of_cp; info++) { - sprintfW(buf, formatW, info->cp); + swprintf(buf, formatW, info->cp); status = RegCreateKeyW(db_key, buf, &key); if (status != ERROR_SUCCESS) continue; diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 01d073a9783..52895acaf07 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -97,7 +97,7 @@ dll/win32/mciqtz32 # Synced to WineStaging-4.18 dll/win32/mciseq # Synced to WineStaging-4.18 dll/win32/mciwave # Synced to WineStaging-4.18 dll/win32/mgmtapi # Synced to WineStaging-3.3 -dll/win32/mlang # Synced to WineStaging-4.0 +dll/win32/mlang # Synced to WineStaging-4.18 dll/win32/mmdevapi # Synced to WineStaging-4.0 dll/win32/mpr # Synced to WineStaging-3.17 dll/win32/mprapi # Synced to WineStaging-3.3
5 years, 1 month
1
0
0
0
[reactos] 01/01: [MCIWAVE] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3aa689fe57cf5a979d8ed…
commit 3aa689fe57cf5a979d8ed2fa7c5c95a9957fe572 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 9 21:53:30 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 9 21:53:30 2019 +0100 [MCIWAVE] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/mciwave/mciwave.c | 3 +-- media/doc/README.WINE | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dll/win32/mciwave/mciwave.c b/dll/win32/mciwave/mciwave.c index 0fa9b204f81..78f26c2672c 100644 --- a/dll/win32/mciwave/mciwave.c +++ b/dll/win32/mciwave/mciwave.c @@ -32,7 +32,6 @@ #include "wownt32.h" #include "digitalv.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(mciwave); @@ -466,7 +465,7 @@ static LRESULT WAVE_mciOpenFile(WINE_MCIWAVE* wmw, LPCWSTR filename) fn = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(filename) + 1) * sizeof(WCHAR)); if (!fn) return MCIERR_OUT_OF_MEMORY; - strcpyW(fn, filename); + lstrcpyW(fn, filename); HeapFree(GetProcessHeap(), 0, wmw->lpFileName); wmw->lpFileName = fn; diff --git a/media/doc/README.WINE b/media/doc/README.WINE index a42cb9641e9..01d073a9783 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -95,7 +95,7 @@ dll/win32/mciavi32 # Synced to WineStaging-4.18 dll/win32/mcicda # Synced to WineStaging-3.3 dll/win32/mciqtz32 # Synced to WineStaging-4.18 dll/win32/mciseq # Synced to WineStaging-4.18 -dll/win32/mciwave # Synced to WineStaging-4.0 +dll/win32/mciwave # Synced to WineStaging-4.18 dll/win32/mgmtapi # Synced to WineStaging-3.3 dll/win32/mlang # Synced to WineStaging-4.0 dll/win32/mmdevapi # Synced to WineStaging-4.0
5 years, 1 month
1
0
0
0
[reactos] 01/01: [MCISEQ] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=dac1cd3c0aa6164827410…
commit dac1cd3c0aa61648274106a9149f19bde30d3a14 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 9 21:52:56 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 9 21:52:56 2019 +0100 [MCISEQ] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/mciseq/mcimidi.c | 6 +++--- media/doc/README.WINE | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dll/win32/mciseq/mcimidi.c b/dll/win32/mciseq/mcimidi.c index 864ab98067c..c6bc860b1e6 100644 --- a/dll/win32/mciseq/mcimidi.c +++ b/dll/win32/mciseq/mcimidi.c @@ -32,12 +32,12 @@ #include "windef.h" #include "winbase.h" +#include "winnls.h" #include "wingdi.h" #include "winuser.h" #include "wownt32.h" #include "mmddk.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(mcimidi); @@ -692,8 +692,8 @@ static DWORD MIDI_mciOpen(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_OPEN_PARMSW lp return MCIERR_FILE_NOT_FOUND; } wmm->lpstrElementName = HeapAlloc(GetProcessHeap(), 0, - (strlenW(lpParms->lpstrElementName) + 1) * sizeof(WCHAR)); - strcpyW(wmm->lpstrElementName, lpParms->lpstrElementName); + (lstrlenW(lpParms->lpstrElementName) + 1) * sizeof(WCHAR)); + lstrcpyW(wmm->lpstrElementName, lpParms->lpstrElementName); } } TRACE("hFile=%p\n", wmm->hFile); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 4b8dfb11244..a42cb9641e9 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -94,7 +94,7 @@ dll/win32/mapi32 # Synced to WineStaging-4.18 dll/win32/mciavi32 # Synced to WineStaging-4.18 dll/win32/mcicda # Synced to WineStaging-3.3 dll/win32/mciqtz32 # Synced to WineStaging-4.18 -dll/win32/mciseq # Synced to WineStaging-3.3 +dll/win32/mciseq # Synced to WineStaging-4.18 dll/win32/mciwave # Synced to WineStaging-4.0 dll/win32/mgmtapi # Synced to WineStaging-3.3 dll/win32/mlang # Synced to WineStaging-4.0
5 years, 1 month
1
0
0
0
[reactos] 01/01: [MCIQTZ32] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b4e4f9fc7706a772b581f…
commit b4e4f9fc7706a772b581f075d8f8d611010a450b Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 9 21:52:30 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 9 21:52:30 2019 +0100 [MCIQTZ32] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/mciqtz32/CMakeLists.txt | 1 + dll/win32/mciqtz32/mciqtz.c | 11 +++++------ media/doc/README.WINE | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dll/win32/mciqtz32/CMakeLists.txt b/dll/win32/mciqtz32/CMakeLists.txt index 88e92f6c4df..d47f5089ecc 100644 --- a/dll/win32/mciqtz32/CMakeLists.txt +++ b/dll/win32/mciqtz32/CMakeLists.txt @@ -11,4 +11,5 @@ add_library(mciqtz32 MODULE ${SOURCE} mciavi_res.rc) set_module_type(mciqtz32 win32dll) target_link_libraries(mciqtz32 wine strmiids) add_importlibs(mciqtz32 winmm ole32 user32 gdi32 msvcrt kernel32 ntdll) +add_dependencies(mciqtz32 dxsdk) add_cd_file(TARGET mciqtz32 DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/mciqtz32/mciqtz.c b/dll/win32/mciqtz32/mciqtz.c index 1aec32635b2..ec4a8b531a0 100644 --- a/dll/win32/mciqtz32/mciqtz.c +++ b/dll/win32/mciqtz32/mciqtz.c @@ -422,20 +422,19 @@ static DWORD MCIQTZ_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms wma->mci_flags = dwFlags; IMediaSeeking_GetTimeFormat(wma->seek, &format); if (dwFlags & MCI_FROM) { + wma->seek_start = lpParms->dwFrom; if (IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME)) - wma->seek_start = lpParms->dwFrom * 10000; - else - wma->seek_start = lpParms->dwFrom; + wma->seek_start *= 10000; + start_flags = AM_SEEKING_AbsolutePositioning; } else { wma->seek_start = 0; start_flags = AM_SEEKING_NoPositioning; } if (dwFlags & MCI_TO) { + wma->seek_stop = lpParms->dwTo; if (IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME)) - wma->seek_stop = lpParms->dwTo * 10000; - else - wma->seek_stop = lpParms->dwTo; + wma->seek_stop *= 10000; } else { wma->seek_stop = 0; IMediaSeeking_GetDuration(wma->seek, &wma->seek_stop); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 7e54bded41d..4b8dfb11244 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -93,7 +93,7 @@ dll/win32/lz32 # Synced to WineStaging-3.3 dll/win32/mapi32 # Synced to WineStaging-4.18 dll/win32/mciavi32 # Synced to WineStaging-4.18 dll/win32/mcicda # Synced to WineStaging-3.3 -dll/win32/mciqtz32 # Synced to WineStaging-3.3 +dll/win32/mciqtz32 # Synced to WineStaging-4.18 dll/win32/mciseq # Synced to WineStaging-3.3 dll/win32/mciwave # Synced to WineStaging-4.0 dll/win32/mgmtapi # Synced to WineStaging-3.3
5 years, 1 month
1
0
0
0
[reactos] 01/01: [MCIAVI32] Sync with Wine Staging 4.18. CORE-16441
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9ac5b9a017a42dfebfbcf…
commit 9ac5b9a017a42dfebfbcf21b4d447d475840d5dc Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sat Nov 9 21:51:26 2019 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sat Nov 9 21:51:26 2019 +0100 [MCIAVI32] Sync with Wine Staging 4.18. CORE-16441 --- dll/win32/mciavi32/info.c | 1 - dll/win32/mciavi32/mciavi.c | 22 ++++++++++++++++------ media/doc/README.WINE | 2 +- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/dll/win32/mciavi32/info.c b/dll/win32/mciavi32/info.c index 3d138b1dddd..d516c4d4b01 100644 --- a/dll/win32/mciavi32/info.c +++ b/dll/win32/mciavi32/info.c @@ -21,7 +21,6 @@ #include <string.h> #include "private_mciavi.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(mciavi); diff --git a/dll/win32/mciavi32/mciavi.c b/dll/win32/mciavi32/mciavi.c index b32accb6455..d8df240826b 100644 --- a/dll/win32/mciavi32/mciavi.c +++ b/dll/win32/mciavi32/mciavi.c @@ -40,7 +40,6 @@ #include <string.h> #include "private_mciavi.h" #include "wine/debug.h" -#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(mciavi); @@ -253,13 +252,13 @@ static DWORD MCIAVI_mciOpen(UINT wDevID, DWORD dwFlags, /* FIXME : what should be done id wma->hFile is already != 0, or the driver is playin' */ TRACE("MCI_OPEN_ELEMENT %s!\n", debugstr_w(lpOpenParms->lpstrElementName)); - wma->lpFileName = HeapAlloc(GetProcessHeap(), 0, (strlenW(lpOpenParms->lpstrElementName) + 1) * sizeof(WCHAR)); - strcpyW(wma->lpFileName, lpOpenParms->lpstrElementName); + wma->lpFileName = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(lpOpenParms->lpstrElementName) + 1) * sizeof(WCHAR)); + lstrcpyW(wma->lpFileName, lpOpenParms->lpstrElementName); if (lpOpenParms->lpstrElementName[0] == '@') { /* The file name @11223344 encodes an AVIFile handle in decimal notation * in Win3.1 and w2k/NT, but this feature is absent in win95 (KB140750). - * wma->hFile = LongToHandle(strtolW(lpOpenParms->lpstrElementName+1, NULL, 10)); */ + * wma->hFile = LongToHandle(wcstol(lpOpenParms->lpstrElementName+1, NULL, 10)); */ FIXME("Using AVIFile/Stream %s NIY\n", debugstr_w(lpOpenParms->lpstrElementName)); } wma->hFile = mmioOpenW(lpOpenParms->lpstrElementName, NULL, @@ -556,7 +555,7 @@ static DWORD MCIAVI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms if (dwFlags & MCI_DGV_PLAY_REVERSE) return MCIERR_UNSUPPORTED_FUNCTION; if (dwFlags & MCI_TEST) return 0; - if (dwFlags & (MCI_MCIAVI_PLAY_WINDOW|MCI_MCIAVI_PLAY_FULLSCREEN|MCI_MCIAVI_PLAY_FULLBY2)) + if (dwFlags & (MCI_MCIAVI_PLAY_WINDOW|MCI_MCIAVI_PLAY_FULLBY2)) FIXME("Unsupported flag %08x\n", dwFlags); EnterCriticalSection(&wma->cs); @@ -591,7 +590,18 @@ static DWORD MCIAVI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms LeaveCriticalSection(&wma->cs); - if (!(GetWindowLongW(wma->hWndPaint, GWL_STYLE) & WS_VISIBLE)) + if (dwFlags & MCI_MCIAVI_PLAY_FULLSCREEN) + { + HMONITOR mon = MonitorFromWindow(wma->hWndPaint, MONITOR_DEFAULTTONEAREST); + MONITORINFO mi; + mi.cbSize = sizeof(mi); + GetMonitorInfoA(mon, &mi); + wma->hWndPaint = CreateWindowA("STATIC", NULL, WS_POPUP | WS_VISIBLE, mi.rcMonitor.left, + mi.rcMonitor.top, mi.rcMonitor.right - mi.rcMonitor.left, mi.rcMonitor.bottom - mi.rcMonitor.top, + NULL, NULL, NULL, 0); + } + /* if not fullscreen ensure the window is visible */ + else if (!(GetWindowLongW(wma->hWndPaint, GWL_STYLE) & WS_VISIBLE)) ShowWindow(wma->hWndPaint, SW_SHOWNA); EnterCriticalSection(&wma->cs); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 5b085abfe38..7e54bded41d 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -91,7 +91,7 @@ dll/win32/jsproxy # Synced to WineStaging-4.18 dll/win32/loadperf # Synced to WineStaging-4.18 dll/win32/lz32 # Synced to WineStaging-3.3 dll/win32/mapi32 # Synced to WineStaging-4.18 -dll/win32/mciavi32 # Synced to WineStaging-3.3 +dll/win32/mciavi32 # Synced to WineStaging-4.18 dll/win32/mcicda # Synced to WineStaging-3.3 dll/win32/mciqtz32 # Synced to WineStaging-3.3 dll/win32/mciseq # Synced to WineStaging-3.3
5 years, 1 month
1
0
0
0
← Newer
1
...
23
24
25
26
27
28
29
...
33
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
Results per page:
10
25
50
100
200