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
July 2015
----- 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
13 participants
257 discussions
Start a n
N
ew thread
[akhaldi] 68454: [MSACM32_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jul 19 22:44:00 2015 New Revision: 68454 URL:
http://svn.reactos.org/svn/reactos?rev=68454&view=rev
Log: [MSACM32_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/rostests/winetests/msacm32/msacm.c Modified: trunk/rostests/winetests/msacm32/msacm.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msacm32/msacm.c…
============================================================================== --- trunk/rostests/winetests/msacm32/msacm.c [iso-8859-1] (original) +++ trunk/rostests/winetests/msacm32/msacm.c [iso-8859-1] Sun Jul 19 22:44:00 2015 @@ -127,8 +127,30 @@ TODO: should it be *exactly* sizeof(dd), as tested here? */ if (rc == MMSYSERR_NOERROR) { + struct { + const char *shortname; + const WORD mid; + const WORD pid; + } *iter, expected_ids[] = { + { "Microsoft IMA ADPCM", MM_MICROSOFT, MM_MSFT_ACM_IMAADPCM }, + { "MS-ADPCM", MM_MICROSOFT, MM_MSFT_ACM_MSADPCM }, + { "Microsoft CCITT G.711", MM_MICROSOFT, MM_MSFT_ACM_G711}, + { "MPEG Layer-3 Codec", MM_FRAUNHOFER_IIS, MM_FHGIIS_MPEGLAYER3_DECODE }, + { "MS-PCM", MM_MICROSOFT, MM_MSFT_ACM_PCM }, + { 0 } + }; + ok(dd.cbStruct == sizeof(dd), "acmDriverDetailsA(): cbStruct = %08x\n", dd.cbStruct); + + for (iter = expected_ids; iter->shortname; ++iter) { + if (dd.szShortName && !strcmp(iter->shortname, dd.szShortName)) { + ok(iter->mid == dd.wMid && iter->pid == dd.wPid, + "Got wrong manufacturer (0x%x vs 0x%x) or product (0x%x vs 0x%x)\n", + dd.wMid, iter->mid, + dd.wPid, iter->pid); + } + } } if (rc == MMSYSERR_NOERROR && winetest_interactive) { @@ -139,6 +161,8 @@ trace(" Features: %s\n", dd.szFeatures); trace(" Supports %u formats\n", dd.cFormatTags); trace(" Supports %u filter formats\n", dd.cFilterTags); + trace(" Mid: 0x%x\n", dd.wMid); + trace(" Pid: 0x%x\n", dd.wPid); } /* try bad pointer */
9 years, 5 months
1
0
0
0
[akhaldi] 68453: [MSACM32] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jul 19 22:43:17 2015 New Revision: 68453 URL:
http://svn.reactos.org/svn/reactos?rev=68453&view=rev
Log: [MSACM32] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/win32/msacm32/driver.c trunk/reactos/dll/win32/msacm32/pcmconverter.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/msacm32/driver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msacm32/driver.c…
============================================================================== --- trunk/reactos/dll/win32/msacm32/driver.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msacm32/driver.c [iso-8859-1] Sun Jul 19 22:43:17 2015 @@ -149,7 +149,7 @@ } break; default: - ERR("invalid flag value 0x%08x for fdwAdd\n", fdwAdd & ACM_DRIVERADDF_TYPEMASK); + ERR("invalid flag value 0x%08x for fdwAdd\n", fdwAdd); return MMSYSERR_INVALFLAG; } Modified: trunk/reactos/dll/win32/msacm32/pcmconverter.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msacm32/pcmconve…
============================================================================== --- trunk/reactos/dll/win32/msacm32/pcmconverter.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msacm32/pcmconverter.c [iso-8859-1] Sun Jul 19 22:43:17 2015 @@ -704,15 +704,15 @@ add->fccType = ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC; add->fccComp = ACMDRIVERDETAILS_FCCCOMP_UNDEFINED; - add->wMid = 0xFF; - add->wPid = 0x00; + add->wMid = MM_MICROSOFT; + add->wPid = MM_MSFT_ACM_PCM; add->vdwACM = 0x01000000; add->vdwDriver = 0x01000000; add->fdwSupport = ACMDRIVERDETAILS_SUPPORTF_CONVERTER; add->cFormatTags = 1; add->cFilterTags = 0; add->hicon = NULL; - MultiByteToWideChar( CP_ACP, 0, "WINE-PCM", -1, + MultiByteToWideChar( CP_ACP, 0, "MS-PCM", -1, add->szShortName, sizeof(add->szShortName)/sizeof(WCHAR) ); MultiByteToWideChar( CP_ACP, 0, "Wine PCM converter", -1, add->szLongName, sizeof(add->szLongName)/sizeof(WCHAR) ); Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jul 19 22:43:17 2015 @@ -105,7 +105,7 @@ reactos/dll/win32/mmdevapi # Synced to WineStaging-1.7.47 reactos/dll/win32/mpr # Synced to WineStaging-1.7.47 reactos/dll/win32/mprapi # Synced to WineStaging-1.7.37 -reactos/dll/win32/msacm32 # Synced to WineStaging-1.7.37 +reactos/dll/win32/msacm32 # Synced to WineStaging-1.7.47 reactos/dll/win32/msacm32/msacm32.drv # Synced to WineStaging-1.7.37 reactos/dll/win32/msadp32.acm # Synced to WineStaging-1.7.37 reactos/dll/win32/mscat32 # Synced to WineStaging-1.7.37
9 years, 5 months
1
0
0
0
[akhaldi] 68452: [MPR_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jul 19 22:42:18 2015 New Revision: 68452 URL:
http://svn.reactos.org/svn/reactos?rev=68452&view=rev
Log: [MPR_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/rostests/winetests/mpr/CMakeLists.txt trunk/rostests/winetests/mpr/mpr.c Modified: trunk/rostests/winetests/mpr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mpr/CMakeLists.…
============================================================================== --- trunk/rostests/winetests/mpr/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/mpr/CMakeLists.txt [iso-8859-1] Sun Jul 19 22:42:18 2015 @@ -1,5 +1,8 @@ -add_definitions(-DUSE_WINE_TODOS) +add_definitions( + -DUSE_WINE_TODOS + -D_WINE) + add_executable(mpr_winetest mpr.c testlist.c) set_module_type(mpr_winetest win32cui) add_importlibs(mpr_winetest mpr msvcrt kernel32) Modified: trunk/rostests/winetests/mpr/mpr.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mpr/mpr.c?rev=6…
============================================================================== --- trunk/rostests/winetests/mpr/mpr.c [iso-8859-1] (original) +++ trunk/rostests/winetests/mpr/mpr.c [iso-8859-1] Sun Jul 19 22:42:18 2015 @@ -160,8 +160,106 @@ } } +static DWORD (WINAPI *pWNetCachePassword)( LPSTR, WORD, LPSTR, WORD, BYTE, WORD ); +static DWORD (WINAPI *pWNetGetCachedPassword)( LPSTR, WORD, LPSTR, LPWORD, BYTE ); +static UINT (WINAPI *pWNetEnumCachedPasswords)( LPSTR, WORD, BYTE, ENUMPASSWORDPROC, DWORD); +static UINT (WINAPI *pWNetRemoveCachedPassword)( LPSTR, WORD, BYTE ); + +#define MPR_GET_PROC(func) \ + p ## func = (void*)GetProcAddress(hmpr, #func) + +static void InitFunctionPtrs(void) +{ + HMODULE hmpr = GetModuleHandleA("mpr.dll"); + + MPR_GET_PROC(WNetCachePassword); + MPR_GET_PROC(WNetGetCachedPassword); + MPR_GET_PROC(WNetEnumCachedPasswords); + MPR_GET_PROC(WNetRemoveCachedPassword); +} + +static const char* m_resource = "wine-test-resource"; +static const char* m_password = "wine-test-password"; +static const BYTE m_type = 1; +static const DWORD m_param = 8; +static BOOL m_callback_reached; + +static BOOL CALLBACK enum_password_proc(PASSWORD_CACHE_ENTRY* pce, DWORD param) +{ + WORD size = 0; + char* buf; + + ok(param == m_param, "param, got %d, got %d\n", param, m_param); + + size = offsetof( PASSWORD_CACHE_ENTRY, abResource[pce->cbResource + pce->cbPassword] ); + ok(pce->cbEntry == size, "cbEntry, got %d, expected %d\n", pce->cbEntry, size); + ok(pce->cbResource == strlen(m_resource), "cbResource, got %d\n", pce->cbResource); + ok(pce->cbPassword == strlen(m_password), "cbPassword, got %d\n", pce->cbPassword); + ok(pce->iEntry == 0, "iEntry, got %d, got %d\n", pce->iEntry, 0); + ok(pce->nType == m_type, "nType, got %d, got %d\n", pce->nType, m_type); + + buf = (char*)pce->abResource; + ok(strncmp(buf, m_resource, pce->cbResource)==0, "enumerated ressource differs, got %.*s, expected %s\n", pce->cbResource, buf, m_resource); + + buf += pce->cbResource; + ok(strncmp(buf, m_password, pce->cbPassword)==0, "enumerated ressource differs, got %.*s, expected %s\n", pce->cbPassword, buf, m_password); + + m_callback_reached = 1; + return TRUE; +} + +static void test_WNetCachePassword(void) +{ + char resource_buf[32]; + char password_buf[32]; + char prefix_buf[32]; + WORD resource_len; + WORD password_len; + WORD prefix_len; + DWORD ret; + + InitFunctionPtrs(); + + if (pWNetCachePassword && + pWNetGetCachedPassword && + pWNetEnumCachedPasswords && + pWNetRemoveCachedPassword) + { + strcpy(resource_buf, m_resource); + resource_len = strlen(m_resource); + strcpy(password_buf, m_password); + password_len = strlen(m_password); + ret = pWNetCachePassword(resource_buf, resource_len, password_buf, password_len, m_type, 0); + ok(ret == WN_SUCCESS, "WNetCachePassword failed: got %d, expected %d\n", ret, WN_SUCCESS); + + strcpy(resource_buf, m_resource); + resource_len = strlen(m_resource); + strcpy(password_buf, "------"); + password_len = sizeof(password_buf); + ret = pWNetGetCachedPassword(resource_buf, resource_len, password_buf, &password_len, m_type); + ok(ret == WN_SUCCESS, "WNetGetCachedPassword failed: got %d, expected %d\n", ret, WN_SUCCESS); + ok(password_len == strlen(m_password), "password length different, got %d\n", password_len); + ok(strncmp(password_buf, m_password, password_len)==0, "passwords different, got %.*s, expected %s\n", password_len, password_buf, m_password); + + prefix_len = 9; + strcpy(prefix_buf, m_resource); + prefix_buf[prefix_len] = '0'; + ret = pWNetEnumCachedPasswords(prefix_buf, prefix_len, m_type, enum_password_proc, m_param); + ok(ret == WN_SUCCESS, "WNetEnumCachedPasswords failed: got %d, expected %d\n", ret, WN_SUCCESS); + ok(m_callback_reached == 1, "callback was not reached\n"); + + strcpy(resource_buf, m_resource); + resource_len = strlen(m_resource); + ret = pWNetRemoveCachedPassword(resource_buf, resource_len, m_type); + ok(ret == WN_SUCCESS, "WNetRemoveCachedPassword failed: got %d, expected %d\n", ret, WN_SUCCESS); + } else { + win_skip("WNetCachePassword() is not supported.\n"); + } +} + START_TEST(mpr) { test_WNetGetUniversalName(); test_WNetGetRemoteName(); -} + test_WNetCachePassword(); +}
9 years, 5 months
1
0
0
0
[akhaldi] 68451: [MPR] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jul 19 22:41:45 2015 New Revision: 68451 URL:
http://svn.reactos.org/svn/reactos?rev=68451&view=rev
Log: [MPR] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/win32/mpr/pwcache.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/mpr/pwcache.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/pwcache.c?re…
============================================================================== --- trunk/reactos/dll/win32/mpr/pwcache.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mpr/pwcache.c [iso-8859-1] Sun Jul 19 22:41:45 2015 @@ -299,7 +299,8 @@ entry->cbPassword = data_sz; entry->iEntry = i; entry->nType = nType; - r = RegEnumValueA( hkey, i, NULL, &val_sz, NULL, &type, + size = sizeof val; + r = RegEnumValueA( hkey, i, val, &size, NULL, &type, &entry->abResource[val_sz], &data_sz ); if( r == ERROR_SUCCESS ) enumPasswordProc( entry, param ); Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jul 19 22:41:45 2015 @@ -103,7 +103,7 @@ reactos/dll/win32/mgmtapi # Synced to WineStaging-1.7.37 reactos/dll/win32/mlang # Synced to WineStaging-1.7.37 reactos/dll/win32/mmdevapi # Synced to WineStaging-1.7.47 -reactos/dll/win32/mpr # Synced to WineStaging-1.7.37 +reactos/dll/win32/mpr # Synced to WineStaging-1.7.47 reactos/dll/win32/mprapi # Synced to WineStaging-1.7.37 reactos/dll/win32/msacm32 # Synced to WineStaging-1.7.37 reactos/dll/win32/msacm32/msacm32.drv # Synced to WineStaging-1.7.37
9 years, 5 months
1
0
0
0
[akhaldi] 68450: [MMDEVAPI_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jul 19 22:41:06 2015 New Revision: 68450 URL:
http://svn.reactos.org/svn/reactos?rev=68450&view=rev
Log: [MMDEVAPI_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/rostests/winetests/mmdevapi/CMakeLists.txt trunk/rostests/winetests/mmdevapi/capture.c trunk/rostests/winetests/mmdevapi/propstore.c trunk/rostests/winetests/mmdevapi/render.c Modified: trunk/rostests/winetests/mmdevapi/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mmdevapi/CMakeL…
============================================================================== --- trunk/rostests/winetests/mmdevapi/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/mmdevapi/CMakeLists.txt [iso-8859-1] Sun Jul 19 22:41:06 2015 @@ -1,3 +1,6 @@ + +remove_definitions(-D_WIN32_WINNT=0x502) +add_definitions(-D_WIN32_WINNT=0x600) add_executable(mmdevapi_winetest capture.c @@ -9,5 +12,5 @@ set_module_type(mmdevapi_winetest win32cui) target_link_libraries(mmdevapi_winetest uuid) -add_importlibs(mmdevapi_winetest ole32 user32 msvcrt kernel32 ntdll) +add_importlibs(mmdevapi_winetest ole32 user32 advapi32 msvcrt kernel32 ntdll) add_cd_file(TARGET mmdevapi_winetest DESTINATION reactos/bin FOR all) Modified: trunk/rostests/winetests/mmdevapi/capture.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mmdevapi/captur…
============================================================================== --- trunk/rostests/winetests/mmdevapi/capture.c [iso-8859-1] (original) +++ trunk/rostests/winetests/mmdevapi/capture.c [iso-8859-1] Sun Jul 19 22:41:06 2015 @@ -948,15 +948,15 @@ hr = IAudioStreamVolume_GetChannelVolume(asv, 0, &vol); ok(hr == S_OK, "ASV_GetChannelVolume failed: %08x\n", hr); - ok(fabsf(vol - 0.2) < 0.05f, "ASV_GetChannelVolume gave wrong volume: %f\n", vol); + ok(fabsf(vol - 0.2f) < 0.05f, "ASV_GetChannelVolume gave wrong volume: %f\n", vol); hr = IChannelAudioVolume_GetChannelVolume(cav, 0, &vol); ok(hr == S_OK, "CAV_GetChannelVolume failed: %08x\n", hr); - ok(fabsf(vol - 0.4) < 0.05f, "CAV_GetChannelVolume gave wrong volume: %f\n", vol); + ok(fabsf(vol - 0.4f) < 0.05f, "CAV_GetChannelVolume gave wrong volume: %f\n", vol); hr = ISimpleAudioVolume_GetMasterVolume(sav, &vol); ok(hr == S_OK, "SAV_GetMasterVolume failed: %08x\n", hr); - ok(fabsf(vol - 0.6) < 0.05f, "SAV_GetMasterVolume gave wrong volume: %f\n", vol); + ok(fabsf(vol - 0.6f) < 0.05f, "SAV_GetMasterVolume gave wrong volume: %f\n", vol); hr = IMMDevice_Activate(dev, &IID_IAudioClient, CLSCTX_INPROC_SERVER, NULL, (void**)&ac2); @@ -976,7 +976,7 @@ hr = IChannelAudioVolume_GetChannelVolume(cav2, 0, &vol); ok(hr == S_OK, "CAV_GetChannelVolume failed: %08x\n", hr); - ok(fabsf(vol - 0.4) < 0.05f, "CAV_GetChannelVolume gave wrong volume: %f\n", vol); + ok(fabsf(vol - 0.4f) < 0.05f, "CAV_GetChannelVolume gave wrong volume: %f\n", vol); hr = IAudioStreamVolume_GetChannelVolume(asv2, 0, &vol); ok(hr == S_OK, "ASV_GetChannelVolume failed: %08x\n", hr); Modified: trunk/rostests/winetests/mmdevapi/propstore.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mmdevapi/propst…
============================================================================== --- trunk/rostests/winetests/mmdevapi/propstore.c [iso-8859-1] (original) +++ trunk/rostests/winetests/mmdevapi/propstore.c [iso-8859-1] Sun Jul 19 22:41:06 2015 @@ -30,6 +30,19 @@ #include "mmdeviceapi.h" #include "devpkey.h" +static BOOL (WINAPI *pIsWow64Process)(HANDLE, BOOL *); + +static const WCHAR software_renderW[] = + { 'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s','\\', + 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', + 'M','M','D','e','v','i','c','e','s','\\', + 'A','u','d','i','o','\\', + 'R','e','n','d','e','r',0 }; +static const WCHAR propertiesW[] = {'P','r','o','p','e','r','t','i','e','s',0}; + + static void test_propertystore(IPropertyStore *store) { HRESULT hr; @@ -109,12 +122,86 @@ ok(found_desc == TRUE, "DEVPKEY_Device_DeviceDesc not found\n"); } +static void test_setvalue_on_wow64(IPropertyStore *store) +{ + PROPVARIANT pv; + HRESULT hr; + LONG ret; + WCHAR *guidW; + HKEY root, props, devkey; + DWORD type, regval, size; + + static const PROPERTYKEY PKEY_Bogus = { + {0x1da5d803, 0xd492, 0x4edd, {0x8c, 0x23, 0xe0, 0xc0, 0xff, 0xee, 0x7f, 0x00}}, 0x7f + }; + static const WCHAR bogusW[] = {'{','1','D','A','5','D','8','0','3','-','D','4','9','2','-','4','E','D','D','-','8','C','2','3','-','E','0','C','0','F','F','E','E','7','F','0','0','}',',','1','2','7',0}; + + PropVariantInit(&pv); + + pv.vt = VT_EMPTY; + hr = IPropertyStore_GetValue(store, &PKEY_AudioEndpoint_GUID, &pv); + ok(hr == S_OK, "Failed to get Endpoint GUID: %08x\n", hr); + + guidW = pv.u.pwszVal; + + pv.vt = VT_UI4; + pv.u.ulVal = 0xAB; + + hr = IPropertyStore_SetValue(store, &PKEY_Bogus, &pv); + ok(hr == S_OK || hr == E_ACCESSDENIED, "SetValue failed: %08x\n", hr); + if (hr != S_OK) + { + win_skip("Missing permission to write to registry\n"); + return; + } + + pv.u.ulVal = 0x00; + + hr = IPropertyStore_GetValue(store, &PKEY_Bogus, &pv); + ok(hr == S_OK, "GetValue failed: %08x\n", hr); + ok(pv.u.ulVal == 0xAB, "Got wrong value: 0x%x\n", pv.u.ulVal); + + /* should find the key in 64-bit view */ + ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE, software_renderW, 0, KEY_READ|KEY_WOW64_64KEY, &root); + ok(ret == ERROR_SUCCESS, "Couldn't open mmdevices Render key: %u\n", ret); + + ret = RegOpenKeyExW(root, guidW, 0, KEY_READ|KEY_WOW64_64KEY, &devkey); + ok(ret == ERROR_SUCCESS, "Couldn't open mmdevice guid key: %u\n", ret); + + ret = RegOpenKeyExW(devkey, propertiesW, 0, KEY_READ|KEY_WOW64_64KEY, &props); + ok(ret == ERROR_SUCCESS, "Couldn't open mmdevice property key: %u\n", ret); + + /* Note: the registry key exists even without calling IPropStore::Commit */ + size = sizeof(regval); + ret = RegGetValueW(props, NULL, bogusW, RRF_RT_DWORD, &type, ®val, &size); + ok(ret == ERROR_SUCCESS, "Couldn't get bogus propertykey value: %u\n", ret); + ok(type == REG_DWORD, "Got wrong value type: %u\n", type); + ok(regval == 0xAB, "Got wrong value: 0x%x\n", regval); + + RegCloseKey(props); + RegCloseKey(devkey); + RegCloseKey(root); + + CoTaskMemFree(guidW); + + /* should NOT find the key in 32-bit view */ + ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE, software_renderW, 0, KEY_READ, &root); + ok(ret == ERROR_FILE_NOT_FOUND, "Wrong error when opening mmdevices Render key: %u\n", ret); +} + START_TEST(propstore) { HRESULT hr; IMMDeviceEnumerator *mme = NULL; IMMDevice *dev = NULL; IPropertyStore *store; + BOOL is_wow64 = FALSE; + HMODULE hk32 = GetModuleHandleA("kernel32.dll"); + + pIsWow64Process = (void *)GetProcAddress(hk32, "IsWow64Process"); + + if (pIsWow64Process) + pIsWow64Process(GetCurrentProcess(), &is_wow64); CoInitializeEx(NULL, COINIT_MULTITHREADED); hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, (void**)&mme); @@ -149,13 +236,17 @@ ok(hr == E_POINTER, "Wrong hr returned: %08x\n", hr); store = NULL; - hr = IMMDevice_OpenPropertyStore(dev, STGM_READ, &store); + hr = IMMDevice_OpenPropertyStore(dev, STGM_READWRITE, &store); + if(hr == E_ACCESSDENIED) + hr = IMMDevice_OpenPropertyStore(dev, STGM_READ, &store); ok(hr == S_OK, "Opening valid store returned %08x\n", hr); if (store) { test_propertystore(store); test_deviceinterface(store); test_getat(store); + if (is_wow64) + test_setvalue_on_wow64(store); IPropertyStore_Release(store); } IMMDevice_Release(dev); Modified: trunk/rostests/winetests/mmdevapi/render.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mmdevapi/render…
============================================================================== --- trunk/rostests/winetests/mmdevapi/render.c [iso-8859-1] (original) +++ trunk/rostests/winetests/mmdevapi/render.c [iso-8859-1] Sun Jul 19 22:41:06 2015 @@ -1226,7 +1226,6 @@ last = pos; Sleep(100); - slept += 100; hr = IAudioClock_GetPosition(acl, &pos, NULL); ok(hr == S_OK, "GetPosition failed: %08x\n", hr); @@ -2018,15 +2017,15 @@ hr = IAudioStreamVolume_GetChannelVolume(asv, 0, &vol); ok(hr == S_OK, "ASV_GetChannelVolume failed: %08x\n", hr); - ok(fabsf(vol - 0.2) < 0.05f, "ASV_GetChannelVolume gave wrong volume: %f\n", vol); + ok(fabsf(vol - 0.2f) < 0.05f, "ASV_GetChannelVolume gave wrong volume: %f\n", vol); hr = IChannelAudioVolume_GetChannelVolume(cav, 0, &vol); ok(hr == S_OK, "CAV_GetChannelVolume failed: %08x\n", hr); - ok(fabsf(vol - 0.4) < 0.05f, "CAV_GetChannelVolume gave wrong volume: %f\n", vol); + ok(fabsf(vol - 0.4f) < 0.05f, "CAV_GetChannelVolume gave wrong volume: %f\n", vol); hr = ISimpleAudioVolume_GetMasterVolume(sav, &vol); ok(hr == S_OK, "SAV_GetMasterVolume failed: %08x\n", hr); - ok(fabsf(vol - 0.6) < 0.05f, "SAV_GetMasterVolume gave wrong volume: %f\n", vol); + ok(fabsf(vol - 0.6f) < 0.05f, "SAV_GetMasterVolume gave wrong volume: %f\n", vol); hr = IMMDevice_Activate(dev, &IID_IAudioClient, CLSCTX_INPROC_SERVER, NULL, (void**)&ac2); @@ -2052,7 +2051,7 @@ hr = IChannelAudioVolume_GetChannelVolume(cav2, 0, &vol); ok(hr == S_OK, "CAV_GetChannelVolume failed: %08x\n", hr); - ok(fabsf(vol - 0.4) < 0.05f, "CAV_GetChannelVolume gave wrong volume: %f\n", vol); + ok(fabsf(vol - 0.4f) < 0.05f, "CAV_GetChannelVolume gave wrong volume: %f\n", vol); hr = IAudioStreamVolume_GetChannelVolume(asv2, 0, &vol); ok(hr == S_OK, "ASV_GetChannelVolume failed: %08x\n", hr);
9 years, 5 months
1
0
0
0
[akhaldi] 68449: [MMDEVAPI] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jul 19 22:39:34 2015 New Revision: 68449 URL:
http://svn.reactos.org/svn/reactos?rev=68449&view=rev
Log: [MMDEVAPI] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/win32/mmdevapi/audiovolume.c trunk/reactos/dll/win32/mmdevapi/devenum.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/mmdevapi/audiovolume.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mmdevapi/audiovo…
============================================================================== --- trunk/reactos/dll/win32/mmdevapi/audiovolume.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mmdevapi/audiovolume.c [iso-8859-1] Sun Jul 19 22:39:34 2015 @@ -18,8 +18,6 @@ #include "mmdevapi.h" -static const IAudioEndpointVolumeExVtbl AEVImpl_Vtbl; - typedef struct AEVImpl { IAudioEndpointVolumeEx IAudioEndpointVolumeEx_iface; LONG ref; @@ -32,20 +30,6 @@ return CONTAINING_RECORD(iface, AEVImpl, IAudioEndpointVolumeEx_iface); } -HRESULT AudioEndpointVolume_Create(MMDevice *parent, IAudioEndpointVolume **ppv) -{ - AEVImpl *This; - This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*This)); - *ppv = (IAudioEndpointVolume*)This; - if (!This) - return E_OUTOFMEMORY; - This->IAudioEndpointVolumeEx_iface.lpVtbl = &AEVImpl_Vtbl; - This->ref = 1; - This->level = 1.0f; - This->mute = FALSE; - return S_OK; -} - static void AudioEndpointVolume_Destroy(AEVImpl *This) { HeapFree(GetProcessHeap(), 0, This); @@ -61,7 +45,7 @@ if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IAudioEndpointVolume) || IsEqualIID(riid, &IID_IAudioEndpointVolumeEx)) { - *ppv = This; + *ppv = &This->IAudioEndpointVolumeEx_iface; } else return E_NOINTERFACE; @@ -291,3 +275,20 @@ AEV_GetVolumeRange, AEV_GetVolumeRangeChannel }; + +HRESULT AudioEndpointVolume_Create(MMDevice *parent, IAudioEndpointVolume **ppv) +{ + AEVImpl *This; + + *ppv = NULL; + This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + if (!This) + return E_OUTOFMEMORY; + This->IAudioEndpointVolumeEx_iface.lpVtbl = &AEVImpl_Vtbl; + This->ref = 1; + This->level = 1.0f; + This->mute = FALSE; + + *ppv = (IAudioEndpointVolume*)&This->IAudioEndpointVolumeEx_iface; + return S_OK; +} Modified: trunk/reactos/dll/win32/mmdevapi/devenum.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mmdevapi/devenum…
============================================================================== --- trunk/reactos/dll/win32/mmdevapi/devenum.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mmdevapi/devenum.c [iso-8859-1] Sun Jul 19 22:39:34 2015 @@ -125,12 +125,12 @@ LONG ret; HKEY key; StringFromGUID2(guid, buffer, 39); - if ((ret = RegOpenKeyExW(flow == eRender ? key_render : key_capture, buffer, 0, KEY_READ|KEY_WRITE, &key)) != ERROR_SUCCESS) + if ((ret = RegOpenKeyExW(flow == eRender ? key_render : key_capture, buffer, 0, KEY_READ|KEY_WRITE|KEY_WOW64_64KEY, &key)) != ERROR_SUCCESS) { WARN("Opening key %s failed with %u\n", debugstr_w(buffer), ret); return E_FAIL; } - ret = RegOpenKeyExW(key, reg_properties, 0, KEY_READ|KEY_WRITE, propkey); + ret = RegOpenKeyExW(key, reg_properties, 0, KEY_READ|KEY_WRITE|KEY_WOW64_64KEY, propkey); RegCloseKey(key); if (ret != ERROR_SUCCESS) { @@ -327,11 +327,11 @@ else root = key_capture; - if (RegCreateKeyExW(root, guidstr, 0, NULL, 0, KEY_WRITE|KEY_READ, NULL, &key, NULL) == ERROR_SUCCESS) + if (RegCreateKeyExW(root, guidstr, 0, NULL, 0, KEY_WRITE|KEY_READ|KEY_WOW64_64KEY, NULL, &key, NULL) == ERROR_SUCCESS) { HKEY keyprop; RegSetValueExW(key, reg_devicestate, 0, REG_DWORD, (const BYTE*)&state, sizeof(DWORD)); - if (!RegCreateKeyExW(key, reg_properties, 0, NULL, 0, KEY_WRITE|KEY_READ, NULL, &keyprop, NULL)) + if (!RegCreateKeyExW(key, reg_properties, 0, NULL, 0, KEY_WRITE|KEY_READ|KEY_WOW64_64KEY, NULL, &keyprop, NULL)) { PROPVARIANT pv; @@ -388,11 +388,11 @@ LONG ret; DWORD curflow; - ret = RegCreateKeyExW(HKEY_LOCAL_MACHINE, software_mmdevapi, 0, NULL, 0, KEY_WRITE|KEY_READ, NULL, &root, NULL); + ret = RegCreateKeyExW(HKEY_LOCAL_MACHINE, software_mmdevapi, 0, NULL, 0, KEY_WRITE|KEY_READ|KEY_WOW64_64KEY, NULL, &root, NULL); if (ret == ERROR_SUCCESS) - ret = RegCreateKeyExW(root, reg_capture, 0, NULL, 0, KEY_READ|KEY_WRITE, NULL, &key_capture, NULL); + ret = RegCreateKeyExW(root, reg_capture, 0, NULL, 0, KEY_READ|KEY_WRITE|KEY_WOW64_64KEY, NULL, &key_capture, NULL); if (ret == ERROR_SUCCESS) - ret = RegCreateKeyExW(root, reg_render, 0, NULL, 0, KEY_READ|KEY_WRITE, NULL, &key_render, NULL); + ret = RegCreateKeyExW(root, reg_render, 0, NULL, 0, KEY_READ|KEY_WRITE|KEY_WOW64_64KEY, NULL, &key_render, NULL); RegCloseKey(root); cur = key_capture; curflow = eCapture; @@ -467,6 +467,7 @@ &PKEY_AudioEngine_DeviceFormat, &pv); MMDevice_SetPropValue(&dev->devguid, dev->flow, &PKEY_AudioEngine_OEMFormat, &pv); + CoTaskMemFree(fmt); return S_OK; } @@ -532,7 +533,7 @@ *ppv = NULL; if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IMMDevice)) - *ppv = This; + *ppv = &This->IMMDevice_iface; else if (IsEqualIID(riid, &IID_IMMEndpoint)) *ppv = &This->IMMEndpoint_iface; if (*ppv) @@ -627,8 +628,7 @@ IDirectSound_Release((IDirectSound*)*ppv); } } - else if (IsEqualIID(riid, &IID_IDirectSoundCapture) - || IsEqualIID(riid, &IID_IDirectSoundCapture8)) + else if (IsEqualIID(riid, &IID_IDirectSoundCapture)) { if (This->flow == eCapture) hr = CoCreateInstance(&CLSID_DirectSoundCapture8, NULL, clsctx, riid, ppv); @@ -779,7 +779,7 @@ return E_POINTER; if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IMMDeviceCollection)) - *ppv = This; + *ppv = &This->IMMDeviceCollection_iface; else *ppv = NULL; if (!*ppv) @@ -879,7 +879,7 @@ load_driver_devices(eRender); load_driver_devices(eCapture); } - return IUnknown_QueryInterface((IUnknown*)This, riid, ppv); + return IMMDeviceEnumerator_QueryInterface(&This->IMMDeviceEnumerator_iface, riid, ppv); } void MMDevEnum_Free(void) @@ -902,7 +902,7 @@ return E_POINTER; if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IMMDeviceEnumerator)) - *ppv = This; + *ppv = &This->IMMDeviceEnumerator_iface; else *ppv = NULL; if (!*ppv) @@ -1327,7 +1327,7 @@ return E_POINTER; if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPropertyStore)) - *ppv = This; + *ppv = &This->IPropertyStore_iface; else *ppv = NULL; if (!*ppv) Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jul 19 22:39:34 2015 @@ -102,7 +102,7 @@ reactos/dll/win32/mciwave # Synced to WineStaging-1.7.37 reactos/dll/win32/mgmtapi # Synced to WineStaging-1.7.37 reactos/dll/win32/mlang # Synced to WineStaging-1.7.37 -reactos/dll/win32/mmdevapi # Synced to WineStaging-1.7.37 +reactos/dll/win32/mmdevapi # Synced to WineStaging-1.7.47 reactos/dll/win32/mpr # Synced to WineStaging-1.7.37 reactos/dll/win32/mprapi # Synced to WineStaging-1.7.37 reactos/dll/win32/msacm32 # Synced to WineStaging-1.7.37
9 years, 5 months
1
0
0
0
[akhaldi] 68448: [MCIQTZ32] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jul 19 22:38:20 2015 New Revision: 68448 URL:
http://svn.reactos.org/svn/reactos?rev=68448&view=rev
Log: [MCIQTZ32] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/win32/mciqtz32/mciqtz.c trunk/reactos/dll/win32/mciqtz32/mciqtz_private.h trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/mciqtz32/mciqtz.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciqtz32/mciqtz.…
============================================================================== --- trunk/reactos/dll/win32/mciqtz32/mciqtz.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mciqtz32/mciqtz.c [iso-8859-1] Sun Jul 19 22:38:20 2015 @@ -33,7 +33,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mciqtz); -static DWORD MCIQTZ_mciClose(UINT, DWORD, LPMCI_GENERIC_PARMS); +static DWORD CALLBACK MCIQTZ_taskThread(LPVOID arg); static DWORD MCIQTZ_mciStop(UINT, DWORD, LPMCI_GENERIC_PARMS); /*======================================================================* @@ -70,6 +70,40 @@ return wma; } +/*************************************************************************** + * MCIQTZ_relayTaskMessage [internal] + */ +static LRESULT MCIQTZ_relayTaskMessage(DWORD_PTR dwDevID, UINT wMsg, + DWORD dwFlags, LPARAM lpParms) +{ + WINE_MCIQTZ *wma; + LRESULT res; + HANDLE handles[2]; + DWORD ret; + TRACE("(%08lX, %08x, %08x, %08lx)\n", dwDevID, wMsg, dwFlags, lpParms); + + wma = MCIQTZ_mciGetOpenDev(dwDevID); + if (!wma) + return MCIERR_INVALID_DEVICE_ID; + EnterCriticalSection(&wma->cs); + wma->task.devid = dwDevID; + wma->task.msg = wMsg; + wma->task.flags = dwFlags; + wma->task.parms = lpParms; + SetEvent(wma->task.notify); + handles[0] = wma->task.done; + handles[1] = wma->task.thread; + ret = WaitForMultipleObjects(sizeof(handles)/sizeof(handles[0]), handles, + FALSE, INFINITE); + if (ret == WAIT_OBJECT_0) + res = wma->task.res; + else + res = MCIERR_INTERNAL; + LeaveCriticalSection(&wma->cs); + + return res; +} + /************************************************************************** * MCIQTZ_drvOpen [internal] */ @@ -88,12 +122,26 @@ if (!wma) return 0; + wma->stop_event = CreateEventW(NULL, FALSE, FALSE, NULL); + wma->task.notify = CreateEventW(NULL, FALSE, FALSE, NULL); + if (!wma->task.notify) goto err; + wma->task.done = CreateEventW(NULL, FALSE, FALSE, NULL); + if (!wma->task.done) goto err; + wma->task.thread = CreateThread(NULL, 0, MCIQTZ_taskThread, &wma->task, 0, NULL); + if (!wma->task.thread) goto err; + InitializeCriticalSection(&wma->cs); + wma->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": WINE_MCIQTZ"); modp->wType = MCI_DEVTYPE_DIGITAL_VIDEO; wma->wDevID = modp->wDeviceID; modp->wCustomCommandTable = wma->command_table = mciLoadCommandResource(MCIQTZ_hInstance, mciAviWStr, 0); mciSetDriverData(wma->wDevID, (DWORD_PTR)wma); return modp->wDeviceID; +err: + if (wma->task.notify) CloseHandle(wma->task.notify); + if (wma->task.done) CloseHandle(wma->task.done); + HeapFree(GetProcessHeap(), 0, wma); + return 0; } /************************************************************************** @@ -109,10 +157,17 @@ if (wma) { /* finish all outstanding things */ - MCIQTZ_mciClose(dwDevID, MCI_WAIT, NULL); + MCIQTZ_relayTaskMessage(dwDevID, MCI_CLOSE_DRIVER, MCI_WAIT, 0); mciFreeCommandResource(wma->command_table); + MCIQTZ_relayTaskMessage(dwDevID, MCI_CLOSE, MCI_WAIT, 0); + WaitForSingleObject(wma->task.thread, INFINITE); + CloseHandle(wma->task.notify); + CloseHandle(wma->task.done); + CloseHandle(wma->task.thread); + DeleteCriticalSection(&wma->cs); mciSetDriverData(dwDevID, 0); + CloseHandle(wma->stop_event); HeapFree(GetProcessHeap(), 0, wma); return 1; } @@ -138,6 +193,20 @@ MessageBoxA(0, "Sample QTZ Wine Driver !", "MM-Wine Driver", MB_OK); return 1; +} + +/************************************************************************** + * MCIQTZ_mciNotify [internal] + * + * Notifications in MCI work like a 1-element queue. + * Each new notification request supersedes the previous one. + */ +static void MCIQTZ_mciNotify(DWORD_PTR hWndCallBack, WINE_MCIQTZ* wma, UINT wStatus) +{ + MCIDEVICEID wDevID = wma->notify_devid; + HANDLE old = InterlockedExchangePointer(&wma->callback, NULL); + if (old) mciDriverNotify(old, wDevID, MCI_NOTIFY_SUPERSEDED); + mciDriverNotify(HWND_32(LOWORD(hWndCallBack)), wDevID, wStatus); } /*************************************************************************** @@ -153,9 +222,6 @@ TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpOpenParms); - if (!lpOpenParms) - return MCIERR_NULL_PARAMETER_BLOCK; - wma = MCIQTZ_mciGetOpenDev(wDevID); if (!wma) return MCIERR_INVALID_DEVICE_ID; @@ -198,6 +264,12 @@ hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IBasicVideo, (void**)&wma->vidbasic); if (FAILED(hr)) { TRACE("Cannot get IBasicVideo interface (hr = %x)\n", hr); + goto err; + } + + hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IBasicAudio, (void**)&wma->audio); + if (FAILED(hr)) { + TRACE("Cannot get IBasicAudio interface (hr = %x)\n", hr); goto err; } @@ -243,6 +315,9 @@ return 0; err: + if (wma->audio) + IBasicAudio_Release(wma->audio); + wma->audio = NULL; if (wma->vidbasic) IBasicVideo_Release(wma->vidbasic); wma->vidbasic = NULL; @@ -287,6 +362,7 @@ if (wma->opened) { IVideoWindow_Release(wma->vidwin); IBasicVideo_Release(wma->vidbasic); + IBasicAudio_Release(wma->audio); IMediaSeeking_Release(wma->seek); IMediaEvent_Release(wma->mevent); IGraphBuilder_Release(wma->pgraph); @@ -300,6 +376,63 @@ } /*************************************************************************** + * MCIQTZ_notifyThread [internal] + */ +static DWORD CALLBACK MCIQTZ_notifyThread(LPVOID parm) +{ + WINE_MCIQTZ* wma = (WINE_MCIQTZ *)parm; + HRESULT hr; + HANDLE handle[2]; + DWORD n = 0, ret = 0; + + handle[n++] = wma->stop_event; + IMediaEvent_GetEventHandle(wma->mevent, (OAEVENT *)&handle[n++]); + + for (;;) { + DWORD r; + HANDLE old; + + r = WaitForMultipleObjects(n, handle, FALSE, INFINITE); + if (r == WAIT_OBJECT_0) { + TRACE("got stop event\n"); + old = InterlockedExchangePointer(&wma->callback, NULL); + if (old) + mciDriverNotify(old, wma->notify_devid, MCI_NOTIFY_ABORTED); + break; + } + else if (r == WAIT_OBJECT_0+1) { + LONG event_code; + LONG_PTR p1, p2; + do { + hr = IMediaEvent_GetEvent(wma->mevent, &event_code, &p1, &p2, 0); + if (SUCCEEDED(hr)) { + TRACE("got event_code = 0x%02x\n", event_code); + IMediaEvent_FreeEventParams(wma->mevent, event_code, p1, p2); + } + } while (hr == S_OK && event_code != EC_COMPLETE); + if (hr == S_OK && event_code == EC_COMPLETE) { + old = InterlockedExchangePointer(&wma->callback, NULL); + if (old) + mciDriverNotify(old, wma->notify_devid, MCI_NOTIFY_SUCCESSFUL); + break; + } + } + else { + TRACE("Unknown error (%d)\n", (int)r); + break; + } + } + + hr = IMediaControl_Stop(wma->pmctrl); + if (FAILED(hr)) { + TRACE("Cannot stop filtergraph (hr = %x)\n", hr); + ret = MCIERR_INTERNAL; + } + + return ret; +} + +/*************************************************************************** * MCIQTZ_mciPlay [internal] */ static DWORD MCIQTZ_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms) @@ -312,12 +445,17 @@ TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms); - if (!lpParms) - return MCIERR_NULL_PARAMETER_BLOCK; - wma = MCIQTZ_mciGetOpenDev(wDevID); if (!wma) return MCIERR_INVALID_DEVICE_ID; + + ResetEvent(wma->stop_event); + if (dwFlags & MCI_NOTIFY) { + HANDLE old; + old = InterlockedExchangePointer(&wma->callback, HWND_32(LOWORD(lpParms->dwCallback))); + if (old) + mciDriverNotify(old, wma->notify_devid, MCI_NOTIFY_ABORTED); + } IMediaSeeking_GetTimeFormat(wma->seek, &format); if (dwFlags & MCI_FROM) { @@ -345,8 +483,11 @@ IVideoWindow_put_Visible(wma->vidwin, OATRUE); - if (dwFlags & MCI_NOTIFY) - mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)), wDevID, MCI_NOTIFY_SUCCESSFUL); + wma->thread = CreateThread(NULL, 0, MCIQTZ_notifyThread, wma, 0, NULL); + if (!wma->thread) { + TRACE("Can't create thread\n"); + return MCIERR_INTERNAL; + } return 0; } @@ -360,9 +501,6 @@ LONGLONG newpos; TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms); - - if (!lpParms) - return MCIERR_NULL_PARAMETER_BLOCK; wma = MCIQTZ_mciGetOpenDev(wDevID); if (!wma) @@ -390,7 +528,7 @@ } if (dwFlags & MCI_NOTIFY) - mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)), wDevID, MCI_NOTIFY_SUCCESSFUL); + MCIQTZ_mciNotify(lpParms->dwCallback, wma, MCI_NOTIFY_SUCCESSFUL); return 0; } @@ -401,7 +539,6 @@ static DWORD MCIQTZ_mciStop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms) { WINE_MCIQTZ* wma; - HRESULT hr; TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms); @@ -412,10 +549,11 @@ if (!wma->opened) return 0; - hr = IMediaControl_Stop(wma->pmctrl); - if (FAILED(hr)) { - TRACE("Cannot stop filtergraph (hr = %x)\n", hr); - return MCIERR_INTERNAL; + if (wma->thread) { + SetEvent(wma->stop_event); + WaitForSingleObject(wma->thread, INFINITE); + CloseHandle(wma->thread); + wma->thread = NULL; } if (!wma->parent) @@ -455,9 +593,6 @@ WINE_MCIQTZ* wma; TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms); - - if (!lpParms) - return MCIERR_NULL_PARAMETER_BLOCK; wma = MCIQTZ_mciGetOpenDev(wDevID); if (!wma) @@ -554,9 +689,6 @@ WINE_MCIQTZ* wma; TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms); - - if (!lpParms) - return MCIERR_NULL_PARAMETER_BLOCK; wma = MCIQTZ_mciGetOpenDev(wDevID); if (!wma) @@ -611,9 +743,6 @@ DWORD ret = MCI_INTEGER_RETURNED; TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms); - - if (!lpParms) - return MCIERR_NULL_PARAMETER_BLOCK; wma = MCIQTZ_mciGetOpenDev(wDevID); if (!wma) @@ -669,19 +798,9 @@ if (state == State_Stopped) lpParms->dwReturn = MAKEMCIRESOURCE(MCI_MODE_STOP, MCI_MODE_STOP); else if (state == State_Running) { - LONG code; - LONG_PTR p1, p2; - lpParms->dwReturn = MAKEMCIRESOURCE(MCI_MODE_PLAY, MCI_MODE_PLAY); - - do { - hr = IMediaEvent_GetEvent(wma->mevent, &code, &p1, &p2, 0); - if (hr == S_OK && code == EC_COMPLETE){ - lpParms->dwReturn = MAKEMCIRESOURCE(MCI_MODE_STOP, MCI_MODE_STOP); - IMediaControl_Stop(wma->pmctrl); - } - } while (hr == S_OK); - + if (!wma->thread || WaitForSingleObject(wma->thread, 0) == WAIT_OBJECT_0) + lpParms->dwReturn = MAKEMCIRESOURCE(MCI_MODE_STOP, MCI_MODE_STOP); } else if (state == State_Paused) lpParms->dwReturn = MAKEMCIRESOURCE(MCI_MODE_PAUSE, MCI_MODE_PAUSE); ret = MCI_RESOURCE_RETURNED; @@ -707,7 +826,7 @@ } if (dwFlags & MCI_NOTIFY) - mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)), wDevID, MCI_NOTIFY_SUCCESSFUL); + MCIQTZ_mciNotify(lpParms->dwCallback, wma, MCI_NOTIFY_SUCCESSFUL); return ret; } @@ -724,9 +843,6 @@ DWORD ret = MCIERR_UNRECOGNIZED_COMMAND; TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms); - - if (!lpParms) - return MCIERR_NULL_PARAMETER_BLOCK; wma = MCIQTZ_mciGetOpenDev(wDevID); if (!wma) @@ -790,8 +906,6 @@ TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms); - if (!lpParms) - return MCIERR_NULL_PARAMETER_BLOCK; if (!wma) return MCIERR_INVALID_DEVICE_ID; if (dwFlags & MCI_TEST) @@ -834,9 +948,6 @@ DWORD res = 0; TRACE("%04x, %08x, %p\n", wDevID, dwFlags, lpParms); - - if (!lpParms) - return MCIERR_NULL_PARAMETER_BLOCK; wma = MCIQTZ_mciGetOpenDev(wDevID); if (!wma) @@ -895,18 +1006,115 @@ static DWORD MCIQTZ_mciSetAudio(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SETAUDIO_PARMSW lpParms) { WINE_MCIQTZ *wma; - - FIXME("(%04x, %08x, %p) : stub\n", wDevID, dwFlags, lpParms); - - if (!lpParms) - return MCIERR_NULL_PARAMETER_BLOCK; + DWORD ret = 0; + + TRACE("(%04x, %08x, %p)\n", wDevID, dwFlags, lpParms); wma = MCIQTZ_mciGetOpenDev(wDevID); if (!wma) return MCIERR_INVALID_DEVICE_ID; - MCIQTZ_mciStop(wDevID, MCI_WAIT, NULL); - + if (!(dwFlags & MCI_DGV_SETAUDIO_ITEM)) { + FIXME("Unknown flags (%08x)\n", dwFlags); + return 0; + } + + if (dwFlags & MCI_DGV_SETAUDIO_ITEM) { + switch (lpParms->dwItem) { + case MCI_DGV_SETAUDIO_VOLUME: + if (dwFlags & MCI_DGV_SETAUDIO_VALUE) { + long vol = -10000; + HRESULT hr; + if (lpParms->dwValue > 1000) { + ret = MCIERR_OUTOFRANGE; + break; + } + if (dwFlags & MCI_TEST) + break; + vol += (long)lpParms->dwValue * 10; + hr = IBasicAudio_put_Volume(wma->audio, vol); + if (FAILED(hr)) { + WARN("Cannot set volume (hr = %x)\n", hr); + ret = MCIERR_INTERNAL; + } + } + break; + default: + FIXME("Unknown item %08x\n", lpParms->dwItem); + break; + } + } + + return ret; +} + +/*************************************************************************** + * MCIQTZ_taskThread [internal] + */ +static DWORD CALLBACK MCIQTZ_taskThread(LPVOID arg) +{ + WINE_MCIQTZ_TASK *task = (WINE_MCIQTZ_TASK *)arg; + + for (;;) { + DWORD ret = WaitForSingleObject(task->notify, INFINITE); + if (ret != WAIT_OBJECT_0) { + TRACE("Got error (%u)\n", ret); + continue; + } + + switch (task->msg) { + case MCI_OPEN_DRIVER: + task->res = MCIQTZ_mciOpen(task->devid, task->flags, (LPMCI_DGV_OPEN_PARMSW)task->parms); + break; + case MCI_CLOSE_DRIVER: + task->res = MCIQTZ_mciClose(task->devid, task->flags, (LPMCI_GENERIC_PARMS)task->parms); + break; + case MCI_PLAY: + task->res = MCIQTZ_mciPlay(task->devid, task->flags, (LPMCI_PLAY_PARMS)task->parms); + break; + case MCI_SEEK: + task->res = MCIQTZ_mciSeek(task->devid, task->flags, (LPMCI_SEEK_PARMS)task->parms); + break; + case MCI_STOP: + task->res = MCIQTZ_mciStop(task->devid, task->flags, (LPMCI_GENERIC_PARMS)task->parms); + break; + case MCI_PAUSE: + task->res = MCIQTZ_mciPause(task->devid, task->flags, (LPMCI_GENERIC_PARMS)task->parms); + break; + case MCI_GETDEVCAPS: + task->res = MCIQTZ_mciGetDevCaps(task->devid, task->flags, (LPMCI_GETDEVCAPS_PARMS)task->parms); + break; + case MCI_SET: + task->res = MCIQTZ_mciSet(task->devid, task->flags, (LPMCI_DGV_SET_PARMS)task->parms); + break; + case MCI_STATUS: + task->res = MCIQTZ_mciStatus(task->devid, task->flags, (LPMCI_DGV_STATUS_PARMSW)task->parms); + break; + case MCI_WHERE: + task->res = MCIQTZ_mciWhere(task->devid, task->flags, (LPMCI_DGV_RECT_PARMS)task->parms); + break; + case MCI_SETAUDIO: + task->res = MCIQTZ_mciSetAudio(task->devid, task->flags, (LPMCI_DGV_SETAUDIO_PARMSW)task->parms); + break; + case MCI_UPDATE: + task->res = MCIQTZ_mciUpdate(task->devid, task->flags, (LPMCI_DGV_UPDATE_PARMS)task->parms); + break; + case MCI_WINDOW: + task->res = MCIQTZ_mciWindow(task->devid, task->flags, (LPMCI_DGV_WINDOW_PARMSW)task->parms); + break; + case MCI_CLOSE: + /* Special internal message */ + SetEvent(task->done); + goto end; + default: + FIXME("Shouldn't receive another message (%04x)\n", task->msg); + task->res = MCIERR_UNRECOGNIZED_COMMAND; + break; + } + SetEvent(task->done); + } + +end: return 0; } @@ -941,22 +1149,25 @@ return 1; switch (wMsg) { - case MCI_OPEN_DRIVER: return MCIQTZ_mciOpen (dwDevID, dwParam1, (LPMCI_DGV_OPEN_PARMSW) dwParam2); - case MCI_CLOSE_DRIVER: return MCIQTZ_mciClose (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS) dwParam2); - case MCI_PLAY: return MCIQTZ_mciPlay (dwDevID, dwParam1, (LPMCI_PLAY_PARMS) dwParam2); - case MCI_SEEK: return MCIQTZ_mciSeek (dwDevID, dwParam1, (LPMCI_SEEK_PARMS) dwParam2); - case MCI_STOP: return MCIQTZ_mciStop (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS) dwParam2); - case MCI_PAUSE: return MCIQTZ_mciPause (dwDevID, dwParam1, (LPMCI_GENERIC_PARMS) dwParam2); - case MCI_GETDEVCAPS: return MCIQTZ_mciGetDevCaps(dwDevID, dwParam1, (LPMCI_GETDEVCAPS_PARMS) dwParam2); - case MCI_SET: return MCIQTZ_mciSet (dwDevID, dwParam1, (LPMCI_DGV_SET_PARMS) dwParam2); - case MCI_STATUS: return MCIQTZ_mciStatus (dwDevID, dwParam1, (LPMCI_DGV_STATUS_PARMSW) dwParam2); - case MCI_WHERE: return MCIQTZ_mciWhere (dwDevID, dwParam1, (LPMCI_DGV_RECT_PARMS) dwParam2); + case MCI_OPEN_DRIVER: + case MCI_PLAY: + case MCI_SEEK: + case MCI_GETDEVCAPS: + case MCI_SET: + case MCI_STATUS: + case MCI_WHERE: + if (!dwParam2) return MCIERR_NULL_PARAMETER_BLOCK; + return MCIQTZ_relayTaskMessage(dwDevID, wMsg, dwParam1, dwParam2); + case MCI_CLOSE_DRIVER: + case MCI_STOP: + case MCI_PAUSE: + return MCIQTZ_relayTaskMessage(dwDevID, wMsg, dwParam1, dwParam2); /* Digital Video specific */ - case MCI_SETAUDIO: return MCIQTZ_mciSetAudio (dwDevID, dwParam1, (LPMCI_DGV_SETAUDIO_PARMSW) dwParam2); + case MCI_SETAUDIO: case MCI_UPDATE: - return MCIQTZ_mciUpdate(dwDevID, dwParam1, (LPMCI_DGV_UPDATE_PARMS)dwParam2); case MCI_WINDOW: - return MCIQTZ_mciWindow(dwDevID, dwParam1, (LPMCI_DGV_WINDOW_PARMSW)dwParam2); + if (!dwParam2) return MCIERR_NULL_PARAMETER_BLOCK; + return MCIQTZ_relayTaskMessage(dwDevID, wMsg, dwParam1, dwParam2); case MCI_PUT: case MCI_RECORD: case MCI_RESUME: Modified: trunk/reactos/dll/win32/mciqtz32/mciqtz_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciqtz32/mciqtz_…
============================================================================== --- trunk/reactos/dll/win32/mciqtz32/mciqtz_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mciqtz32/mciqtz_private.h [iso-8859-1] Sun Jul 19 22:38:20 2015 @@ -26,6 +26,17 @@ #include <dshow.h> typedef struct { + HANDLE thread; + HANDLE notify; + HANDLE done; + DWORD msg; + DWORD_PTR devid; + DWORD flags; + DWORD_PTR parms; + LRESULT res; +} WINE_MCIQTZ_TASK; + +typedef struct { MCIDEVICEID wDevID; BOOL opened; BOOL uninit; @@ -35,9 +46,16 @@ IMediaEvent* mevent; IVideoWindow* vidwin; IBasicVideo* vidbasic; + IBasicAudio* audio; DWORD time_format; UINT command_table; - HWND parent; + HWND parent; + MCIDEVICEID notify_devid; + HANDLE callback; + HANDLE thread; + HANDLE stop_event; + CRITICAL_SECTION cs; + WINE_MCIQTZ_TASK task; } WINE_MCIQTZ; #endif /* __WINE_PRIVATE_MCIQTZ_H */ Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Jul 19 22:38:20 2015 @@ -97,7 +97,7 @@ reactos/dll/win32/mapi32 # Synced to WineStaging-1.7.37 reactos/dll/win32/mciavi32 # Synced to WineStaging-1.7.37 reactos/dll/win32/mcicda # Synced to WineStaging-1.7.37 -reactos/dll/win32/mciqtz32 # Synced to WineStaging-1.7.37 +reactos/dll/win32/mciqtz32 # Synced to WineStaging-1.7.47 reactos/dll/win32/mciseq # Synced to WineStaging-1.7.37 reactos/dll/win32/mciwave # Synced to WineStaging-1.7.37 reactos/dll/win32/mgmtapi # Synced to WineStaging-1.7.37
9 years, 5 months
1
0
0
0
[akhaldi] 68447: [JSCRIPT_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jul 19 22:36:43 2015 New Revision: 68447 URL:
http://svn.reactos.org/svn/reactos?rev=68447&view=rev
Log: [JSCRIPT_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/rostests/winetests/jscript/api.js trunk/rostests/winetests/jscript/run.c Modified: trunk/rostests/winetests/jscript/api.js URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/jscript/api.js?…
============================================================================== --- trunk/rostests/winetests/jscript/api.js [iso-8859-1] (original) +++ trunk/rostests/winetests/jscript/api.js [iso-8859-1] Sun Jul 19 22:36:43 2015 @@ -2013,6 +2013,8 @@ "Date.parse(\"February 31 UTC, 2000 12:31:17 PM\") = " + Date.parse("February 31 UTC, 2000 12:31:17 PM")); ok(Date.parse("71 11:32AM Dec 12 UTC BC ") === -64346358480000, "Date.parse(\"71 11:32AM Dec 12 UTC BC \") = " + Date.parse("71 11:32AM Dec 12 UTC BC ")); ok(Date.parse("23/71/2000 11::32::UTC") === 1010662320000, "Date.parse(\"23/71/2000 11::32::UTC\") = " + Date.parse("23/71/2000 11::32::UTC")); +ok(Date.parse("1970/01/01") === Date.parse("01/01/1970"), "Date.parse(\"1970/01/01\") = " + Date.parse("1970/01/01")); +ok(Date.parse("71/12/14") === Date.parse("12/14/1971"), "Date.parse(\"71/12/14\") = " + Date.parse("71/12/14")); ok(typeof(Math.PI) === "number", "typeof(Math.PI) = " + typeof(Math.PI)); ok(Math.floor(Math.PI*100) === 314, "Math.PI = " + Math.PI); Modified: trunk/rostests/winetests/jscript/run.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/jscript/run.c?r…
============================================================================== --- trunk/rostests/winetests/jscript/run.c [iso-8859-1] (original) +++ trunk/rostests/winetests/jscript/run.c [iso-8859-1] Sun Jul 19 22:36:43 2015 @@ -117,6 +117,7 @@ DEFINE_EXPECT(invoke_func); DEFINE_EXPECT(DeleteMemberByDispID); DEFINE_EXPECT(DeleteMemberByDispID_false); +DEFINE_EXPECT(BindHandler); #define DISPID_GLOBAL_TESTPROPGET 0x1000 #define DISPID_GLOBAL_TESTPROPPUT 0x1001 @@ -147,6 +148,7 @@ #define DISPID_GLOBAL_DISPEXFUNC 0x101a #define DISPID_GLOBAL_TESTPROPPUTREF 0x101b #define DISPID_GLOBAL_GETSCRIPTSTATE 0x101c +#define DISPID_GLOBAL_BINDEVENTHANDLER 0x101d #define DISPID_GLOBAL_TESTPROPDELETE 0x2000 #define DISPID_GLOBAL_TESTNOPROPDELETE 0x2001 @@ -275,6 +277,13 @@ } static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, + VARIANT *res, EXCEPINFO *pei, IServiceProvider *pspCaller) { ok(0, "unexpected call\n"); return E_NOTIMPL; @@ -590,6 +599,75 @@ static IDispatchEx pureDisp = { &pureDispVtbl }; +static HRESULT WINAPI BindEventHandler_QueryInterface(IBindEventHandler *iface, REFIID riid, void **ppv) +{ + ok(0, "unexpected call\n"); + return E_NOINTERFACE; +} + +static ULONG WINAPI BindEventHandler_AddRef(IBindEventHandler *iface) +{ + return 2; +} + +static ULONG WINAPI BindEventHandler_Release(IBindEventHandler *iface) +{ + return 1; +} + +static HRESULT WINAPI BindEventHandler_BindHandler(IBindEventHandler *iface, const WCHAR *event, IDispatch *disp) +{ + CHECK_EXPECT(BindHandler); + ok(!strcmp_wa(event, "eventName"), "event = %s\n", wine_dbgstr_w(event)); + ok(disp != NULL, "disp = NULL\n"); + return S_OK; +} + +static const IBindEventHandlerVtbl BindEventHandlerVtbl = { + BindEventHandler_QueryInterface, + BindEventHandler_AddRef, + BindEventHandler_Release, + BindEventHandler_BindHandler +}; + +static IBindEventHandler BindEventHandler = { &BindEventHandlerVtbl }; + +static HRESULT WINAPI bindEventHandlerDisp_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv) +{ + if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDispatch) || IsEqualGUID(riid, &IID_IDispatchEx)) { + *ppv = iface; + return S_OK; + } + + if(IsEqualGUID(riid, &IID_IBindEventHandler)) { + *ppv = &BindEventHandler; + return S_OK; + } + + *ppv = NULL; + return E_NOINTERFACE; +} + +static IDispatchExVtbl bindEventHandlerDispVtbl = { + bindEventHandlerDisp_QueryInterface, + DispatchEx_AddRef, + DispatchEx_Release, + DispatchEx_GetTypeInfoCount, + DispatchEx_GetTypeInfo, + DispatchEx_GetIDsOfNames, + DispatchEx_Invoke, + DispatchEx_GetDispID, + DispatchEx_InvokeEx, + DispatchEx_DeleteMemberByName, + DispatchEx_DeleteMemberByDispID, + DispatchEx_GetMemberProperties, + DispatchEx_GetMemberName, + DispatchEx_GetNextDispID, + DispatchEx_GetNameSpaceParent +}; + +static IDispatchEx bindEventHandlerDisp = { &bindEventHandlerDispVtbl }; + static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) { if(!strcmp_wa(bstrName, "ok")) { @@ -767,6 +845,11 @@ if(!strcmp_wa(bstrName, "getScriptState")) { *pid = DISPID_GLOBAL_GETSCRIPTSTATE; + return S_OK; + } + + if(!strcmp_wa(bstrName, "bindEventHandler")) { + *pid = DISPID_GLOBAL_BINDEVENTHANDLER; return S_OK; } @@ -1134,6 +1217,11 @@ return S_OK; } + case DISPID_GLOBAL_BINDEVENTHANDLER: + V_VT(pvarRes) = VT_DISPATCH; + V_DISPATCH(pvarRes) = (IDispatch*)&bindEventHandlerDisp; + return S_OK; + case DISPID_GLOBAL_PROPARGPUT: CHECK_EXPECT(global_propargput_i); ok(wFlags == INVOKE_PROPERTYPUT, "wFlags = %x\n", wFlags); @@ -1981,6 +2069,49 @@ script_engine = NULL; } +static void test_automagic(void) +{ + IActiveScriptParse *parser; + IActiveScript *engine; + BSTR str; + HRESULT hres; + + script_engine = engine = create_script(); + if(!engine) + return; + + hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser); + ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + + hres = IActiveScriptParse_InitNew(parser); + ok(hres == S_OK, "InitNew failed: %08x\n", hres); + + hres = IActiveScript_SetScriptSite(engine, &ActiveScriptSite); + ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + + hres = IActiveScript_AddNamedItem(engine, testW, SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS); + ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); + + str = a2bstr("function bindEventHandler::eventName() {}\n" + "reportSuccess();"); + hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, 0, NULL, NULL); + ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + SysFreeString(str); + + SET_EXPECT(BindHandler); + SET_EXPECT(global_success_d); + SET_EXPECT(global_success_i); + hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_STARTED); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres); + CHECK_CALLED(BindHandler); + CHECK_CALLED(global_success_d); + CHECK_CALLED(global_success_i); + + IActiveScript_Release(engine); + IActiveScriptParse_Release(parser); + script_engine = NULL; +} + static HRESULT parse_script_expr(const char *expr, VARIANT *res, IActiveScript **engine_ret) { IActiveScriptParse *parser; @@ -2021,6 +2152,56 @@ IActiveScript_Release(engine); } return hres; +} + +static void test_retval(void) +{ + BSTR str = a2bstr("reportSuccess(), true"); + IActiveScriptParse *parser; + IActiveScript *engine; + SCRIPTSTATE state; + VARIANT res; + HRESULT hres; + + engine = create_script(); + + hres = IActiveScript_QueryInterface(engine, &IID_IActiveScriptParse, (void**)&parser); + ok(hres == S_OK, "Could not get IActiveScriptParse: %08x\n", hres); + + hres = IActiveScriptParse_InitNew(parser); + ok(hres == S_OK, "InitNew failed: %08x\n", hres); + + hres = IActiveScript_SetScriptSite(engine, &ActiveScriptSite); + ok(hres == S_OK, "SetScriptSite failed: %08x\n", hres); + + SET_EXPECT(GetItemInfo_testVal); + hres = IActiveScript_AddNamedItem(engine, test_valW, + SCRIPTITEM_ISVISIBLE|SCRIPTITEM_ISSOURCE|SCRIPTITEM_GLOBALMEMBERS); + ok(hres == S_OK, "AddNamedItem failed: %08x\n", hres); + CHECK_CALLED(GetItemInfo_testVal); + + V_VT(&res) = VT_NULL; + SET_EXPECT(global_success_d); + SET_EXPECT(global_success_i); + hres = IActiveScriptParse_ParseScriptText(parser, str, NULL, NULL, NULL, 0, 0, 0, &res, NULL); + CHECK_CALLED(global_success_d); + CHECK_CALLED(global_success_i); + ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); + ok(V_VT(&res) == VT_EMPTY, "V_VT(&res) = %d\n", V_VT(&res)); + + hres = IActiveScript_GetScriptState(engine, &state); + ok(hres == S_OK, "GetScriptState failed: %08x\n", hres); + ok(state == SCRIPTSTATE_INITIALIZED, "state = %d\n", state); + + hres = IActiveScript_SetScriptState(engine, SCRIPTSTATE_STARTED); + ok(hres == S_OK, "SetScriptState(SCRIPTSTATE_STARTED) failed: %08x\n", hres); + + hres = IActiveScript_Close(engine); + ok(hres == S_OK, "Close failed: %08x\n", hres); + + IActiveScriptParse_Release(parser); + IActiveScript_Release(engine); + SysFreeString(str); } static void test_default_value(void) @@ -2091,6 +2272,7 @@ CHECK_CALLED(global_success_i); test_default_value(); + test_retval(); testing_expr = FALSE; } @@ -2458,6 +2640,7 @@ test_isvisible(FALSE); test_isvisible(TRUE); test_start(); + test_automagic(); parse_script_af(0, "test.testThis2(this);"); parse_script_af(0, "(function () { test.testThis2(this); })();");
9 years, 5 months
1
0
0
0
[akhaldi] 68446: [JSCRIPT] Sync with Wine Staging 1.7.47. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jul 19 22:36:25 2015 New Revision: 68446 URL:
http://svn.reactos.org/svn/reactos?rev=68446&view=rev
Log: [JSCRIPT] Sync with Wine Staging 1.7.47. CORE-9924 Modified: trunk/reactos/dll/win32/jscript/compile.c trunk/reactos/dll/win32/jscript/date.c trunk/reactos/dll/win32/jscript/engine.c trunk/reactos/dll/win32/jscript/engine.h trunk/reactos/dll/win32/jscript/jscript.c trunk/reactos/dll/win32/jscript/jscript.h trunk/reactos/dll/win32/jscript/lex.c trunk/reactos/dll/win32/jscript/parser.h trunk/reactos/dll/win32/jscript/parser.tab.c trunk/reactos/dll/win32/jscript/parser.tab.h trunk/reactos/dll/win32/jscript/parser.y trunk/reactos/dll/win32/jscript/string.c trunk/reactos/media/doc/README.WINE [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/jscript/compile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/compile.…
Modified: trunk/reactos/dll/win32/jscript/date.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/date.c?r…
Modified: trunk/reactos/dll/win32/jscript/engine.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/engine.c…
Modified: trunk/reactos/dll/win32/jscript/engine.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/engine.h…
Modified: trunk/reactos/dll/win32/jscript/jscript.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/jscript.…
Modified: trunk/reactos/dll/win32/jscript/jscript.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/jscript.…
Modified: trunk/reactos/dll/win32/jscript/lex.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/lex.c?re…
Modified: trunk/reactos/dll/win32/jscript/parser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/parser.h…
Modified: trunk/reactos/dll/win32/jscript/parser.tab.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/parser.t…
Modified: trunk/reactos/dll/win32/jscript/parser.tab.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/parser.t…
Modified: trunk/reactos/dll/win32/jscript/parser.y URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/parser.y…
Modified: trunk/reactos/dll/win32/jscript/string.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/jscript/string.c…
Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
9 years, 5 months
1
0
0
0
[akhaldi] 68445: [PSDK] Update objidl.idl. CORE-9924
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Jul 19 22:32:16 2015 New Revision: 68445 URL:
http://svn.reactos.org/svn/reactos?rev=68445&view=rev
Log: [PSDK] Update objidl.idl. CORE-9924 Modified: trunk/reactos/include/psdk/objidl.idl Modified: trunk/reactos/include/psdk/objidl.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/objidl.idl?re…
============================================================================== --- trunk/reactos/include/psdk/objidl.idl [iso-8859-1] (original) +++ trunk/reactos/include/psdk/objidl.idl [iso-8859-1] Sun Jul 19 22:32:16 2015 @@ -2441,6 +2441,16 @@ HRESULT Query([in] GLOBALOPT_PROPERTIES property, [out ] ULONG_PTR *value); } +[ + object, + pointer_default(unique), + uuid(947990de-cc28-11d2-a0f7-00805f858fb1) +] +interface IDummyHICONIncluder : IUnknown +{ + HRESULT Dummy([in] HICON hIcon, [in] HDC hdc); +} + cpp_quote("#ifdef USE_COM_CONTEXT_DEF") typedef DWORD CPFLAGS;
9 years, 5 months
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
26
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
Results per page:
10
25
50
100
200