winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2017
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
446 discussions
Start a n
N
ew thread
Andrew Eikum : wineandroid: Don't use deprecated SLDataFormat_PCM struct.
by Alexandre Julliard
25 Sep '17
25 Sep '17
Module: wine Branch: master Commit: f5fe252cd165a7966f04651142d39686ff138005 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f5fe252cd165a7966f0465114…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Mon Sep 25 13:14:21 2017 -0500 wineandroid: Don't use deprecated SLDataFormat_PCM struct. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wineandroid.drv/mmdevdrv.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/dlls/wineandroid.drv/mmdevdrv.c b/dlls/wineandroid.drv/mmdevdrv.c index d661fb5..275b652 100644 --- a/dlls/wineandroid.drv/mmdevdrv.c +++ b/dlls/wineandroid.drv/mmdevdrv.c @@ -647,7 +647,7 @@ static HRESULT get_audio_session(const GUID *sessionguid, return S_OK; } -static HRESULT waveformat_to_pcm(ACImpl *This, const WAVEFORMATEX *fmt, SLDataFormat_PCM *pcm) +static HRESULT waveformat_to_pcm(ACImpl *This, const WAVEFORMATEX *fmt, SLAndroidDataFormat_PCM_EX *pcm) { /* only support non-float PCM */ if(fmt->wFormatTag != WAVE_FORMAT_PCM && @@ -660,20 +660,26 @@ static HRESULT waveformat_to_pcm(ACImpl *This, const WAVEFORMATEX *fmt, SLDataFo if(fmt->nSamplesPerSec < 8000 || fmt->nSamplesPerSec > 48000) return AUDCLNT_E_UNSUPPORTED_FORMAT; - pcm->formatType = SL_DATAFORMAT_PCM; + pcm->formatType = SL_ANDROID_DATAFORMAT_PCM_EX; pcm->numChannels = fmt->nChannels; - pcm->samplesPerSec = fmt->nSamplesPerSec * 1000; /* no typo, actually in milli-Hz */ + pcm->sampleRate = fmt->nSamplesPerSec * 1000; /* sampleRate is in milli-Hz */ pcm->bitsPerSample = fmt->wBitsPerSample; pcm->containerSize = fmt->wBitsPerSample; /* only up to stereo */ if(pcm->numChannels == 1) - pcm->channelMask = SL_SPEAKER_FRONT_LEFT; + pcm->channelMask = SL_SPEAKER_FRONT_CENTER; else if(This->dataflow == eRender && pcm->numChannels == 2) pcm->channelMask = SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT; else return AUDCLNT_E_UNSUPPORTED_FORMAT; + pcm->endianness = SL_BYTEORDER_LITTLEENDIAN; + if(pcm->bitsPerSample == 8) + pcm->representation = SL_ANDROID_PCM_REPRESENTATION_UNSIGNED_INT; + else + pcm->representation = SL_ANDROID_PCM_REPRESENTATION_SIGNED_INT; + return S_OK; } @@ -686,7 +692,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface, int i; HRESULT hr; SLresult sr; - SLDataFormat_PCM pcm; + SLAndroidDataFormat_PCM_EX pcm; SLDataLocator_AndroidSimpleBufferQueue loc_bq; TRACE("(%p)->(%x, %x, %s, %s, %p, %s)\n", This, mode, flags, @@ -1056,7 +1062,7 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient *iface, WAVEFORMATEX **outpwfx) { ACImpl *This = impl_from_IAudioClient(iface); - SLDataFormat_PCM pcm; + SLAndroidDataFormat_PCM_EX pcm; HRESULT hr; TRACE("(%p)->(%x, %p, %p)\n", This, mode, pwfx, outpwfx);
1
0
0
0
Andrew Eikum : wineandroid: Create OpenSL outputmix object globally.
by Alexandre Julliard
25 Sep '17
25 Sep '17
Module: wine Branch: master Commit: a0157f57cbe7e8274afdda9067b30e4b155bff70 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0157f57cbe7e8274afdda906…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Mon Sep 25 13:14:12 2017 -0500 wineandroid: Create OpenSL outputmix object globally. This object will take multiple inputs, no need to re-create it for every IAudioClient. Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wineandroid.drv/mmdevdrv.c | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/dlls/wineandroid.drv/mmdevdrv.c b/dlls/wineandroid.drv/mmdevdrv.c index 6b05c50..d661fb5 100644 --- a/dlls/wineandroid.drv/mmdevdrv.c +++ b/dlls/wineandroid.drv/mmdevdrv.c @@ -128,7 +128,6 @@ struct ACImpl { HANDLE event; float *vols; - SLObjectItf outputmix; SLObjectItf player; SLObjectItf recorder; SLAndroidSimpleBufferQueueItf bufq; @@ -284,6 +283,7 @@ int WINAPI AUDDRV_GetPriority(void) static SLObjectItf sl; static SLEngineItf engine; +static SLObjectItf outputmix; HRESULT AUDDRV_Init(void) { @@ -310,6 +310,21 @@ HRESULT AUDDRV_Init(void) return E_FAIL; } + sr = SLCALL(engine, CreateOutputMix, &outputmix, 0, NULL, NULL); + if(sr != SL_RESULT_SUCCESS){ + SLCALL_N(sl, Destroy); + WARN("CreateOutputMix failed: 0x%x\n", sr); + return E_FAIL; + } + + sr = SLCALL(outputmix, Realize, SL_BOOLEAN_FALSE); + if(sr != SL_RESULT_SUCCESS){ + SLCALL_N(outputmix, Destroy); + SLCALL_N(sl, Destroy); + WARN("outputmix Realize failed: 0x%x\n", sr); + return E_FAIL; + } + return S_OK; } @@ -347,7 +362,6 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, ACImpl *This; HRESULT hr; EDataFlow flow; - SLresult sr; TRACE("%s %p %p\n", debugstr_guid(guid), dev, out); @@ -372,24 +386,6 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, return hr; } - if(flow == eRender){ - sr = SLCALL(engine, CreateOutputMix, &This->outputmix, 0, NULL, NULL); - if(sr != SL_RESULT_SUCCESS){ - WARN("CreateOutputMix failed: 0x%x\n", sr); - HeapFree(GetProcessHeap(), 0, This); - return E_FAIL; - } - - sr = SLCALL(This->outputmix, Realize, SL_BOOLEAN_FALSE); - if(sr != SL_RESULT_SUCCESS){ - SLCALL_N(This->outputmix, Destroy); - This->outputmix = NULL; - HeapFree(GetProcessHeap(), 0, This); - WARN("outputmix Realize failed: 0x%x\n", sr); - return E_FAIL; - } - } - This->dataflow = flow; This->IAudioClient_iface.lpVtbl = &AudioClient_Vtbl; @@ -472,8 +468,6 @@ static ULONG WINAPI AudioClient_Release(IAudioClient *iface) SLCALL_N(This->recorder, Destroy); if(This->player) SLCALL_N(This->player, Destroy); - if(This->outputmix) - SLCALL_N(This->outputmix, Destroy); if(This->initted){ EnterCriticalSection(&g_sessions_lock); @@ -776,7 +770,7 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient *iface, source.pFormat = &pcm; loc_outmix.locatorType = SL_DATALOCATOR_OUTPUTMIX; - loc_outmix.outputMix = This->outputmix; + loc_outmix.outputMix = outputmix; sink.pLocator = &loc_outmix; sink.pFormat = NULL;
1
0
0
0
Jacek Caban : ntdll/tests: Test NtQueryVolumeInformationFile calls on named pipe object.
by Alexandre Julliard
25 Sep '17
25 Sep '17
Module: wine Branch: master Commit: 4df0162caf431d0069371e6c0776b83ed4c35735 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4df0162caf431d0069371e6c0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Sep 25 16:38:13 2017 +0200 ntdll/tests: Test NtQueryVolumeInformationFile calls on named pipe object. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/pipe.c | 41 +++++++++++++++++++++++++++++++++++++++++ include/winternl.h | 24 +++++++++++++++--------- 2 files changed, 56 insertions(+), 9 deletions(-) diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index f567e61..c448526 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -73,6 +73,7 @@ static NTSTATUS (WINAPI *pNtCreateNamedPipeFile) (PHANDLE handle, ULONG access, ULONG inbound_quota, ULONG outbound_quota, PLARGE_INTEGER timeout); static NTSTATUS (WINAPI *pNtQueryInformationFile) (IN HANDLE FileHandle, OUT PIO_STATUS_BLOCK IoStatusBlock, OUT PVOID FileInformation, IN ULONG Length, IN FILE_INFORMATION_CLASS FileInformationClass); +static NTSTATUS (WINAPI *pNtQueryVolumeInformationFile)(HANDLE handle, PIO_STATUS_BLOCK io, void *buffer, ULONG length, FS_INFORMATION_CLASS info_class); static NTSTATUS (WINAPI *pNtSetInformationFile) (HANDLE handle, PIO_STATUS_BLOCK io, PVOID ptr, ULONG len, FILE_INFORMATION_CLASS class); static NTSTATUS (WINAPI *pNtCancelIoFile) (HANDLE hFile, PIO_STATUS_BLOCK io_status); static NTSTATUS (WINAPI *pNtCancelIoFileEx) (HANDLE hFile, IO_STATUS_BLOCK *iosb, IO_STATUS_BLOCK *io_status); @@ -94,6 +95,7 @@ static BOOL init_func_ptrs(void) loadfunc(NtFsControlFile) loadfunc(NtCreateNamedPipeFile) loadfunc(NtQueryInformationFile) + loadfunc(NtQueryVolumeInformationFile) loadfunc(NtSetInformationFile) loadfunc(NtCancelIoFile) loadfunc(NtCancelIoFileEx) @@ -1100,6 +1102,43 @@ static void read_pipe_test(ULONG pipe_flags, ULONG pipe_type) CloseHandle(event); } +static void test_volume_info(void) +{ + FILE_FS_DEVICE_INFORMATION *device_info; + IO_STATUS_BLOCK iosb; + HANDLE read, write; + char buffer[128]; + NTSTATUS status; + + if (!create_pipe_pair( &read, &write, FILE_FLAG_OVERLAPPED | PIPE_ACCESS_INBOUND, + PIPE_TYPE_MESSAGE, 4096 )) return; + + memset( buffer, 0xaa, sizeof(buffer) ); + status = pNtQueryVolumeInformationFile( read, &iosb, buffer, sizeof(buffer), FileFsDeviceInformation ); + todo_wine { + ok( status == STATUS_SUCCESS, "NtQueryVolumeInformationFile failed: %x\n", status ); + ok( iosb.Information == sizeof(*device_info), "Information = %lu\n", iosb.Information ); + device_info = (FILE_FS_DEVICE_INFORMATION*)buffer; + ok( device_info->DeviceType == FILE_DEVICE_NAMED_PIPE, "DeviceType = %u\n", device_info->DeviceType ); + ok( !(device_info->Characteristics & ~FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL), + "Characteristics = %x\n", device_info->Characteristics ); + } + + memset( buffer, 0xaa, sizeof(buffer) ); + status = pNtQueryVolumeInformationFile( write, &iosb, buffer, sizeof(buffer), FileFsDeviceInformation ); + todo_wine { + ok( status == STATUS_SUCCESS, "NtQueryVolumeInformationFile failed: %x\n", status ); + ok( iosb.Information == sizeof(*device_info), "Information = %lu\n", iosb.Information ); + device_info = (FILE_FS_DEVICE_INFORMATION*)buffer; + ok( device_info->DeviceType == FILE_DEVICE_NAMED_PIPE, "DeviceType = %u\n", device_info->DeviceType ); + ok( !(device_info->Characteristics & ~FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL), + "Characteristics = %x\n", device_info->Characteristics ); + } + + CloseHandle( read ); + CloseHandle( write ); +} + START_TEST(pipe) { if (!init_func_ptrs()) @@ -1141,4 +1180,6 @@ START_TEST(pipe) read_pipe_test(PIPE_ACCESS_OUTBOUND, PIPE_TYPE_MESSAGE); trace("starting message read in message mode server -> client\n"); read_pipe_test(PIPE_ACCESS_OUTBOUND, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE); + + test_volume_info(); } diff --git a/include/winternl.h b/include/winternl.h index df20da5..ec8b387 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -1715,15 +1715,21 @@ typedef struct _RTL_HANDLE_TABLE #define FILE_MAXIMUM_DISPOSITION 5 /* Characteristics of a File System */ -#define FILE_REMOVABLE_MEDIA 0x00000001 -#define FILE_READ_ONLY_DEVICE 0x00000002 -#define FILE_FLOPPY_DISKETTE 0x00000004 -#define FILE_WRITE_ONE_MEDIA 0x00000008 -#define FILE_REMOTE_DEVICE 0x00000010 -#define FILE_DEVICE_IS_MOUNTED 0x00000020 -#define FILE_VIRTUAL_VOLUME 0x00000040 -#define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080 -#define FILE_DEVICE_SECURE_OPEN 0x00000100 +#define FILE_REMOVABLE_MEDIA 0x00000001 +#define FILE_READ_ONLY_DEVICE 0x00000002 +#define FILE_FLOPPY_DISKETTE 0x00000004 +#define FILE_WRITE_ONE_MEDIA 0x00000008 +#define FILE_REMOTE_DEVICE 0x00000010 +#define FILE_DEVICE_IS_MOUNTED 0x00000020 +#define FILE_VIRTUAL_VOLUME 0x00000040 +#define FILE_AUTOGENERATED_DEVICE_NAME 0x00000080 +#define FILE_DEVICE_SECURE_OPEN 0x00000100 +#define FILE_CHARACTERISTIC_PNP_DEVICE 0x00000800 +#define FILE_CHARACTERISTIC_TS_DEVICE 0x00001000 +#define FILE_CHARACTERISTIC_WEBDAV_DEVICE 0x00002000 +#define FILE_CHARACTERISTIC_CSV 0x00010000 +#define FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL 0x00020000 +#define FILE_PORTABLE_DEVICE 0x00040000 /* options for NtCreateNamedPipeFile */ #define FILE_PIPE_INBOUND 0x00000000
1
0
0
0
Nikolay Sivov : msvcr120: Added vsscanf() and vswscanf().
by Alexandre Julliard
25 Sep '17
25 Sep '17
Module: wine Branch: master Commit: 1b2554c2c3cf06cd89cf54014153d61c59feb816 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1b2554c2c3cf06cd89cf54014…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Sep 23 20:16:45 2017 +0300 msvcr120: Added vsscanf() and vswscanf(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcr120/msvcr120.spec | 4 ++-- dlls/msvcr120/tests/msvcr120.c | 26 ++++++++++++++++++++++++++ dlls/msvcr120_app/msvcr120_app.spec | 4 ++-- dlls/msvcrt/scanf.c | 20 ++++++++++++++++++++ 4 files changed, 50 insertions(+), 4 deletions(-) diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index c091bd1..ad25b17 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -2436,10 +2436,10 @@ @ stub vscanf_s @ cdecl vsprintf(ptr str ptr) MSVCRT_vsprintf @ cdecl vsprintf_s(ptr long str ptr) MSVCRT_vsprintf_s -@ stub vsscanf +@ cdecl vsscanf(ptr str ptr) MSVCRT_vsscanf @ stub vsscanf_s @ cdecl vswprintf_s(ptr long wstr ptr) MSVCRT_vswprintf_s -@ stub vswscanf +@ cdecl vswscanf(ptr wstr ptr) MSVCRT_vswscanf @ stub vswscanf_s @ cdecl vwprintf(wstr ptr) MSVCRT_vwprintf @ cdecl vwprintf_s(wstr ptr) MSVCRT_vwprintf_s diff --git a/dlls/msvcr120/tests/msvcr120.c b/dlls/msvcr120/tests/msvcr120.c index de0ccc4..7a6e696 100644 --- a/dlls/msvcr120/tests/msvcr120.c +++ b/dlls/msvcr120/tests/msvcr120.c @@ -183,6 +183,7 @@ static int (CDECL *p__clearfp)(void); static _locale_t (__cdecl *p_wcreate_locale)(int, const wchar_t *); static void (__cdecl *p_free_locale)(_locale_t); static unsigned short (__cdecl *p_wctype)(const char*); +static int (__cdecl *p_vsscanf)(const char*, const char *, __ms_va_list valist); /* make sure we use the correct errno */ #undef errno @@ -240,6 +241,7 @@ static BOOL init(void) SET(p_wctype, "wctype"); SET(p_fegetenv, "fegetenv"); SET(p__clearfp, "_clearfp"); + SET(p_vsscanf, "vsscanf"); if(sizeof(void*) == 8) { /* 64-bit initialization */ SET(p_critical_section_ctor, "??0critical_section@Concurrency@@QEAA@XZ"); @@ -911,6 +913,29 @@ static void test_wctype(void) } } +static int __cdecl _vsscanf_wrapper(const char *buffer, const char *format, ...) +{ + int ret; + __ms_va_list valist; + __ms_va_start(valist, format); + ret = p_vsscanf(buffer, format, valist); + __ms_va_end(valist); + return ret; +} + +static void test_vsscanf(void) +{ + static const char *fmt = "%d"; + char buff[16]; + int ret, v; + + v = 0; + strcpy(buff, "10"); + ret = _vsscanf_wrapper(buff, fmt, &v); + ok(ret == 1, "Unexpected ret %d.\n", ret); + ok(v == 10, "got %d.\n", v); +} + START_TEST(msvcr120) { if (!init()) return; @@ -928,4 +953,5 @@ START_TEST(msvcr120) test__wcreate_locale(); test__Condition_variable(); test_wctype(); + test_vsscanf(); } diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 0193282..b37ab32 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -2098,10 +2098,10 @@ @ stub vscanf_s @ cdecl vsprintf(ptr str ptr) msvcr120.vsprintf @ cdecl vsprintf_s(ptr long str ptr) msvcr120.vsprintf_s -@ stub vsscanf +@ cdecl vsscanf(ptr str ptr) msvcr120.vsscanf @ stub vsscanf_s @ cdecl vswprintf_s(ptr long wstr ptr) msvcr120.vswprintf_s -@ stub vswscanf +@ cdecl vswscanf(ptr wstr ptr) msvcr120.vswscanf @ stub vswscanf_s @ cdecl vwprintf(wstr ptr) msvcr120.vwprintf @ cdecl vwprintf_s(wstr ptr) msvcr120.vwprintf_s diff --git a/dlls/msvcrt/scanf.c b/dlls/msvcrt/scanf.c index fd776a6..63ff8b1 100644 --- a/dlls/msvcrt/scanf.c +++ b/dlls/msvcrt/scanf.c @@ -795,3 +795,23 @@ int CDECL MSVCRT__snwscanf_s_l(MSVCRT_wchar_t *input, MSVCRT_size_t length, __ms_va_end(valist); return res; } + +/********************************************************************* + * vsscanf (MSVCRT120.@) + */ +int CDECL MSVCRT_vsscanf(const char *buffer, const char *format, __ms_va_list valist) +{ + if (!MSVCRT_CHECK_PMT(buffer != NULL && format != NULL)) return -1; + + return MSVCRT_vsscanf_l(buffer, format, NULL, valist); +} + +/********************************************************************* + * vswscanf (MSVCRT120.@) + */ +int CDECL MSVCRT_vswscanf(const MSVCRT_wchar_t *buffer, const MSVCRT_wchar_t *format, __ms_va_list valist) +{ + if (!MSVCRT_CHECK_PMT(buffer != NULL && format != NULL)) return -1; + + return MSVCRT_vswscanf_l(buffer, format, NULL, valist); +}
1
0
0
0
Alistair Leslie-Hughes : include: Add uianimation.idl.
by Alexandre Julliard
25 Sep '17
25 Sep '17
Module: wine Branch: master Commit: 9463c52df695d0bb0b212b34136c302f4379b4e6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9463c52df695d0bb0b212b341…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Fri Sep 22 02:14:01 2017 +0000 include: Add uianimation.idl. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/Makefile.in | 1 + include/uianimation.idl | 242 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 243 insertions(+) diff --git a/include/Makefile.in b/include/Makefile.in index 236d2bd..71e25ca 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -172,6 +172,7 @@ IDL_SRCS = \ transact.idl \ txcoord.idl \ txdtc.idl \ + uianimation.idl \ uiautomationclient.idl \ uiautomationcore.idl \ uiribbon.idl \ diff --git a/include/uianimation.idl b/include/uianimation.idl new file mode 100644 index 0000000..1c17d44 --- /dev/null +++ b/include/uianimation.idl @@ -0,0 +1,242 @@ +/* + * Copyright 2017 Alistair Leslie-Hughes + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +import "wtypes.idl"; +import "unknwn.idl"; + +interface IUIAnimationStoryboard; +interface IUIAnimationVariable; + +typedef DOUBLE UI_ANIMATION_SECONDS; +typedef struct { int _; } *UI_ANIMATION_KEYFRAME; + +typedef enum +{ + UI_ANIMATION_MANAGER_IDLE, + UI_ANIMATION_MANAGER_BUSY +} UI_ANIMATION_MANAGER_STATUS; + +typedef enum +{ + UI_ANIMATION_ROUNDING_NEAREST, + UI_ANIMATION_ROUNDING_FLOOR, + UI_ANIMATION_ROUNDING_CEILING +} UI_ANIMATION_ROUNDING_MODE; + +typedef enum +{ + UI_ANIMATION_SCHEDULING_UNEXPECTED_FAILURE, + UI_ANIMATION_SCHEDULING_INSUFFICIENT_PRIORITY, + UI_ANIMATION_SCHEDULING_ALREADY_SCHEDULED, + UI_ANIMATION_SCHEDULING_SUCCEEDED, + UI_ANIMATION_SCHEDULING_DEFERRED +} UI_ANIMATION_SCHEDULING_RESULT; + +typedef enum +{ + UI_ANIMATION_STORYBOARD_BUILDING, + UI_ANIMATION_STORYBOARD_SCHEDULED, + UI_ANIMATION_STORYBOARD_CANCELLED, + UI_ANIMATION_STORYBOARD_PLAYING, + UI_ANIMATION_STORYBOARD_TRUNCATED, + UI_ANIMATION_STORYBOARD_FINISHED, + UI_ANIMATION_STORYBOARD_READY, + UI_ANIMATION_STORYBOARD_INSUFFICIENT_PRIORITY +} UI_ANIMATION_STORYBOARD_STATUS; + +[ + local, + object, + uuid(783321ed-78a3-4366-b574-6af607a64788), + pointer_default(unique) +] +interface IUIAnimationManagerEventHandler : IUnknown +{ + HRESULT OnManagerStatusChanged ( + [in] UI_ANIMATION_MANAGER_STATUS status, + [in] UI_ANIMATION_MANAGER_STATUS prev_status); +} + +[ + local, + object, + uuid(6358b7ba-87d2-42d5-bf71-82e919dd5862), + pointer_default(unique) +] +interface IUIAnimationVariableChangeHandler : IUnknown +{ + HRESULT OnValueChanged ( + [in] IUIAnimationStoryboard *storyboard, + [in] IUIAnimationVariable *variable, + [in] DOUBLE value, + [in] DOUBLE prev_value); +} + +[ + local, + object, + uuid(bb3e1550-356e-44b0-99da-85ac6017865e), + pointer_default(unique) +] +interface IUIAnimationVariableIntegerChangeHandler : IUnknown +{ + HRESULT OnIntegerValueChanged ( + [in] IUIAnimationStoryboard *storyboard, + [in] IUIAnimationVariable *variable, + [in] INT32 value, + [in] INT32 prev_value); +} + +[ + local, + object, + uuid(3d5c9008-ec7c-4364-9f8a-9af3c58cbae6), + pointer_default(unique) +] +interface IUIAnimationStoryboardEventHandler : IUnknown +{ + HRESULT OnStoryboardStatusChanged ( + [in] IUIAnimationStoryboard *storyboard, + [in] UI_ANIMATION_STORYBOARD_STATUS status, + [in] UI_ANIMATION_STORYBOARD_STATUS prev_status); + + HRESULT OnStoryboardUpdated ([in] IUIAnimationStoryboard *storyboard); +} + +[ + local, + object, + uuid(dc6ce252-f731-41cf-b610-614b6ca049ad), + pointer_default(unique) +] +interface IUIAnimationTransition : IUnknown +{ + HRESULT SetInitialValue ([in] DOUBLE value); + + HRESULT SetInitialVelocity ([in] DOUBLE velocity); + + HRESULT IsDurationKnown (); + + HRESULT GetDuration ([out, retval] UI_ANIMATION_SECONDS *duration); +} + +[ + local, + object, + uuid(8ceeb155-2849-4ce5-9448-91ff70e1e4d9), + pointer_default(unique) +] +interface IUIAnimationVariable : IUnknown +{ + HRESULT GetValue ([out, retval] DOUBLE *value); + + HRESULT GetFinalValue ([out, retval] DOUBLE *value); + + HRESULT GetPreviousValue ([out, retval] DOUBLE *value); + + HRESULT GetIntegerValue ([out, retval] INT32 *value); + + HRESULT GetFinalIntegerValue ([out, retval] INT32 *value); + + HRESULT GetPreviousIntegerValue ([out, retval] INT32 *value); + + HRESULT GetCurrentStoryboard ([out, retval] IUIAnimationStoryboard **storyboard); + + HRESULT SetLowerBound ([in] DOUBLE bound); + + HRESULT SetUpperBound ([in] DOUBLE bound); + + HRESULT SetRoundingMode ([in] UI_ANIMATION_ROUNDING_MODE mode); + + HRESULT SetTag ( + [in] IUnknown *object, + [in] UINT32 id); + + HRESULT GetTag ( + [out] IUnknown **object, + [out] UINT32 *id); + + HRESULT SetVariableChangeHandler ([in, unique] IUIAnimationVariableChangeHandler *handler); + + HRESULT SetVariableIntegerChangeHandler ([in, unique] IUIAnimationVariableIntegerChangeHandler *handler); +} + +[ + local, + object, + uuid(a8ff128f-9bf9-4af1-9e67-e5e410defb84), + pointer_default(unique) +] +interface IUIAnimationStoryboard : IUnknown +{ + HRESULT AddTransition ( + [in] IUIAnimationVariable *variable, + [in] IUIAnimationTransition *transition); + + HRESULT AddKeyframeAtOffset ( + [in] UI_ANIMATION_KEYFRAME existingframe, + [in] UI_ANIMATION_SECONDS offset, + [out, retval] UI_ANIMATION_KEYFRAME *keyframe); + + HRESULT AddKeyframeAfterTransition ( + [in] IUIAnimationTransition *transition, + [out, retval] UI_ANIMATION_KEYFRAME *keyframe); + + HRESULT AddTransitionAtKeyframe ( + [in] IUIAnimationVariable *variable, + [in] IUIAnimationTransition *transition, + [in] UI_ANIMATION_KEYFRAME start_key); + + HRESULT AddTransitionBetweenKeyframes ( + [in] IUIAnimationVariable *variable, + [in] IUIAnimationTransition *transition, + [in] UI_ANIMATION_KEYFRAME start_key, + [in] UI_ANIMATION_KEYFRAME end_key); + + HRESULT RepeatBetweenKeyframes ( + [in] UI_ANIMATION_KEYFRAME start_key, + [in] UI_ANIMATION_KEYFRAME end_key, + [in] INT32 count); + + HRESULT HoldVariable ([in] IUIAnimationVariable *variable); + + HRESULT SetLongestAcceptableDelay ([in] UI_ANIMATION_SECONDS delay); + + HRESULT Schedule ( + [in] UI_ANIMATION_SECONDS now, + [out, defaultvalue(0)] UI_ANIMATION_SCHEDULING_RESULT *result); + + HRESULT Conclude (); + + HRESULT Finish ([in] UI_ANIMATION_SECONDS deadline); + + HRESULT Abandon (); + + HRESULT SetTag( + [in, unique] IUnknown *object, + [in] UINT32 id); + + HRESULT GetTag ( + [out] IUnknown **object, + [out] UINT32 *id); + + HRESULT GetStatus ([out, retval] UI_ANIMATION_STORYBOARD_STATUS *status); + + HRESULT GetElapsedTime ([out] UI_ANIMATION_SECONDS *elapsed); + + HRESULT SetStoryboardEventHandler ([in, unique] IUIAnimationStoryboardEventHandler *handler); +}
1
0
0
0
Stefan Dösinger : ntdll: Do not queue a completion status if pipe ops fail synchronously.
by Alexandre Julliard
25 Sep '17
25 Sep '17
Module: wine Branch: master Commit: bf6025e0e111d265bdf1c56871be9a73955e9ea2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bf6025e0e111d265bdf1c5687…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Sep 22 13:13:25 2017 +0300 ntdll: Do not queue a completion status if pipe ops fail synchronously. This fixes random crashes when exiting Chromium or shutting down CEF. It is similar to 7a1142035d7ee04839417176ff93fd0953e2a4e1, just for pipes. Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/pipe.c | 39 +++++++++++++++++++++++++++++++++++++++ dlls/ntdll/file.c | 6 +++--- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c index 0a6edd6..84db14e 100644 --- a/dlls/kernel32/tests/pipe.c +++ b/dlls/kernel32/tests/pipe.c @@ -1076,6 +1076,45 @@ static DWORD CALLBACK serverThreadMain4(LPVOID arg) } trace("Server done writing.\n"); + /* Client will finish this connection, the following ops will trigger broken pipe errors. */ + + /* Wait for the pipe to break. */ + while (PeekNamedPipe(hnp, NULL, 0, NULL, &written, &written)); + + trace("Server writing on disconnected pipe...\n"); + SetLastError(ERROR_SUCCESS); + success = WriteFile(hnp, buf, readden, &written, &oWrite); + err = GetLastError(); + todo_wine_if (!success && err == ERROR_PIPE_NOT_CONNECTED) ok(!success && err == ERROR_NO_DATA, + "overlapped WriteFile on disconnected pipe returned %u, err=%i\n", success, err); + + /* No completion status is queued on immediate error. */ + SetLastError(ERROR_SUCCESS); + oResult = (OVERLAPPED *)0xdeadbeef; + success = GetQueuedCompletionStatus(hcompletion, &written, &compkey, + &oResult, 0); + err = GetLastError(); + ok(!success && err == WAIT_TIMEOUT && !oResult, + "WriteFile GetQueuedCompletionStatus returned %u, err=%i, oResult %p\n", + success, err, oResult); + + trace("Server reading from disconnected pipe...\n"); + SetLastError(ERROR_SUCCESS); + success = ReadFile(hnp, buf, sizeof(buf), &readden, &oRead); + trace("Server ReadFile from disconnected pipe returned...\n"); + err = GetLastError(); + ok(!success && err == ERROR_BROKEN_PIPE, + "overlapped ReadFile on disconnected pipe returned %u, err=%i\n", success, err); + + SetLastError(ERROR_SUCCESS); + oResult = (OVERLAPPED *)0xdeadbeef; + success = GetQueuedCompletionStatus(hcompletion, &readden, &compkey, + &oResult, 0); + err = GetLastError(); + ok(!success && err == WAIT_TIMEOUT && !oResult, + "ReadFile GetQueuedCompletionStatus returned %u, err=%i, oResult %p\n", + success, err, oResult); + /* finish this connection, wait for next one */ ok(FlushFileBuffers(hnp), "FlushFileBuffers\n"); success = DisconnectNamedPipe(hnp); diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 28a69ff..d498581 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -937,7 +937,7 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent, break; default: status = STATUS_PIPE_BROKEN; - goto done; + goto err; } } else if (type == FD_TYPE_FILE) continue; /* no async I/O on regular files */ @@ -946,7 +946,7 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent, { if (errno == EINTR) continue; if (!total) status = FILE_GetNtStatus(); - goto done; + goto err; } if (async_read) @@ -1331,7 +1331,7 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent, if (errno == EFAULT) status = STATUS_INVALID_USER_BUFFER; else status = FILE_GetNtStatus(); } - goto done; + goto err; } if (async_write)
1
0
0
0
Alexandre Julliard : kernel32/tests: Add more WRITECOPY tests.
by Alexandre Julliard
25 Sep '17
25 Sep '17
Module: wine Branch: master Commit: 6eec34a9edb56463ca24f8e4c5356f228fecb673 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6eec34a9edb56463ca24f8e4c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Sep 25 11:38:06 2017 +0200 kernel32/tests: Add more WRITECOPY tests. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/virtual.c | 77 ++++++++++++++++++++++++++++++++----------- 1 file changed, 58 insertions(+), 19 deletions(-) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index 409d479..3ee9683 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -3836,6 +3836,16 @@ static DWORD map_prot_no_write(DWORD prot) } } +static DWORD map_prot_written(DWORD prot) +{ + switch (prot) + { + case PAGE_WRITECOPY: return PAGE_READWRITE; + case PAGE_EXECUTE_WRITECOPY: return PAGE_EXECUTE_READWRITE; + default: return prot; + } +} + static DWORD file_access_to_prot( DWORD access ) { BOOL exec = access & FILE_MAP_EXECUTE; @@ -4083,29 +4093,11 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags ) if (is_compatible_protection(alloc_prot, actual_prot)) { /* win2k and XP don't support EXEC on file mappings */ - if (!ret && page_prot[k] == PAGE_EXECUTE) - { - ok(broken(!ret), "VirtualProtect doesn't support PAGE_EXECUTE\n"); - continue; - } - /* NT4 and win2k don't support EXEC on file mappings */ - if (!ret && (page_prot[k] == PAGE_EXECUTE_READ || page_prot[k] == PAGE_EXECUTE_READWRITE)) + if (!ret && (page_prot[k] == PAGE_EXECUTE || page_prot[k] == PAGE_EXECUTE_WRITECOPY || view[j].prot == PAGE_EXECUTE_WRITECOPY)) { ok(broken(!ret), "VirtualProtect doesn't support PAGE_EXECUTE\n"); continue; } - /* Vista+ supports PAGE_EXECUTE_WRITECOPY, earlier versions don't */ - if (!ret && page_prot[k] == PAGE_EXECUTE_WRITECOPY) - { - ok(broken(!ret), "VirtualProtect doesn't support PAGE_EXECUTE_WRITECOPY\n"); - continue; - } - /* win2k and XP don't support PAGE_EXECUTE_WRITECOPY views properly */ - if (!ret && view[j].prot == PAGE_EXECUTE_WRITECOPY) - { - ok(broken(!ret), "VirtualProtect doesn't support PAGE_EXECUTE_WRITECOPY view properly\n"); - continue; - } ok(ret, "VirtualProtect error %d, map %#x, view %#x, requested prot %#x\n", GetLastError(), page_prot[i], view[j].prot, page_prot[k]); ok(old_prot == prev_prot, "got %#x, expected %#x\n", old_prot, prev_prot); @@ -4164,6 +4156,53 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags ) } } + if (!anon_mapping && is_compatible_protection(alloc_prot, PAGE_WRITECOPY)) + { + ret = VirtualProtect(base, si.dwPageSize, PAGE_WRITECOPY, &old_prot); + ok(ret, "VirtualProtect error %d, map %#x, view %#x\n", GetLastError(), page_prot[i], view[j].prot); + if (ret) *(DWORD*)base = 0xdeadbeef; + ret = VirtualQuery(base, &info, sizeof(info)); + ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError()); + todo_wine + ok(info.Protect == PAGE_READWRITE, "VirtualProtect wrong prot, map %#x, view %#x got %#x\n", + page_prot[i], view[j].prot, info.Protect ); + + prev_prot = info.Protect; + alloc_prot = info.AllocationProtect; + + for (k = 0; k < sizeof(page_prot)/sizeof(page_prot[0]); k++) + { + DWORD actual_prot = (sec_flags & SEC_IMAGE) ? map_prot_no_write(page_prot[k]) : page_prot[k]; + SetLastError(0xdeadbeef); + old_prot = 0xdeadbeef; + ret = VirtualProtect(base, si.dwPageSize, page_prot[k], &old_prot); + if (is_compatible_protection(alloc_prot, actual_prot)) + { + /* win2k and XP don't support EXEC on file mappings */ + if (!ret && (page_prot[k] == PAGE_EXECUTE || page_prot[k] == PAGE_EXECUTE_WRITECOPY || view[j].prot == PAGE_EXECUTE_WRITECOPY)) + { + ok(broken(!ret), "VirtualProtect doesn't support PAGE_EXECUTE\n"); + continue; + } + + ok(ret, "VirtualProtect error %d, map %#x, view %#x, requested prot %#x\n", GetLastError(), page_prot[i], view[j].prot, page_prot[k]); + ok(old_prot == prev_prot, "got %#x, expected %#x\n", old_prot, prev_prot); + + ret = VirtualQuery(base, &info, sizeof(info)); + ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError()); + todo_wine_if( map_prot_written( page_prot[k] ) != actual_prot ) + ok(info.Protect == map_prot_written( page_prot[k] ), + "VirtualProtect wrong prot, map %#x, view %#x, requested prot %#x got %#x\n", + page_prot[i], view[j].prot, page_prot[k], info.Protect ); + prev_prot = info.Protect; + } + else + { + ok(!ret, "VirtualProtect should fail, map %#x, view %#x, requested prot %#x\n", page_prot[i], view[j].prot, page_prot[k]); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } + } + } UnmapViewOfFile(base); }
1
0
0
0
Alexandre Julliard : kernel32/tests: Fix some confusing WRITECOPY tests.
by Alexandre Julliard
25 Sep '17
25 Sep '17
Module: wine Branch: master Commit: 0494f036491c86ab539050f01f5da7cb0559b512 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0494f036491c86ab539050f01…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Sep 25 11:37:37 2017 +0200 kernel32/tests: Fix some confusing WRITECOPY tests. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/virtual.c | 43 ++++++++++++++----------------------------- 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index d7d5124..409d479 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -3584,7 +3584,7 @@ static void test_CreateFileMapping_protection(void) { PAGE_EXECUTE_WRITECOPY | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_READ | PAGE_EXECUTE, FALSE, PAGE_NOACCESS } /* 0xf0 */ }; char *base, *ptr; - DWORD ret, i, alloc_prot, prot, old_prot; + DWORD ret, i, alloc_prot, old_prot; MEMORY_BASIC_INFORMATION info; char temp_path[MAX_PATH]; char file_name[MAX_PATH]; @@ -3641,16 +3641,6 @@ static void test_CreateFileMapping_protection(void) ok(info.State == MEM_COMMIT, "%d: %#x != MEM_COMMIT\n", i, info.State); ok(info.Type == MEM_MAPPED, "%d: %#x != MEM_MAPPED\n", i, info.Type); - if (is_mem_writable(info.Protect)) - { - base[0] = 0xfe; - - SetLastError(0xdeadbeef); - ret = VirtualQuery(base, &info, sizeof(info)); - ok(ret, "VirtualQuery failed %d\n", GetLastError()); - ok(info.Protect == td[i].prot, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].prot); - } - SetLastError(0xdeadbeef); ptr = VirtualAlloc(base, si.dwPageSize, MEM_COMMIT, td[i].prot); ok(!ptr, "%d: VirtualAlloc(%02x) should fail\n", i, td[i].prot); @@ -3682,19 +3672,19 @@ static void test_CreateFileMapping_protection(void) hmap = CreateFileMappingW(hfile, NULL, alloc_prot, 0, si.dwPageSize, NULL); ok(hmap != 0, "%d: CreateFileMapping error %d\n", i, GetLastError()); - SetLastError(0xdeadbeef); - base = MapViewOfFile(hmap, FILE_MAP_READ | FILE_MAP_WRITE | (page_exec_supported ? FILE_MAP_EXECUTE : 0), 0, 0, 0); - ok(base != NULL, "MapViewOfFile failed %d\n", GetLastError()); - - old_prot = 0xdeadbeef; - SetLastError(0xdeadbeef); - ret = VirtualProtect(base, si.dwPageSize, PAGE_NOACCESS, &old_prot); - ok(ret, "VirtualProtect error %d\n", GetLastError()); - ok(old_prot == alloc_prot, "got %#x != expected %#x\n", old_prot, alloc_prot); - for (i = 0; i < sizeof(td)/sizeof(td[0]); i++) { SetLastError(0xdeadbeef); + base = MapViewOfFile(hmap, FILE_MAP_READ | FILE_MAP_WRITE | (page_exec_supported ? FILE_MAP_EXECUTE : 0), 0, 0, 0); + ok(base != NULL, "MapViewOfFile failed %d\n", GetLastError()); + + old_prot = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = VirtualProtect(base, si.dwPageSize, PAGE_NOACCESS, &old_prot); + ok(ret, "VirtualProtect error %d\n", GetLastError()); + ok(old_prot == alloc_prot, "got %#x != expected %#x\n", old_prot, alloc_prot); + + SetLastError(0xdeadbeef); ret = VirtualQuery(base, &info, sizeof(info)); ok(ret, "VirtualQuery failed %d\n", GetLastError()); ok(info.BaseAddress == base, "%d: got %p != expected %p\n", i, info.BaseAddress, base); @@ -3735,18 +3725,12 @@ static void test_CreateFileMapping_protection(void) ok(ret, "%d: VirtualProtect error %d\n", i, GetLastError()); ok(old_prot == PAGE_NOACCESS, "%d: got %#x != expected PAGE_NOACCESS\n", i, old_prot); - prot = td[i].prot; - /* looks strange but Windows doesn't do this for PAGE_WRITECOPY */ - if (prot == PAGE_EXECUTE_WRITECOPY) prot = PAGE_EXECUTE_READWRITE; - SetLastError(0xdeadbeef); ret = VirtualQuery(base, &info, sizeof(info)); ok(ret, "VirtualQuery failed %d\n", GetLastError()); ok(info.BaseAddress == base, "%d: got %p != expected %p\n", i, info.BaseAddress, base); ok(info.RegionSize == si.dwPageSize, "%d: got %#lx != expected %#x\n", i, info.RegionSize, si.dwPageSize); - /* FIXME: remove the condition below once Wine is fixed */ - todo_wine_if (td[i].prot == PAGE_EXECUTE_WRITECOPY) - ok(info.Protect == prot, "%d: got %#x != expected %#x\n", i, info.Protect, prot); + ok(info.Protect == td[i].prot, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].prot); ok(info.AllocationBase == base, "%d: %p != %p\n", i, info.AllocationBase, base); ok(info.AllocationProtect == alloc_prot, "%d: %#x != %#x\n", i, info.AllocationProtect, alloc_prot); ok(info.State == MEM_COMMIT, "%d: %#x != MEM_COMMIT\n", i, info.State); @@ -3778,9 +3762,10 @@ static void test_CreateFileMapping_protection(void) /* FIXME: remove the condition below once Wine is fixed */ todo_wine_if (td[i].prot == PAGE_WRITECOPY || td[i].prot == PAGE_EXECUTE_WRITECOPY) ok(old_prot == td[i].prot_after_write, "%d: got %#x != expected %#x\n", i, old_prot, td[i].prot_after_write); + + UnmapViewOfFile(base); } - UnmapViewOfFile(base); CloseHandle(hmap); CloseHandle(hfile);
1
0
0
0
Nikolay Sivov : shell32: Partially implement MapColumnToSCID().
by Alexandre Julliard
25 Sep '17
25 Sep '17
Module: wine Branch: master Commit: f23edde42cf67ecc8b1ca09cbf82b1009b8eabc2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f23edde42cf67ecc8b1ca09cb…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Sep 25 10:59:36 2017 +0300 shell32: Partially implement MapColumnToSCID(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/cpanelfolder.c | 7 ++++--- dlls/shell32/shfldr.h | 5 +++++ dlls/shell32/shfldr_desktop.c | 25 +++++++++++++++---------- dlls/shell32/shfldr_fs.c | 25 +++++++++++++++---------- dlls/shell32/shfldr_mycomp.c | 23 ++++++++++++++--------- dlls/shell32/shfldr_netplaces.c | 17 ++++++++++------- dlls/shell32/shfldr_printers.c | 24 ++++++++++++++---------- dlls/shell32/shfldr_unixfs.c | 31 +++++++++++++++++-------------- dlls/shell32/shlfolder.c | 15 +++++++++++++++ 9 files changed, 109 insertions(+), 63 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=f23edde42cf67ecc8b1ca…
1
0
0
0
Nikolay Sivov : include: Added stgprop.h.
by Alexandre Julliard
25 Sep '17
25 Sep '17
Module: wine Branch: master Commit: 398d42585e705572e105ec03deca3fb2b663724b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=398d42585e705572e105ec03d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Sep 25 10:59:35 2017 +0300 include: Added stgprop.h. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/Makefile.in | 1 + include/ntquery.h | 25 +------------------------ include/stgprop.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 24 deletions(-) diff --git a/include/Makefile.in b/include/Makefile.in index fd52a5f..236d2bd 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -620,6 +620,7 @@ HEADER_SRCS = \ sqlucode.h \ srrestoreptapi.h \ sspi.h \ + stgprop.h \ sti.h \ storage.h \ strsafe.h \ diff --git a/include/ntquery.h b/include/ntquery.h index 928dafc..307304f 100644 --- a/include/ntquery.h +++ b/include/ntquery.h @@ -19,8 +19,7 @@ #ifndef __WINE_NTQUERY_H__ #define __WINE_NTQUERY_H__ -/* FIXME: #include <stgprop.h> */ - +#include "stgprop.h" #include <pshpack4.h> typedef struct _CI_STATE @@ -44,28 +43,6 @@ typedef struct _CI_STATE #include <poppack.h> -#define PSGUID_STORAGE {0xb725f130, 0x47ef, 0x101a, {0xa5, 0xf1, 0x02, 0x60, 0x8c, 0x9e, 0xeb, 0xac}} -#define PID_STG_DIRECTORY ((PROPID)0x02) -#define PID_STG_CLASSID ((PROPID)0x03) -#define PID_STG_STORAGETYPE ((PROPID)0x04) -#define PID_STG_VOLUME_ID ((PROPID)0x05) -#define PID_STG_PARENT_WORKID ((PROPID)0x06) -#define PID_STG_SECONDARYSTORE ((PROPID)0x07) -#define PID_STG_FILEINDEX ((PROPID)0x08) -#define PID_STG_LASTCHANGEUSN ((PROPID)0x09) -#define PID_STG_NAME ((PROPID)0x0a) -#define PID_STG_PATH ((PROPID)0x0b) -#define PID_STG_SIZE ((PROPID)0x0c) -#define PID_STG_ATTRIBUTES ((PROPID)0x0d) -#define PID_STG_WRITETIME ((PROPID)0x0e) -#define PID_STG_CREATETIME ((PROPID)0x0f) -#define PID_STG_ACCESSTIME ((PROPID)0x10) -#define PID_STG_CHANGETIME ((PROPID)0x11) -#define PID_STG_CONTENTS ((PROPID)0x13) -#define PID_STG_SHORTNAME ((PROPID)0x14) -#define PID_STG_MAX PID_STG_SHORTNAME - - #ifdef __cplusplus extern "C" { #endif diff --git a/include/stgprop.h b/include/stgprop.h new file mode 100644 index 0000000..5688a0b --- /dev/null +++ b/include/stgprop.h @@ -0,0 +1,43 @@ +/* + * Copyright 2017 Nikolay Sivov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_STGPROP_H__ +#define __WINE_STGPROP_H__ + +#define PSGUID_STORAGE {0xb725f130, 0x47ef, 0x101a, {0xa5, 0xf1, 0x02, 0x60, 0x8c, 0x9e, 0xeb, 0xac}} +#define PID_STG_DIRECTORY ((PROPID)0x02) +#define PID_STG_CLASSID ((PROPID)0x03) +#define PID_STG_STORAGETYPE ((PROPID)0x04) +#define PID_STG_VOLUME_ID ((PROPID)0x05) +#define PID_STG_PARENT_WORKID ((PROPID)0x06) +#define PID_STG_SECONDARYSTORE ((PROPID)0x07) +#define PID_STG_FILEINDEX ((PROPID)0x08) +#define PID_STG_LASTCHANGEUSN ((PROPID)0x09) +#define PID_STG_NAME ((PROPID)0x0a) +#define PID_STG_PATH ((PROPID)0x0b) +#define PID_STG_SIZE ((PROPID)0x0c) +#define PID_STG_ATTRIBUTES ((PROPID)0x0d) +#define PID_STG_WRITETIME ((PROPID)0x0e) +#define PID_STG_CREATETIME ((PROPID)0x0f) +#define PID_STG_ACCESSTIME ((PROPID)0x10) +#define PID_STG_CHANGETIME ((PROPID)0x11) +#define PID_STG_CONTENTS ((PROPID)0x13) +#define PID_STG_SHORTNAME ((PROPID)0x14) +#define PID_STG_MAX PID_STG_SHORTNAME + +#endif
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
45
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Results per page:
10
25
50
100
200