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
May 2012
----- 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
12 participants
227 discussions
Start a n
N
ew thread
[akhaldi] 56621: [MSCMS] * Sync to Wine 1.5.4.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat May 19 11:45:34 2012 New Revision: 56621 URL:
http://svn.reactos.org/svn/reactos?rev=56621&view=rev
Log: [MSCMS] * Sync to Wine 1.5.4. Modified: trunk/reactos/dll/win32/mscms/CMakeLists.txt trunk/reactos/dll/win32/mscms/profile.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/mscms/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/CMakeLists…
============================================================================== --- trunk/reactos/dll/win32/mscms/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/CMakeLists.txt [iso-8859-1] Sat May 19 11:45:34 2012 @@ -1,8 +1,6 @@ add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - -set_rc_compiler() spec2def(mscms.dll mscms.spec) Modified: trunk/reactos/dll/win32/mscms/profile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscms/profile.c?…
============================================================================== --- trunk/reactos/dll/win32/mscms/profile.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscms/profile.c [iso-8859-1] Sat May 19 11:45:34 2012 @@ -253,13 +253,12 @@ { ret = GetColorDirectoryW( NULL, NULL, &sizeW ); *size = sizeW / sizeof(WCHAR); - return FALSE; + return ret; } sizeW = *size * sizeof(WCHAR); bufferW = HeapAlloc( GetProcessHeap(), 0, sizeW ); - if (bufferW) { if ((ret = GetColorDirectoryW( NULL, bufferW, &sizeW ))) @@ -594,11 +593,10 @@ { ret = GetStandardColorSpaceProfileW( NULL, id, NULL, &sizeW ); *size = sizeW / sizeof(WCHAR); - return FALSE; + return ret; } profileW = HeapAlloc( GetProcessHeap(), 0, sizeW ); - if (profileW) { if ((ret = GetStandardColorSpaceProfileW( NULL, id, profileW, &sizeW ))) @@ -1475,7 +1473,6 @@ handle = CreateFileW( profile->pProfileData, flags, sharing, NULL, creation, 0, NULL ); else { - DWORD size; WCHAR *path; if (!GetColorDirectoryW( NULL, NULL, &size ) && GetLastError() == ERROR_MORE_DATA) 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] Sat May 19 11:45:34 2012 @@ -94,7 +94,7 @@ reactos/dll/win32/msacm32 # Autosync reactos/dll/win32/msadp32.acm # Synced to Wine-1.3.37 reactos/dll/win32/mscat32 # Synced to Wine-1.3.37 -reactos/dll/win32/mscms # Synced to Wine-1.3.37 +reactos/dll/win32/mscms # Synced to Wine-1.5.4 reactos/dll/win32/mscoree # Synced to Wine-1.3.37 reactos/dll/win32/msctf # Synced to Wine-1.3.37 reactos/dll/win32/msftedit # Synced to Wine-1.3.37
12 years, 7 months
1
0
0
0
[akhaldi] 56620: [MCIWAVE] * Sync to Wine 1.5.4.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat May 19 11:34:35 2012 New Revision: 56620 URL:
http://svn.reactos.org/svn/reactos?rev=56620&view=rev
Log: [MCIWAVE] * Sync to Wine 1.5.4. Modified: trunk/reactos/dll/win32/mciwave/mciwave.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/mciwave/mciwave.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciwave/mciwave.…
============================================================================== --- trunk/reactos/dll/win32/mciwave/mciwave.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mciwave/mciwave.c [iso-8859-1] Sat May 19 11:34:35 2012 @@ -225,7 +225,7 @@ /************************************************************************** * WAVE_ConvertByteToTimeFormat [internal] */ -static DWORD WAVE_ConvertByteToTimeFormat(WINE_MCIWAVE* wmw, DWORD val, LPDWORD lpRet) +static DWORD WAVE_ConvertByteToTimeFormat(WINE_MCIWAVE* wmw, DWORD val) { DWORD ret = 0; @@ -243,7 +243,6 @@ WARN("Bad time format %u!\n", wmw->dwMciTimeFormat); } TRACE("val=%u=0x%08x [tf=%u] => ret=%u\n", val, val, wmw->dwMciTimeFormat, ret); - *lpRet = 0; return ret; } @@ -257,6 +256,9 @@ switch (wmw->dwMciTimeFormat) { case MCI_FORMAT_MILLISECONDS: ret = MulDiv(val,wmw->lpWaveFormat->nAvgBytesPerSec,1000); + if (ret > wmw->ckWaveData.cksize && + val == WAVE_ConvertByteToTimeFormat(wmw, wmw->ckWaveData.cksize)) + ret = wmw->ckWaveData.cksize; break; case MCI_FORMAT_BYTES: ret = val; @@ -868,6 +870,10 @@ whidx = 0; wmw->hEvent = CreateEventW(NULL, FALSE, FALSE, NULL); + if (!wmw->hEvent) { + dwRet = MCIERR_OUT_OF_MEMORY; + goto cleanUp; + } wmw->dwEventCount = 1L; /* for first buffer */ TRACE("Playing (normalized) from byte=%u for %u bytes\n", wmw->dwPosition, left); @@ -919,6 +925,7 @@ wmw->hWave = 0; } CloseHandle(wmw->hEvent); + wmw->hEvent = NULL; wmw->dwStatus = MCI_MODE_STOP; @@ -1484,7 +1491,7 @@ return MCIERR_UNSUPPORTED_FUNCTION; } /* only one track in file is currently handled, so don't take care of MCI_TRACK flag */ - lpParms->dwReturn = WAVE_ConvertByteToTimeFormat(wmw, wmw->ckWaveData.cksize, &ret); + lpParms->dwReturn = WAVE_ConvertByteToTimeFormat(wmw, wmw->ckWaveData.cksize); TRACE("MCI_STATUS_LENGTH => %lu\n", lpParms->dwReturn); break; case MCI_STATUS_MODE: @@ -1509,8 +1516,7 @@ } /* only one track in file is currently handled, so don't take care of MCI_TRACK flag */ lpParms->dwReturn = WAVE_ConvertByteToTimeFormat(wmw, - (dwFlags & MCI_STATUS_START) ? 0 : wmw->dwPosition, - &ret); + (dwFlags & MCI_STATUS_START) ? 0 : wmw->dwPosition); TRACE("MCI_STATUS_POSITION %s => %lu\n", (dwFlags & MCI_STATUS_START) ? "start" : "current", lpParms->dwReturn); break; 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] Sat May 19 11:34:35 2012 @@ -87,7 +87,7 @@ reactos/dll/win32/mcicda # Synced to Wine-1.3.37 reactos/dll/win32/mciqtz32 # Synced to Wine-1.5.4 reactos/dll/win32/mciseq # Synced to Wine-1.3.37 -reactos/dll/win32/mciwave # Synced to Wine-1.3.37 +reactos/dll/win32/mciwave # Synced to Wine-1.5.4 reactos/dll/win32/mlang # Synced to Wine-1.3.37 reactos/dll/win32/mpr # Autosync reactos/dll/win32/mprapi # Synced to Wine-1.3.37
12 years, 7 months
1
0
0
0
[akhaldi] 56619: [MCOQTZ32] * Sync to Wine 1.5.4.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat May 19 11:26:15 2012 New Revision: 56619 URL:
http://svn.reactos.org/svn/reactos?rev=56619&view=rev
Log: [MCOQTZ32] * Sync to Wine 1.5.4. Added: trunk/reactos/dll/win32/mciqtz32/mciavi_res.rc (with props) Modified: trunk/reactos/dll/win32/mciqtz32/CMakeLists.txt 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/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciqtz32/CMakeLi…
============================================================================== --- trunk/reactos/dll/win32/mciqtz32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mciqtz32/CMakeLists.txt [iso-8859-1] Sat May 19 11:26:15 2012 @@ -6,13 +6,12 @@ list(APPEND SOURCE mciqtz.c + mciavi_res.rc version.rc ${CMAKE_CURRENT_BINARY_DIR}/mciqtz32.def) add_library(mciqtz32 SHARED ${SOURCE}) - set_module_type(mciqtz32 win32dll) - target_link_libraries(mciqtz32 wine strmiids) add_importlibs(mciqtz32 winmm oleaut32 ole32 user32 gdi32 msvcrt kernel32 ntdll) add_cd_file(TARGET mciqtz32 DESTINATION reactos/system32 FOR all) Added: trunk/reactos/dll/win32/mciqtz32/mciavi_res.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mciqtz32/mciavi_…
============================================================================== --- trunk/reactos/dll/win32/mciqtz32/mciavi_res.rc (added) +++ trunk/reactos/dll/win32/mciqtz32/mciavi_res.rc [iso-8859-1] Sat May 19 11:26:15 2012 @@ -1,0 +1,579 @@ +/* MciAvi resources + * + * Copyright (c) 2000, Eric Pouech + * + * 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 + */ + +#include "windef.h" +#include "winbase.h" +#include "mmddk.h" +#include "digitalv.h" + +#ifdef MCI_INTEGER64 +#define MCI_DWORD_PTR MCI_INTEGER64 +#else +#define MCI_DWORD_PTR MCI_INTEGER +#endif + +MCIAVI RCDATA +BEGIN +L"play\0", MCI_PLAY, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"from\0", 0x00000004L, MCI_INTEGER, +L"to\0", 0x00000008L, MCI_INTEGER, +L"repeat\0", 0x00010000L, MCI_FLAG, +L"reverse\0", 0x00020000L, MCI_FLAG, +L"window\0", 0x01000000L, MCI_FLAG, +L"fullscreen by 2\0", 0x04000000L, MCI_FLAG, +L"fullscreen\0", 0x02000000L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"capability\0", MCI_GETDEVCAPS, 0, MCI_COMMAND_HEAD, +L"\0", MCI_INTEGER, 0, MCI_RETURN, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"\0", 0x00000100L, MCI_CONSTANT, +L"can record\0", 0x00000001L, MCI_INTEGER, +L"has audio\0", 0x00000002L, MCI_INTEGER, +L"has video\0", 0x00000003L, MCI_INTEGER, +L"uses files\0", 0x00000005L, MCI_INTEGER, +L"compound device\0", 0x00000006L, MCI_INTEGER, +L"device type\0", 0x00000004L, MCI_INTEGER, +L"can eject\0", 0x00000007L, MCI_INTEGER, +L"can play\0", 0x00000008L, MCI_INTEGER, +L"can save\0", 0x00000009L, MCI_INTEGER, +L"can lock\0", 0x00004000L, MCI_INTEGER, +L"can reverse\0", 0x00004004L, MCI_INTEGER, +L"can stretch input\0", 0x00004008L, MCI_INTEGER, +L"can stretch\0", 0x00004001L, MCI_INTEGER, +L"can test\0", 0x00004009L, MCI_INTEGER, +L"has still\0", 0x00004005L, MCI_INTEGER, +L"can freeze\0", 0x00004002L, MCI_INTEGER, +L"uses palettes\0", 0x00004006L, MCI_INTEGER, +L"windows\0", 0x00004003L, MCI_INTEGER, +L"maximum play rate\0", 0x0000400aL, MCI_INTEGER, +L"minimum play rate\0", 0x0000400bL, MCI_INTEGER, +L"can colorkey\0", 0x00004100L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"capture\0", MCI_CAPTURE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"as\0", 0x00010000L, MCI_STRING, +L"at\0", 0x00020000L, MCI_RECT, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"close\0", MCI_CLOSE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"configure\0", MCI_CONFIGURE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"copy\0", MCI_COPY, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"from\0", 0x00000004L, MCI_INTEGER, +L"to\0", 0x00000008L, MCI_INTEGER, +L"at\0", 0x00010000L, MCI_RECT, +L"audio stream\0", 0x00020000L, MCI_INTEGER, +L"video stream\0", 0x00040000L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"cue\0", MCI_CUE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"input\0", 0x00010000L, MCI_FLAG, +L"output\0", 0x00020000L, MCI_FLAG, +L"to\0", 0x00000008L, MCI_INTEGER, +L"noshow\0", 0x00040000L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"cut\0", MCI_CUT, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"from\0", 0x00000004L, MCI_INTEGER, +L"to\0", 0x00000008L, MCI_INTEGER, +L"at\0", 0x00010000L, MCI_RECT, +L"audio stream\0", 0x00020000L, MCI_INTEGER, +L"video stream\0", 0x00040000L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"delete\0", MCI_DELETE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"from\0", 0x00000004L, MCI_INTEGER, +L"to\0", 0x00000008L, MCI_INTEGER, +L"at\0", 0x00010000L, MCI_RECT, +L"audio stream\0", 0x00020000L, MCI_INTEGER, +L"video stream\0", 0x00040000L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"freeze\0", MCI_FREEZE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"at\0", 0x00010000L, MCI_RECT, +L"outside\0", 0x00020000L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"info\0", MCI_INFO, 0, MCI_COMMAND_HEAD, +L"\0", MCI_STRING, 0, MCI_RETURN, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"file\0", 0x00000200L, MCI_FLAG, +L"product\0", 0x00000100L, MCI_FLAG, +L"window text\0", 0x00010000L, MCI_FLAG, +L"usage\0", 0x00004000L, MCI_FLAG, +L"version\0", 0x00000400L, MCI_FLAG, +L"\0", 0x00020000L, MCI_CONSTANT, +L"audio algorithm\0", 0x00004004L, MCI_INTEGER, +L"audio quality\0", 0x00004001L, MCI_INTEGER, +L"still algorithm\0", 0x00004005L, MCI_INTEGER, +L"still quality\0", 0x00004002L, MCI_INTEGER, +L"video algorithm\0", 0x00004006L, MCI_INTEGER, +L"video quality\0", 0x00004003L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"list\0", MCI_LIST, 0, MCI_COMMAND_HEAD, +L"\0", MCI_STRING, 0, MCI_RETURN, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"count\0", 0x00020000L, MCI_FLAG, +L"number\0", 0x00040000L, MCI_INTEGER, +L"\0", 0x00010000L, MCI_CONSTANT, +L"audio algorithm\0", 0x00004000L, MCI_INTEGER, +L"audio quality\0", 0x00004001L, MCI_INTEGER, +L"audio stream\0", 0x00004002L, MCI_INTEGER, +L"still algorithm\0", 0x00004003L, MCI_INTEGER, +L"still quality\0", 0x00004004L, MCI_INTEGER, +L"video algorithm\0", 0x00004005L, MCI_INTEGER, +L"video quality\0", 0x00004006L, MCI_INTEGER, +L"video source\0", 0x00004008L, MCI_INTEGER, +L"video stream\0", 0x00004007L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"algorithm\0", 0x00080000L, MCI_STRING, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"load\0", MCI_LOAD, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"\0", 0x00000100L, MCI_STRING, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"monitor\0", MCI_MONITOR, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"\0", 0x00020000L, MCI_CONSTANT, +L"input\0", 0x00004000L, MCI_INTEGER, +L"file\0", 0x00004001L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"method\0", 0x00010000L, MCI_CONSTANT, +L"pre\0", 0x0000a000L, MCI_INTEGER, +L"post\0", 0x0000a001L, MCI_INTEGER, +L"direct\0", 0x0000a002L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"open\0", MCI_OPEN, 0, MCI_COMMAND_HEAD, +L"\0", MCI_INTEGER, 0, MCI_RETURN, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"type\0", 0x00002000L, MCI_STRING, +L"element\0", 0x00000200L, MCI_STRING, +L"alias\0", 0x00000400L, MCI_STRING, +L"shareable\0", 0x00000100L, MCI_FLAG, +L"style\0", 0x00010000L, MCI_CONSTANT, +L"overlapped\0", 0x00cf0000L, MCI_INTEGER, +L"popup\0", 0x80880000L, MCI_INTEGER, +L"child\0", 0x40000000L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"parent\0", 0x00020000L, MCI_HWND, +L"nostatic\0", 0x00040000L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"paste\0", MCI_PASTE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"to\0", 0x00000008L, MCI_INTEGER, +L"at\0", 0x00010000L, MCI_RECT, +L"insert\0", 0x00080000L, MCI_FLAG, +L"overwrite\0", 0x00100000L, MCI_FLAG, +L"audio stream\0", 0x00020000L, MCI_INTEGER, +L"video stream\0", 0x00040000L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"pause\0", MCI_PAUSE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"put\0", MCI_PUT, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"at\0", 0x00010000L, MCI_RECT, +L"source\0", 0x00020000L, MCI_FLAG, +L"destination\0", 0x00040000L, MCI_FLAG, +L"frame\0", 0x00080000L, MCI_FLAG, +L"video\0", 0x00100000L, MCI_FLAG, +L"window\0", 0x00200000L, MCI_FLAG, +L"client\0", 0x00400000L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"quality\0", MCI_QUALITY, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"\0", 0x00010000L, MCI_CONSTANT, +L"audio\0", 0x00004000L, MCI_INTEGER, +L"still\0", 0x00004001L, MCI_INTEGER, +L"video\0", 0x00004002L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"name\0", 0x00020000L, MCI_STRING, +L"algorithm\0", 0x00040000L, MCI_STRING, +L"dialog\0", 0x00080000L, MCI_FLAG, +L"handle\0", 0x00100000L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"realize\0", MCI_REALIZE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"normal\0", 0x00010000L, MCI_FLAG, +L"background\0", 0x00020000L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"record\0", MCI_RECORD, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"from\0", 0x00000004L, MCI_INTEGER, +L"to\0", 0x00000008L, MCI_INTEGER, +L"insert\0", 0x00000100L, MCI_FLAG, +L"overwrite\0", 0x00000200L, MCI_FLAG, +L"at\0", 0x00010000L, MCI_RECT, +L"hold\0", 0x00020000L, MCI_FLAG, +L"audio stream\0", 0x00040000L, MCI_INTEGER, +L"video stream\0", 0x00080000L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"reserve\0", MCI_RESERVE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"in\0", 0x00010000L, MCI_STRING, +L"size\0", 0x00020000L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"restore\0", MCI_RESTORE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"from\0", 0x00010000L, MCI_STRING, +L"at\0", 0x00020000L, MCI_RECT, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"resume\0", MCI_RESUME, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"save\0", MCI_SAVE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"\0", 0x00000100L, MCI_STRING, +L"at\0", 0x00010000L, MCI_RECT, +L"abort\0", 0x00020000L, MCI_FLAG, +L"keepreserve\0", 0x00040000L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"seek\0", MCI_SEEK, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"to start\0", 0x00000100L, MCI_FLAG, +L"to end\0", 0x00000200L, MCI_FLAG, +L"to\0", 0x00000008L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"set\0", MCI_SET, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"time format\0", 0x00000400L, MCI_CONSTANT, +L"frames\0", 0x00000003L, MCI_INTEGER, +L"milliseconds\0", 0x00000000L, MCI_INTEGER, +L"ms\0", 0x00000000L, MCI_INTEGER, +L"bytes\0", 0x00000008L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"door open\0", 0x00000100L, MCI_FLAG, +L"door closed\0", 0x00000200L, MCI_FLAG, +L"audio\0", 0x00000800L, MCI_CONSTANT, +L"all\0", 0x00000000L, MCI_INTEGER, +L"left\0", 0x00000001L, MCI_INTEGER, +L"right\0", 0x00000002L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"video\0", 0x00001000L, MCI_FLAG, +L"seek exactly\0", 0x00010000L, MCI_FLAG, +L"file format\0", 0x00080000L, MCI_CONSTANT, +L"avss\0", 0x00004000L, MCI_INTEGER, +L"avi\0", 0x00004001L, MCI_INTEGER, +L"dib\0", 0x00004002L, MCI_INTEGER, +L"rdib\0", 0x00004003L, MCI_INTEGER, +L"jpeg\0", 0x00004004L, MCI_INTEGER, +L"rjpeg\0", 0x00004005L, MCI_INTEGER, +L"jfif\0", 0x00004006L, MCI_INTEGER, +L"mpeg\0", 0x00004007L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"still\0", 0x00040000L, MCI_FLAG, +L"on\0", 0x00002000L, MCI_FLAG, +L"off\0", 0x00004000L, MCI_FLAG, +L"speed\0", 0x00020000L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"setaudio\0", MCI_SETAUDIO, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"\0", 0x00800000L, MCI_CONSTANT, +L"bass\0", 0x00004001L, MCI_INTEGER, +L"treble\0", 0x00004000L, MCI_INTEGER, +L"volume\0", 0x00004002L, MCI_INTEGER, +L"stream\0", 0x00004003L, MCI_INTEGER, +L"source\0", 0x00004004L, MCI_INTEGER, +L"samplespersec\0", 0x00004005L, MCI_INTEGER, +L"bytespersec\0", 0x00004006L, MCI_INTEGER, +L"alignment\0", 0x00004007L, MCI_INTEGER, +L"bitspersample\0", 0x00004008L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"to\0", 0x01000000L, MCI_CONSTANT, +L"left\0", 0x00000001L, MCI_INTEGER, +L"right\0", 0x00000002L, MCI_INTEGER, +L"average\0", 0x00004000L, MCI_INTEGER, +L"stereo\0", 0x00000000L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"over\0", 0x00010000L, MCI_INTEGER, +L"algorithm\0", 0x00040000L, MCI_STRING, +L"quality\0", 0x00080000L, MCI_STRING, +L"record\0", 0x00100000L, MCI_FLAG, +L"left\0", 0x00200000L, MCI_FLAG, +L"clocktime\0", 0x00020000L, MCI_FLAG, +L"right\0", 0x00400000L, MCI_FLAG, +L"on\0", 0x00002000L, MCI_FLAG, +L"off\0", 0x00004000L, MCI_FLAG, +L"input\0", 0x02000000L, MCI_FLAG, +L"output\0", 0x04000000L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"setvideo\0", MCI_SETVIDEO, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"\0", 0x00100000L, MCI_CONSTANT, +L"frame rate\0", 0x00004008L, MCI_INTEGER, +L"brightness\0", 0x00004000L, MCI_INTEGER, +L"color\0", 0x00004001L, MCI_INTEGER, +L"contrast\0", 0x00004002L, MCI_INTEGER, +L"tint\0", 0x00004003L, MCI_INTEGER, +L"sharpness\0", 0x00004004L, MCI_INTEGER, +L"gamma\0", 0x00004005L, MCI_INTEGER, +L"palette handle\0", 0x00004007L, MCI_INTEGER, +L"stream\0", 0x00004006L, MCI_INTEGER, +L"source\0", 0x00004009L, MCI_INTEGER, +L"key index\0", 0x0000400aL, MCI_INTEGER, +L"key color\0", 0x0000400bL, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"to\0", 0x01000000L, MCI_CONSTANT, +L"ntsc\0", 0x00004000L, MCI_INTEGER, +L"rgb\0", 0x00004001L, MCI_INTEGER, +L"svideo\0", 0x00004002L, MCI_INTEGER, +L"pal\0", 0x00004003L, MCI_INTEGER, +L"secam\0", 0x00004004L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"quality\0", 0x00010000L, MCI_STRING, +L"algorithm\0", 0x00020000L, MCI_STRING, +L"number\0", 0x00080000L, MCI_INTEGER, +L"over\0", 0x00200000L, MCI_INTEGER, +L"record\0", 0x00400000L, MCI_FLAG, +L"still\0", 0x00800000L, MCI_FLAG, +L"clocktime\0", 0x00040000L, MCI_FLAG, +L"on\0", 0x00002000L, MCI_FLAG, +L"off\0", 0x00004000L, MCI_FLAG, +L"input\0", 0x02000000L, MCI_FLAG, +L"output\0", 0x04000000L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"signal\0", MCI_SIGNAL, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"at\0", 0x00010000L, MCI_INTEGER, +L"every\0", 0x00020000L, MCI_INTEGER, +L"uservalue\0", 0x00040000L, MCI_INTEGER, +L"cancel\0", 0x00080000L, MCI_FLAG, +L"return position\0", 0x00100000L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"status\0", MCI_STATUS, 0, MCI_COMMAND_HEAD, +L"\0", MCI_DWORD_PTR, 0, MCI_RETURN, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"\0", 0x00000100L, MCI_CONSTANT, +L"frames skipped\0", 0x00008001L, MCI_INTEGER, +L"play speed\0", 0x00008002L, MCI_INTEGER, +L"audio breaks\0", 0x00008003L, MCI_INTEGER, +L"alignment\0", 0x00004029L, MCI_INTEGER, +L"audio input\0", 0x00004000L, MCI_INTEGER, +L"audio record\0", 0x0000401aL, MCI_INTEGER, +L"audio source\0", 0x00004009L, MCI_INTEGER, +L"audio stream\0", 0x0000402dL, MCI_INTEGER, +L"bass\0", 0x0000400fL, MCI_INTEGER, +L"bitsperpel\0", 0x0000402bL, MCI_INTEGER, +L"bitspersample\0", 0x0000402aL, MCI_INTEGER, +L"brightness\0", 0x00004005L, MCI_INTEGER, +L"bytespersec\0", 0x00004028L, MCI_INTEGER, +L"color\0", 0x00004006L, MCI_INTEGER, +L"contrast\0", 0x00004007L, MCI_INTEGER, +L"current track\0", 0x00000008L, MCI_INTEGER, +L"file format\0", 0x00004008L, MCI_INTEGER, +L"still file format\0", 0x0000401dL, MCI_INTEGER, +L"file mode\0", 0x0000401fL, MCI_INTEGER, +L"file completion\0", 0x00004020L, MCI_INTEGER, +L"forward\0", 0x0000402cL, MCI_INTEGER, +L"gamma\0", 0x0000400aL, MCI_INTEGER, +L"length\0", 0x00000001L, MCI_INTEGER, +L"media present\0", 0x00000005L, MCI_INTEGER, +L"mode\0", 0x00000004L, MCI_INTEGER, +L"monitor method\0", 0x0000400cL, MCI_INTEGER, +L"monitor\0", 0x0000400bL, MCI_INTEGER, +L"number of tracks\0", 0x00000003L, MCI_INTEGER, +L"palette handle\0", 0x00004004L, MCI_INTEGER, +L"pause mode\0", 0x00004026L, MCI_INTEGER, +L"position\0", 0x00000002L, MCI_INTEGER, +L"ready\0", 0x00000007L, MCI_INTEGER, +L"frame rate\0", 0x0000400eL, MCI_INTEGER, +L"reserved size\0", 0x00004010L, MCI_INTEGER, +L"samplespersec\0", 0x00004027L, MCI_INTEGER, +L"seek exactly\0", 0x00004011L, MCI_INTEGER, +L"sharpness\0", 0x00004012L, MCI_INTEGER, +L"smpte\0", 0x00004013L, MCI_INTEGER, +L"speed\0", 0x00004003L, MCI_INTEGER, +L"time format\0", 0x00000006L, MCI_INTEGER, +L"tint\0", 0x00004015L, MCI_INTEGER, +L"treble\0", 0x00004016L, MCI_INTEGER, +L"unsaved\0", 0x00004017L, MCI_INTEGER, +L"video key color\0", 0x00004025L, MCI_INTEGER, +L"video key index\0", 0x00004024L, MCI_INTEGER, +L"video source\0", 0x0000401bL, MCI_INTEGER, +L"video source number\0", 0x0000401eL, MCI_INTEGER, +L"video record\0", 0x0000401cL, MCI_INTEGER, +L"video stream\0", 0x0000402eL, MCI_INTEGER, +L"volume\0", 0x00004019L, MCI_INTEGER, +L"window handle\0", 0x00004001L, MCI_INTEGER, +L"window visible\0", 0x00004021L, MCI_INTEGER, +L"window minimized\0", 0x00004022L, MCI_INTEGER, +L"window maximized\0", 0x00004023L, MCI_INTEGER, +L"video streams\0", 0x00004100L, MCI_INTEGER, +L"video bitrate\0", 0x00004101L, MCI_INTEGER, +L"video maxbitrate\0", 0x00004102L, MCI_INTEGER, +L"audio streams\0", 0x00004103L, MCI_INTEGER, +L"audio bitrate\0", 0x00004104L, MCI_INTEGER, +L"video brush\0", 0x00004105L, MCI_INTEGER, +L"audio\0", 0x00004014L, MCI_INTEGER, +L"video\0", 0x00004018L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"track\0", 0x00000010L, MCI_INTEGER, +L"start\0", 0x00000200L, MCI_FLAG, +L"left\0", 0x00080000L, MCI_FLAG, +L"right\0", 0x00100000L, MCI_FLAG, +L"nominal\0", 0x00020000L, MCI_FLAG, +L"record\0", 0x01000000L, MCI_FLAG, +L"input\0", 0x00400000L, MCI_FLAG, +L"output\0", 0x00800000L, MCI_FLAG, +L"disk space\0", 0x00200000L, MCI_STRING, +L"reference\0", 0x00040000L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"step\0", MCI_STEP, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"reverse\0", 0x00010000L, MCI_FLAG, +L"by\0", 0x00020000L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"stop\0", MCI_STOP, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"hold\0", 0x00010000L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"undo\0", MCI_UNDO, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"unfreeze\0", MCI_UNFREEZE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"at\0", 0x00010000L, MCI_RECT, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"update\0", MCI_UPDATE, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"at\0", 0x00010000L, MCI_RECT, +L"hdc\0", 0x00020000L, MCI_HDC, +L"paint\0", 0x00040000L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"where\0", MCI_WHERE, 0, MCI_COMMAND_HEAD, +L"\0", MCI_RECT, 0, MCI_RETURN, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"source\0", 0x00020000L, MCI_FLAG, +L"destination\0", 0x00040000L, MCI_FLAG, +L"frame\0", 0x00080000L, MCI_FLAG, +L"video\0", 0x00100000L, MCI_FLAG, +L"window\0", 0x00200000L, MCI_FLAG, +L"max\0", 0x00400000L, MCI_FLAG, +L"min\0", 0x00800000L, MCI_FLAG, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"window\0", MCI_WINDOW, 0, MCI_COMMAND_HEAD, +L"notify\0", 0x00000001L, MCI_FLAG, +L"wait\0", 0x00000002L, MCI_FLAG, +L"test\0", 0x00000020L, MCI_FLAG, +L"handle\0", 0x00010000L, MCI_CONSTANT, +L"default\0", 0x00000000L, MCI_HWND, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"state\0", 0x00040000L, MCI_CONSTANT, +L"hide\0", 0x00000000L, MCI_INTEGER, +L"minimize\0", 0x00000006L, MCI_INTEGER, +L"restore\0", 0x00000009L, MCI_INTEGER, +L"show maximized\0", 0x00000003L, MCI_INTEGER, +L"show min noactive\0", 0x00000007L, MCI_INTEGER, +L"show minimized\0", 0x00000002L, MCI_INTEGER, +L"show na\0", 0x00000008L, MCI_INTEGER, +L"show noactivate\0", 0x00000004L, MCI_INTEGER, +L"show normal\0", 0x00000001L, MCI_INTEGER, +L"show\0", 0x00000005L, MCI_INTEGER, +L"no action\0", 0x00000008L, MCI_INTEGER, +L"minimized\0", 0x00000002L, MCI_INTEGER, +L"\0", 0x00000000L, MCI_END_CONSTANT, +L"text\0", 0x00080000L, MCI_STRING, +L"\0", 0x00000000L, MCI_END_COMMAND, +L"\0", 0x00000000L, MCI_END_COMMAND_LIST +END + +STRINGTABLE +BEGIN + +MCI_ON_S, "on" +MCI_OFF_S, "off" +END Propchange: trunk/reactos/dll/win32/mciqtz32/mciavi_res.rc ------------------------------------------------------------------------------ svn:eol-style = native 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] Sat May 19 11:26:15 2012 @@ -37,7 +37,7 @@ * MCI QTZ implementation * *======================================================================*/ -HINSTANCE MCIQTZ_hInstance = 0; +static HINSTANCE MCIQTZ_hInstance = 0; /*********************************************************************** * DllMain (MCIQTZ.0) @@ -145,8 +145,8 @@ { WINE_MCIQTZ* wma; HRESULT hr; - IBasicVideo *vidbasic; - IVideoWindow *vidwin; + DWORD style = 0; + RECT rc = { 0, 0, 0, 0 }; TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpOpenParms); @@ -171,6 +171,30 @@ hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IMediaControl, (LPVOID*)&wma->pmctrl); if (FAILED(hr)) { TRACE("Cannot get IMediaControl interface (hr = %x)\n", hr); + goto err; + } + + hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IMediaSeeking, (void**)&wma->seek); + if (FAILED(hr)) { + TRACE("Cannot get IMediaSeeking interface (hr = %x)\n", hr); + goto err; + } + + hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IMediaEvent, (void**)&wma->mevent); + if (FAILED(hr)) { + TRACE("Cannot get IMediaEvent interface (hr = %x)\n", hr); + goto err; + } + + hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IVideoWindow, (void**)&wma->vidwin); + if (FAILED(hr)) { + TRACE("Cannot get IVideoWindow interface (hr = %x)\n", hr); + goto err; + } + + hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IBasicVideo, (void**)&wma->vidbasic); + if (FAILED(hr)) { + TRACE("Cannot get IBasicVideo interface (hr = %x)\n", hr); goto err; } @@ -192,33 +216,22 @@ goto err; } - hr = IFilterGraph2_QueryInterface(wma->pgraph, &IID_IVideoWindow, (void**)&vidwin); - if (SUCCEEDED(hr)) - hr = IFilterGraph2_QueryInterface(wma->pgraph, &IID_IBasicVideo, (void**)&vidbasic); - if (SUCCEEDED(hr)) { - DWORD style; - RECT rc = { 0, 0, 0, 0 }; - IVideoWindow_put_AutoShow(vidwin, OAFALSE); - IVideoWindow_put_Visible(vidwin, OAFALSE); - style = 0; - if (dwFlags & MCI_DGV_OPEN_WS) - style |= lpOpenParms->dwStyle; - if (dwFlags & MCI_DGV_OPEN_PARENT) { - IVideoWindow_put_MessageDrain(vidwin, (OAHWND)lpOpenParms->hWndParent); - IVideoWindow_put_WindowState(vidwin, SW_HIDE); - IVideoWindow_put_WindowStyle(vidwin, WS_CHILD); - IVideoWindow_put_Owner(vidwin, (OAHWND)lpOpenParms->hWndParent); - wma->parent = (HWND)lpOpenParms->hWndParent; - } - else if (style) - IVideoWindow_put_WindowStyle(vidwin, style); - IBasicVideo_GetVideoSize(vidbasic, &rc.right, &rc.bottom); - IVideoWindow_SetWindowPosition(vidwin, rc.left, rc.top, rc.right, rc.bottom); - IBasicVideo_Release(vidbasic); - } - if (vidwin) - IVideoWindow_Release(vidwin); - + IVideoWindow_put_AutoShow(wma->vidwin, OAFALSE); + IVideoWindow_put_Visible(wma->vidwin, OAFALSE); + if (dwFlags & MCI_DGV_OPEN_WS) + style = lpOpenParms->dwStyle; + if (dwFlags & MCI_DGV_OPEN_PARENT) { + IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)lpOpenParms->hWndParent); + IVideoWindow_put_WindowState(wma->vidwin, SW_HIDE); + IVideoWindow_put_WindowStyle(wma->vidwin, style|WS_CHILD); + IVideoWindow_put_Owner(wma->vidwin, (OAHWND)lpOpenParms->hWndParent); + GetClientRect(lpOpenParms->hWndParent, &rc); + IVideoWindow_SetWindowPosition(wma->vidwin, rc.left, rc.top, rc.right - rc.top, rc.bottom - rc.top); + wma->parent = (HWND)lpOpenParms->hWndParent; + } + else if (style) + IVideoWindow_put_WindowStyle(wma->vidwin, style); + IBasicVideo_GetVideoSize(wma->vidbasic, &rc.right, &rc.bottom); wma->opened = TRUE; if (dwFlags & MCI_NOTIFY) @@ -227,15 +240,28 @@ return 0; err: + if (wma->vidbasic) + IUnknown_Release(wma->vidbasic); + wma->vidbasic = NULL; + if (wma->seek) + IUnknown_Release(wma->seek); + wma->seek = NULL; + if (wma->vidwin) + IUnknown_Release(wma->vidwin); + wma->vidwin = NULL; if (wma->pgraph) IGraphBuilder_Release(wma->pgraph); wma->pgraph = NULL; + if (wma->mevent) + IMediaEvent_Release(wma->mevent); + wma->mevent = NULL; if (wma->pmctrl) IMediaControl_Release(wma->pmctrl); wma->pmctrl = NULL; if (wma->uninit) CoUninitialize(); + wma->uninit = 0; return MCIERR_INTERNAL; } @@ -256,6 +282,10 @@ MCIQTZ_mciStop(wDevID, MCI_WAIT, NULL); if (wma->opened) { + IUnknown_Release(wma->vidwin); + IUnknown_Release(wma->vidbasic); + IUnknown_Release(wma->seek); + IMediaEvent_Release(wma->mevent); IGraphBuilder_Release(wma->pgraph); IMediaControl_Release(wma->pmctrl); if (wma->uninit) @@ -273,6 +303,9 @@ { WINE_MCIQTZ* wma; HRESULT hr; + REFERENCE_TIME time1 = 0, time2 = 0; + GUID format; + DWORD pos1; TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms); @@ -283,21 +316,34 @@ if (!wma) return MCIERR_INVALID_DEVICE_ID; + IMediaSeeking_GetTimeFormat(wma->seek, &format); + if (dwFlags & MCI_FROM) { + if (IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME)) + time1 = lpParms->dwFrom * 10000; + else + time1 = lpParms->dwFrom; + pos1 = AM_SEEKING_AbsolutePositioning; + } else + pos1 = AM_SEEKING_NoPositioning; + if (dwFlags & MCI_TO) { + if (IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME)) + time2 = lpParms->dwTo * 10000; + else + time2 = lpParms->dwTo; + } else + IMediaSeeking_GetDuration(wma->seek, &time2); + IMediaSeeking_SetPositions(wma->seek, &time1, pos1, &time2, AM_SEEKING_AbsolutePositioning); + hr = IMediaControl_Run(wma->pmctrl); if (FAILED(hr)) { TRACE("Cannot run filtergraph (hr = %x)\n", hr); return MCIERR_INTERNAL; } - if (!wma->parent) { - IVideoWindow *vidwin; - IFilterGraph2_QueryInterface(wma->pgraph, &IID_IVideoWindow, (void**)&vidwin); - if (vidwin) { - IVideoWindow_put_Visible(vidwin, OATRUE); - IVideoWindow_Release(vidwin); - } - } - + IVideoWindow_put_Visible(wma->vidwin, OATRUE); + + if (dwFlags & MCI_NOTIFY) + mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)), wDevID, MCI_NOTIFY_SUCCESSFUL); return 0; } @@ -308,7 +354,6 @@ { WINE_MCIQTZ* wma; HRESULT hr; - IMediaPosition* pmpos; LONGLONG newpos; TRACE("(%04x, %08X, %p)\n", wDevID, dwFlags, lpParms); @@ -335,20 +380,11 @@ return MCIERR_MISSING_PARAMETER; } - hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IMediaPosition, (LPVOID*)&pmpos); - if (FAILED(hr)) { - FIXME("Cannot get IMediaPostion interface (hr = %x)\n", hr); + hr = IMediaSeeking_SetPositions(wma->seek, &newpos, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning); + if (FAILED(hr)) { + FIXME("Cannot set position (hr = %x)\n", hr); return MCIERR_INTERNAL; } - - hr = IMediaPosition_put_CurrentPosition(pmpos, newpos); - if (FAILED(hr)) { - FIXME("Cannot set position (hr = %x)\n", hr); - IMediaPosition_Release(pmpos); - return MCIERR_INTERNAL; - } - - IMediaPosition_Release(pmpos); if (dwFlags & MCI_NOTIFY) mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)), wDevID, MCI_NOTIFY_SUCCESSFUL); @@ -379,14 +415,8 @@ return MCIERR_INTERNAL; } - if (!wma->parent) { - IVideoWindow *vidwin; - IFilterGraph2_QueryInterface(wma->pgraph, &IID_IVideoWindow, (void**)&vidwin); - if (vidwin) { - IVideoWindow_put_Visible(vidwin, OAFALSE); - IVideoWindow_Release(vidwin); - } - } + if (!wma->parent) + IVideoWindow_put_Visible(wma->vidwin, OAFALSE); return 0; } @@ -592,7 +622,6 @@ switch (lpParms->dwItem) { case MCI_STATUS_LENGTH: { - IMediaSeeking *seek; LONGLONG duration = -1; GUID format; switch (wma->time_format) { @@ -600,20 +629,13 @@ case MCI_FORMAT_FRAMES: format = TIME_FORMAT_FRAME; break; default: ERR("Unhandled format %x\n", wma->time_format); break; } - hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IMediaSeeking, (void**)&seek); + hr = IMediaSeeking_SetTimeFormat(wma->seek, &format); if (FAILED(hr)) { - FIXME("Cannot get IMediaPostion interface (hr = %x)\n", hr); - return MCIERR_INTERNAL; - } - hr = IMediaSeeking_SetTimeFormat(seek, &format); - if (FAILED(hr)) { - IMediaSeeking_Release(seek); FIXME("Cannot set time format (hr = %x)\n", hr); lpParms->dwReturn = 0; break; } - hr = IMediaSeeking_GetDuration(seek, &duration); - IMediaSeeking_Release(seek); + hr = IMediaSeeking_GetDuration(wma->seek, &duration); if (FAILED(hr) || duration < 0) { FIXME("Cannot read duration (hr = %x)\n", hr); lpParms->dwReturn = 0; @@ -624,33 +646,42 @@ break; } case MCI_STATUS_POSITION: { - IMediaPosition* pmpos; - REFTIME curpos; - - hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IMediaPosition, (LPVOID*)&pmpos); + REFERENCE_TIME curpos; + + hr = IMediaSeeking_GetCurrentPosition(wma->seek, &curpos); if (FAILED(hr)) { - FIXME("Cannot get IMediaPostion interface (hr = %x)\n", hr); + FIXME("Cannot get position (hr = %x)\n", hr); return MCIERR_INTERNAL; } - - hr = IMediaPosition_get_CurrentPosition(pmpos, &curpos); - if (FAILED(hr)) { - FIXME("Cannot get position (hr = %x)\n", hr); - IMediaPosition_Release(pmpos); - return MCIERR_INTERNAL; - } - - IMediaPosition_Release(pmpos); lpParms->dwReturn = curpos / 10000; - break; } case MCI_STATUS_NUMBER_OF_TRACKS: FIXME("MCI_STATUS_NUMBER_OF_TRACKS not implemented yet\n"); return MCIERR_UNRECOGNIZED_COMMAND; - case MCI_STATUS_MODE: - FIXME("MCI_STATUS_MODE not implemented yet\n"); - return MCIERR_UNRECOGNIZED_COMMAND; + case MCI_STATUS_MODE: { + LONG state = State_Stopped; + IMediaControl_GetState(wma->pmctrl, -1, &state); + if (state == State_Stopped) + lpParms->dwReturn = MCI_MODE_STOP; + else if (state == State_Running) { + LONG code; + LONG_PTR p1, p2; + + lpParms->dwReturn = MCI_MODE_PLAY; + + do { + hr = IMediaEvent_GetEvent(wma->mevent, &code, &p1, &p2, 0); + if (hr == S_OK && code == EC_COMPLETE){ + lpParms->dwReturn = MCI_MODE_STOP; + IMediaControl_Stop(wma->pmctrl); + } + } while (hr == S_OK); + + } else if (state == State_Paused) + lpParms->dwReturn = MCI_MODE_PAUSE; + break; + } case MCI_STATUS_MEDIA_PRESENT: FIXME("MCI_STATUS_MEDIA_PRESENT not implemented yet\n"); return MCIERR_UNRECOGNIZED_COMMAND; @@ -680,8 +711,6 @@ static DWORD MCIQTZ_mciWhere(UINT wDevID, DWORD dwFlags, LPMCI_DGV_RECT_PARMS lpParms) { WINE_MCIQTZ* wma; - IVideoWindow* pVideoWindow; - IBasicVideo *pBasicVideo; HRESULT hr; HWND hWnd; RECT rc; @@ -696,47 +725,23 @@ if (!wma) return MCIERR_INVALID_DEVICE_ID; - /* Find if there is a video stream and get the display window */ - hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IVideoWindow, (LPVOID*)&pVideoWindow); - if (FAILED(hr)) { - ERR("Cannot get IVideoWindow interface (hr = %x)\n", hr); - return MCIERR_INTERNAL; - } - - hr = IGraphBuilder_QueryInterface(wma->pgraph, &IID_IBasicVideo, (LPVOID*)&pBasicVideo); - if (FAILED(hr)) { - ERR("Cannot get IBasicVideo interface (hr = %x)\n", hr); - IUnknown_Release(pVideoWindow); - return MCIERR_INTERNAL; - } - - hr = IVideoWindow_get_Owner(pVideoWindow, (OAHWND*)&hWnd); + hr = IVideoWindow_get_Owner(wma->vidwin, (OAHWND*)&hWnd); if (FAILED(hr)) { TRACE("No video stream, returning no window error\n"); - IUnknown_Release(pVideoWindow); return MCIERR_NO_WINDOW; } if (dwFlags & MCI_DGV_WHERE_SOURCE) { if (dwFlags & MCI_DGV_WHERE_MAX) FIXME("MCI_DGV_WHERE_SOURCE_MAX stub %s\n", wine_dbgstr_rect(&rc)); - IBasicVideo_get_SourceLeft(pBasicVideo, &rc.left); - IBasicVideo_get_SourceTop(pBasicVideo, &rc.top); - IBasicVideo_get_SourceWidth(pBasicVideo, &rc.right); - IBasicVideo_get_SourceHeight(pBasicVideo, &rc.bottom); - /* Undo conversion done below */ - rc.right += rc.left; - rc.bottom += rc.top; + IBasicVideo_GetSourcePosition(wma->vidbasic, &rc.left, &rc.top, &rc.right, &rc.bottom); TRACE("MCI_DGV_WHERE_SOURCE %s\n", wine_dbgstr_rect(&rc)); } if (dwFlags & MCI_DGV_WHERE_DESTINATION) { - if (dwFlags & MCI_DGV_WHERE_MAX) { - GetClientRect(hWnd, &rc); - TRACE("MCI_DGV_WHERE_DESTINATION_MAX %s\n", wine_dbgstr_rect(&rc)); - } else { - FIXME("MCI_DGV_WHERE_DESTINATION not supported yet\n"); - goto out; - } + if (dwFlags & MCI_DGV_WHERE_MAX) + FIXME("MCI_DGV_WHERE_DESTINATION_MAX stub %s\n", wine_dbgstr_rect(&rc)); + IBasicVideo_GetDestinationPosition(wma->vidbasic, &rc.left, &rc.top, &rc.right, &rc.bottom); + TRACE("MCI_DGV_WHERE_DESTINATION %s\n", wine_dbgstr_rect(&rc)); } if (dwFlags & MCI_DGV_WHERE_FRAME) { if (dwFlags & MCI_DGV_WHERE_MAX) @@ -755,25 +760,62 @@ if (dwFlags & MCI_DGV_WHERE_WINDOW) { if (dwFlags & MCI_DGV_WHERE_MAX) { GetWindowRect(GetDesktopWindow(), &rc); + rc.right -= rc.left; + rc.bottom -= rc.top; TRACE("MCI_DGV_WHERE_WINDOW_MAX %s\n", wine_dbgstr_rect(&rc)); } else { - GetWindowRect(hWnd, &rc); + IVideoWindow_GetWindowPosition(wma->vidwin, &rc.left, &rc.top, &rc.right, &rc.bottom); TRACE("MCI_DGV_WHERE_WINDOW %s\n", wine_dbgstr_rect(&rc)); } } ret = 0; - out: - /* In MCI, RECT structure is used differently: rc.right = width & rc.bottom = height - * So convert the normal RECT into a MCI RECT before returning */ - IVideoWindow_Release(pVideoWindow); - IBasicVideo_Release(pBasicVideo); - lpParms->rc.left = rc.left; - lpParms->rc.top = rc.top; - lpParms->rc.right = rc.right - rc.left; - lpParms->rc.bottom = rc.bottom - rc.top; - + lpParms->rc = rc; return ret; +} + +/*************************************************************************** + * MCIQTZ_mciWindow [internal] + */ +static DWORD MCIQTZ_mciWindow(UINT wDevID, DWORD dwFlags, LPMCI_DGV_WINDOW_PARMSW lpParms) +{ + WINE_MCIQTZ *wma = MCIQTZ_mciGetOpenDev(wDevID); + + 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) + return 0; + + if (dwFlags & MCI_DGV_WINDOW_HWND && (IsWindow(lpParms->hWnd) || !lpParms->hWnd)) { + LONG visible = OATRUE; + LONG style = 0; + TRACE("Setting hWnd to %p\n", lpParms->hWnd); + IVideoWindow_get_Visible(wma->vidwin, &visible); + IVideoWindow_put_Visible(wma->vidwin, OAFALSE); + IVideoWindow_get_WindowStyle(wma->vidwin, &style); + style &= ~WS_CHILD; + if (lpParms->hWnd) + IVideoWindow_put_WindowStyle(wma->vidwin, style|WS_CHILD); + else + IVideoWindow_put_WindowStyle(wma->vidwin, style); + IVideoWindow_put_Owner(wma->vidwin, (OAHWND)lpParms->hWnd); + IVideoWindow_put_MessageDrain(wma->vidwin, (OAHWND)lpParms->hWnd); + IVideoWindow_put_Visible(wma->vidwin, visible); + wma->parent = lpParms->hWnd; + } + if (dwFlags & MCI_DGV_WINDOW_STATE) { + TRACE("Setting nCmdShow to %d\n", lpParms->nCmdShow); + IVideoWindow_put_WindowState(wma->vidwin, lpParms->nCmdShow); + } + if (dwFlags & MCI_DGV_WINDOW_TEXT) { + TRACE("Setting caption to %s\n", debugstr_w(lpParms->lpstrText)); + IVideoWindow_put_Caption(wma->vidwin, lpParms->lpstrText); + } + return 0; } /****************************************************************************** @@ -794,51 +836,46 @@ return MCIERR_INVALID_DEVICE_ID; if (dwFlags & MCI_DGV_UPDATE_HDC) { - IBasicVideo *vidbasic; - IVideoWindow *vidwin; + LONG state, size; + BYTE *data; + BITMAPINFO *info; + HRESULT hr; + RECT src, dest; + LONG visible = OATRUE; + res = MCIERR_INTERNAL; - IFilterGraph2_QueryInterface(wma->pgraph, &IID_IVideoWindow, (void**)&vidwin); - IFilterGraph2_QueryInterface(wma->pgraph, &IID_IBasicVideo, (void**)&vidbasic); - if (vidbasic && vidwin) { - LONG state, size; - BYTE *data; - BITMAPINFO *info; - HRESULT hr; - RECT src, dest; - - /* If in stopped state, nothing has been drawn to screen - * moving to pause, which is needed for the old dib renderer, will result - * in a single frame drawn, so hide the window here */ - IVideoWindow_put_Visible(vidwin, OAFALSE); - /* FIXME: Should we check the original state and restore it? */ - IMediaControl_Pause(wma->pmctrl); - IMediaControl_GetState(wma->pmctrl, -1, &state); - if (FAILED(hr = IBasicVideo_GetCurrentImage(vidbasic, &size, NULL))) { - WARN("Could not get image size (hr = %x)\n", hr); - goto out; - } - data = HeapAlloc(GetProcessHeap(), 0, size); - info = (BITMAPINFO*)data; - IBasicVideo_GetCurrentImage(vidbasic, &size, (LONG*)data); - data += info->bmiHeader.biSize; - - IBasicVideo_GetSourcePosition(vidbasic, &src.left, &src.top, &src.right, &src.bottom); - IBasicVideo_GetDestinationPosition(vidbasic, &dest.left, &dest.top, &dest.right, &dest.bottom); - StretchDIBits(lpParms->hDC, - dest.left, dest.top, dest.right + dest.left, dest.bottom + dest.top, - src.left, src.top, src.right + src.left, src.bottom + src.top, - data, info, DIB_RGB_COLORS, SRCCOPY); - HeapFree(GetProcessHeap(), 0, data); + IMediaControl_GetState(wma->pmctrl, -1, &state); + if (state == State_Running) + return MCIERR_UNSUPPORTED_FUNCTION; + /* If in stopped state, nothing has been drawn to screen + * moving to pause, which is needed for the old dib renderer, will result + * in a single frame drawn, so hide the window here */ + IVideoWindow_get_Visible(wma->vidwin, &visible); + if (wma->parent) + IVideoWindow_put_Visible(wma->vidwin, OAFALSE); + /* FIXME: Should we check the original state and restore it? */ + IMediaControl_Pause(wma->pmctrl); + IMediaControl_GetState(wma->pmctrl, -1, &state); + if (FAILED(hr = IBasicVideo_GetCurrentImage(wma->vidbasic, &size, NULL))) { + WARN("Could not get image size (hr = %x)\n", hr); + goto out; } + data = HeapAlloc(GetProcessHeap(), 0, size); + info = (BITMAPINFO*)data; + IBasicVideo_GetCurrentImage(wma->vidbasic, &size, (LONG*)data); + data += info->bmiHeader.biSize; + + IBasicVideo_GetSourcePosition(wma->vidbasic, &src.left, &src.top, &src.right, &src.bottom); + IBasicVideo_GetDestinationPosition(wma->vidbasic, &dest.left, &dest.top, &dest.right, &dest.bottom); + StretchDIBits(lpParms->hDC, + dest.left, dest.top, dest.right + dest.left, dest.bottom + dest.top, + src.left, src.top, src.right + src.left, src.bottom + src.top, + data, info, DIB_RGB_COLORS, SRCCOPY); + HeapFree(GetProcessHeap(), 0, data); res = 0; out: - if (vidbasic) - IBasicVideo_Release(vidbasic); - if (vidwin) { - if (wma->parent) - IVideoWindow_put_Visible(vidwin, OATRUE); - IVideoWindow_Release(vidwin); - } + if (wma->parent) + IVideoWindow_put_Visible(wma->vidwin, visible); } else if (dwFlags) FIXME("Unhandled flags %x\n", dwFlags); @@ -911,11 +948,12 @@ case MCI_SETAUDIO: return MCIQTZ_mciSetAudio (dwDevID, dwParam1, (LPMCI_DGV_SETAUDIO_PARMSW) dwParam2); 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); + case MCI_PUT: case MCI_RECORD: case MCI_RESUME: case MCI_INFO: - case MCI_PUT: - case MCI_WINDOW: case MCI_LOAD: case MCI_SAVE: case MCI_FREEZE: 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] Sat May 19 11:26:15 2012 @@ -31,6 +31,10 @@ BOOL uninit; IGraphBuilder* pgraph; IMediaControl* pmctrl; + IMediaSeeking* seek; + IMediaEvent* mevent; + IVideoWindow* vidwin; + IBasicVideo* vidbasic; DWORD time_format; UINT command_table; HWND parent; 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] Sat May 19 11:26:15 2012 @@ -85,7 +85,7 @@ reactos/dll/win32/mapi32 # Autosync reactos/dll/win32/mciavi32 # Synced to Wine-1.3.37 reactos/dll/win32/mcicda # Synced to Wine-1.3.37 -reactos/dll/win32/mciqtz32 # Autosync +reactos/dll/win32/mciqtz32 # Synced to Wine-1.5.4 reactos/dll/win32/mciseq # Synced to Wine-1.3.37 reactos/dll/win32/mciwave # Synced to Wine-1.3.37 reactos/dll/win32/mlang # Synced to Wine-1.3.37
12 years, 7 months
1
0
0
0
[akhaldi] 56618: [ITSS] * Sync to Wine 1.5.4.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat May 19 10:54:54 2012 New Revision: 56618 URL:
http://svn.reactos.org/svn/reactos?rev=56618&view=rev
Log: [ITSS] * Sync to Wine 1.5.4. Modified: trunk/reactos/dll/win32/itss/storage.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/itss/storage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/itss/storage.c?r…
============================================================================== --- trunk/reactos/dll/win32/itss/storage.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/itss/storage.c [iso-8859-1] Sat May 19 10:54:54 2012 @@ -406,7 +406,6 @@ IStorage** ppstg) { ITSS_IStorageImpl *This = impl_from_IStorage(iface); - static const WCHAR szRoot[] = { '/', 0 }; struct chmFile *chmfile; WCHAR *path, *p; DWORD len; @@ -418,7 +417,7 @@ if( !chmfile ) return E_FAIL; - len = strlenW( This->dir ) + strlenW( pwcsName ) + 1; + len = strlenW( This->dir ) + strlenW( pwcsName ) + 2; /* need room for a terminating slash */ path = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) ); strcpyW( path, This->dir ); @@ -435,10 +434,12 @@ *p = '/'; } - if(*--p == '/') + /* add a terminating slash if one does not already exist */ + if(*(p-1) != '/') + { + *p++ = '/'; *p = 0; - - strcatW( path, szRoot ); + } TRACE("Resolving %s\n", debugstr_w(path)); 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] Sat May 19 10:54:54 2012 @@ -77,7 +77,7 @@ reactos/dll/win32/inseng # Synced to Wine-1.3.37 reactos/dll/win32/iphlpapi # Out of sync reactos/dll/win32/itircl # Synced to Wine-1.3.37 -reactos/dll/win32/itss # Synced to Wine-1.3.37 +reactos/dll/win32/itss # Synced to Wine-1.5.4 reactos/dll/win32/jscript # Autosync reactos/dll/win32/localspl # Autosync reactos/dll/win32/localui # Autosync
12 years, 7 months
1
0
0
0
[akhaldi] 56617: [HLINK_WINETEST] * Add to msvc build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat May 19 10:34:23 2012 New Revision: 56617 URL:
http://svn.reactos.org/svn/reactos?rev=56617&view=rev
Log: [HLINK_WINETEST] * Add to msvc build. Modified: trunk/rostests/winetests/CMakeLists.txt Modified: trunk/rostests/winetests/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/CMakeLists.txt?…
============================================================================== --- trunk/rostests/winetests/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/CMakeLists.txt [iso-8859-1] Sat May 19 10:34:23 2012 @@ -22,9 +22,7 @@ add_subdirectory(fusion) add_subdirectory(gdi32) add_subdirectory(gdiplus) -if(NOT MSVC) - add_subdirectory(hlink) # FIXME: msvc build. -endif() +add_subdirectory(hlink) add_subdirectory(icmp) if(NOT MSVC) add_subdirectory(imagehlp) # FIXME: msvc build.
12 years, 7 months
1
0
0
0
[akhaldi] 56616: [HLINK_WINETEST] * Sync to Wine 1.5.4.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat May 19 10:13:05 2012 New Revision: 56616 URL:
http://svn.reactos.org/svn/reactos?rev=56616&view=rev
Log: [HLINK_WINETEST] * Sync to Wine 1.5.4. Modified: trunk/rostests/winetests/hlink/hlink.c Modified: trunk/rostests/winetests/hlink/hlink.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/hlink/hlink.c?r…
============================================================================== --- trunk/rostests/winetests/hlink/hlink.c [iso-8859-1] (original) +++ trunk/rostests/winetests/hlink/hlink.c [iso-8859-1] Sat May 19 10:13:05 2012 @@ -1024,6 +1024,7 @@ CHECK_CALLED(BindToStorage); IBindCtx_Release(bctx); + _bctx = NULL; } static void test_HlinkGetSetMonikerReference(void) @@ -1136,6 +1137,26 @@ IHlink_Release(hlink); IMoniker_Release(dummy2); IMoniker_Release(dummy); + + SET_EXPECT(Reduce); + SET_EXPECT(Enum); + SET_EXPECT(IsSystemMoniker); + SET_EXPECT(GetDisplayName); + hres = HlinkCreateFromMoniker(&Moniker, NULL, NULL, NULL, 0, NULL, + &IID_IHlink, (void **)&hlink); + ok(hres == S_OK, "CreateFromMoniker failed: %08x\n", hres); + + hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_ABSOLUTE, + &found_trgt, &found_loc); + ok(hres == S_OK, "CreateFromMoniker failed: %08x\n", hres); + ok(found_trgt == &Moniker, "Got unexpected moniker: %p\n", found_trgt); + ok(found_loc == NULL, "Got unexpected location: %p\n", found_loc); + todo_wine CHECK_CALLED(Reduce); + todo_wine CHECK_CALLED(Enum); + CHECK_CALLED(IsSystemMoniker); + CHECK_CALLED(GetDisplayName); + + IHlink_Release(hlink); } static void test_HlinkGetSetStringReference(void) @@ -1305,14 +1326,14 @@ } /* passing 0xFFFFFFFF as exp_tgt will return the retrieved target & not test it */ -#define getMonikerRef(h,t,l) r_getMonikerRef(__LINE__,h,t,l) -static IMoniker *r_getMonikerRef(unsigned line, IHlink *hlink, IMoniker *exp_tgt, const WCHAR *exp_loc) +#define getMonikerRef(h,t,l,r) r_getMonikerRef(__LINE__,h,t,l,r) +static IMoniker *r_getMonikerRef(unsigned line, IHlink *hlink, IMoniker *exp_tgt, const WCHAR *exp_loc, DWORD ref) { HRESULT hres; IMoniker *fnd_tgt; WCHAR *fnd_loc; - hres = IHlink_GetMonikerReference(hlink, HLINKGETREF_DEFAULT, &fnd_tgt, &fnd_loc); + hres = IHlink_GetMonikerReference(hlink, ref, &fnd_tgt, &fnd_loc); ok_(__FILE__,line) (hres == S_OK, "IHlink_GetMonikerReference failed: 0x%08x\n", hres); if(exp_loc) @@ -1346,12 +1367,12 @@ hres = HlinkCreateFromString(NULL, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (void**)&hlink); ok(hres == S_OK, "HlinkCreateFromString failed: 0x%08x\n", hres); getStringRef(hlink, NULL, NULL); - getMonikerRef(hlink, NULL, NULL); + getMonikerRef(hlink, NULL, NULL, HLINKGETREF_RELATIVE); /* setting a string target creates a moniker reference */ setStringRef(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, aW, wordsW); getStringRef(hlink, aW, wordsW); - aMon = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, wordsW); + aMon = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, wordsW, HLINKGETREF_RELATIVE); ok(aMon != NULL, "Moniker from %s target should not be NULL\n", wine_dbgstr_w(aW)); if(aMon) IMoniker_Release(aMon); @@ -1360,7 +1381,7 @@ * reference */ setStringRef(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, emptyW, emptyW); getStringRef(hlink, NULL, NULL); - getMonikerRef(hlink, NULL, NULL); + getMonikerRef(hlink, NULL, NULL, HLINKGETREF_RELATIVE); /* setting a moniker target also sets the target string to that moniker's * display name */ @@ -1369,7 +1390,7 @@ setMonikerRef(hlink, HLINKSETF_TARGET | HLINKSETF_LOCATION, file_mon, wordsW); getStringRef(hlink, bW, wordsW); - getMonikerRef(hlink, file_mon, wordsW); + getMonikerRef(hlink, file_mon, wordsW, HLINKGETREF_RELATIVE); IMoniker_Release(file_mon); @@ -1396,7 +1417,7 @@ if(hlink){ getStringRef(hlink, tgt_partW, loc_partW); - pmk = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, loc_partW); + pmk = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, loc_partW, HLINKGETREF_RELATIVE); ok(pmk != NULL, "Found moniker should not be NULL\n"); if(pmk) IMoniker_Release(pmk); @@ -1414,7 +1435,7 @@ if(hlink){ getStringRef(hlink, tgt_partW, two_hash_loc_partW); - pmk = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, two_hash_loc_partW); + pmk = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, two_hash_loc_partW, HLINKGETREF_RELATIVE); ok(pmk != NULL, "Found moniker should not be NULL\n"); if(pmk) IMoniker_Release(pmk); @@ -1429,7 +1450,7 @@ if(hlink){ getStringRef(hlink, tgt_partW, test_locW); - pmk = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, test_locW); + pmk = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, test_locW, HLINKGETREF_RELATIVE); ok(pmk != NULL, "Found moniker should not be NULL\n"); if(pmk) IMoniker_Release(pmk); @@ -1444,7 +1465,7 @@ if(hlink){ getStringRef(hlink, NULL, loc_partW); - pmk = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, loc_partW); + pmk = getMonikerRef(hlink, (IMoniker*)0xFFFFFFFF, loc_partW, HLINKGETREF_RELATIVE); ok(pmk == NULL, "Found moniker should be NULL\n"); if(pmk) IMoniker_Release(pmk); @@ -1588,12 +1609,21 @@ return E_NOTIMPL; } +#define SITEDATA_SUCCESS 1 +#define SITEDATA_NOTIMPL 2 + static HRESULT WINAPI hls_GetMoniker(IHlinkSite *iface, DWORD siteData, DWORD assign, DWORD which, IMoniker **pmk) { - ok(siteData == 17, "Expected siteData == 17, got: %d\n", siteData); - *pmk = &hls_site_Moniker; - return S_OK; + ok(siteData == SITEDATA_NOTIMPL || + siteData == SITEDATA_SUCCESS, "Unexpected site data: %u\n", siteData); + + if(siteData == SITEDATA_SUCCESS){ + *pmk = &hls_site_Moniker; + return S_OK; + } + + return E_NOTIMPL; } static HRESULT WINAPI hls_ReadyToNavigate(IHlinkSite *iface, DWORD siteData, @@ -1607,7 +1637,7 @@ DWORD siteData, DWORD reserved, HRESULT error, LPCWSTR errorStr) { CHECK_EXPECT(OnNavigationComplete); - ok(siteData == 17, "Expected siteData == 17, got: %d\n", siteData); + ok(siteData == SITEDATA_SUCCESS, "Unexpected site data: %u\n", siteData); ok(error == E_OUTOFMEMORY, "Expected E_OUTOFMEMORY, got: %08x\n", error); return E_NOTIMPL; } @@ -1634,11 +1664,11 @@ hres = HlinkCreateFromString(NULL, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (LPVOID*)&hl); ok(hres == S_OK, "HlinkCreateFromString failed: %08x\n", hres); - getMonikerRef(hl, NULL, NULL); - - hres = IHlink_SetHlinkSite(hl, &HlinkSite, 17); + getMonikerRef(hl, NULL, NULL, HLINKGETREF_RELATIVE); + + hres = IHlink_SetHlinkSite(hl, &HlinkSite, SITEDATA_SUCCESS); ok(hres == S_OK, "SetHlinkSite failed: %08x\n", hres); - getMonikerRef(hl, NULL, NULL); + getMonikerRef(hl, NULL, NULL, HLINKGETREF_RELATIVE); getStringRef(hl, NULL, NULL); hres = IHlink_GetMonikerReference(hl, HLINKGETREF_RELATIVE, &mon_ref, NULL); @@ -1656,7 +1686,7 @@ todo_wine CHECK_CALLED(Reduce); todo_wine CHECK_CALLED(Enum); - getMonikerRef(hl, &hls_ref_Moniker, NULL); + getMonikerRef(hl, &hls_ref_Moniker, NULL, HLINKGETREF_RELATIVE); SET_EXPECT(Enum); getStringRef(hl, ref_monikerW, NULL); @@ -1688,19 +1718,33 @@ SET_EXPECT(Reduce); SET_EXPECT(Enum); - hres = HlinkCreateFromMoniker(&hls_ref_Moniker, NULL, NULL, &HlinkSite, 17, + hres = HlinkCreateFromMoniker(&hls_ref_Moniker, NULL, NULL, &HlinkSite, SITEDATA_SUCCESS, NULL, &IID_IHlink, (LPVOID*)&hl); ok(hres == S_OK, "HlinkCreateFromMoniker failed: %08x\n", hres); todo_wine CHECK_CALLED(Reduce); todo_wine CHECK_CALLED(Enum); - getMonikerRef(hl, &hls_ref_Moniker, NULL); + getMonikerRef(hl, &hls_ref_Moniker, NULL, HLINKGETREF_RELATIVE); IHlink_Release(hl); - hres = HlinkCreateFromMoniker(NULL, NULL, NULL, &HlinkSite, 17, + hres = HlinkCreateFromMoniker(NULL, NULL, NULL, &HlinkSite, SITEDATA_SUCCESS, NULL, &IID_IHlink, (LPVOID*)&hl); ok(hres == S_OK, "HlinkCreateFromMoniker failed: %08x\n", hres); - getMonikerRef(hl, NULL, NULL); + getMonikerRef(hl, NULL, NULL, HLINKGETREF_RELATIVE); IHlink_Release(hl); + + SET_EXPECT(Reduce); + SET_EXPECT(Enum); + SET_EXPECT(IsSystemMoniker); + SET_EXPECT(GetDisplayName); + hres = HlinkCreateFromMoniker(&Moniker, NULL, NULL, &HlinkSite, SITEDATA_NOTIMPL, + NULL, &IID_IHlink, (LPVOID*)&hl); + ok(hres == S_OK, "HlinkCreateFromMoniker failed: %08x\n", hres); + getMonikerRef(hl, &Moniker, NULL, HLINKGETREF_ABSOLUTE); + IHlink_Release(hl); + todo_wine CHECK_CALLED(Reduce); + todo_wine CHECK_CALLED(Enum); + CHECK_CALLED(IsSystemMoniker); + CHECK_CALLED(GetDisplayName); } static void test_HlinkClone(void) @@ -1736,7 +1780,7 @@ hres = HlinkClone(hl, &IID_IHlink, NULL, 0, (void**)&cloned); ok(hres == S_OK, "HlinkClone failed: %08x\n", hres); ok(cloned != NULL, "Didn't get a clone\n"); - getMonikerRef(cloned, NULL, NULL); + getMonikerRef(cloned, NULL, NULL, HLINKGETREF_RELATIVE); IHlink_Release(cloned); IHlink_Release(hl); @@ -1747,7 +1791,7 @@ todo_wine CHECK_CALLED(Reduce); todo_wine CHECK_CALLED(Enum); ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08x\n", hres); - getMonikerRef(hl, &hls_ref_Moniker, two); + getMonikerRef(hl, &hls_ref_Moniker, two, HLINKGETREF_RELATIVE); SET_EXPECT(Save); SET_EXPECT(GetClassID); @@ -1764,16 +1808,16 @@ hres = CreateItemMoniker(one, one, &dummy); ok(hres == S_OK, "CreateItemMoniker failed: 0x%08x\n", hres); - hres = HlinkCreateFromMoniker(dummy, two, name, &HlinkSite, 17, NULL, &IID_IHlink, (void**)&hl); + hres = HlinkCreateFromMoniker(dummy, two, name, &HlinkSite, SITEDATA_SUCCESS, NULL, &IID_IHlink, (void**)&hl); ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08x\n", hres); - getMonikerRef(hl, dummy, two); + getMonikerRef(hl, dummy, two, HLINKGETREF_RELATIVE); cloned = NULL; hres = HlinkClone(hl, &IID_IHlink, NULL, 0, (void**)&cloned); ok(hres == S_OK, "HlinkClone failed: %08x\n", hres); ok(cloned != NULL, "Should have gotten a clone\n"); - fnd_mk = getMonikerRef(cloned, (IMoniker*)0xFFFFFFFF, two); + fnd_mk = getMonikerRef(cloned, (IMoniker*)0xFFFFFFFF, two, HLINKGETREF_RELATIVE); ok(fnd_mk != NULL, "Expected non-null Moniker\n"); ok(fnd_mk != dummy, "Expected a new Moniker to be created\n"); @@ -1797,14 +1841,14 @@ hres = HlinkCreateFromMoniker(dummy, NULL, NULL, NULL, 0, NULL, &IID_IHlink, (void**)&hl); ok(hres == S_OK, "HlinkCreateFromMoniker failed: 0x%08x\n", hres); - getMonikerRef(hl, dummy, NULL); + getMonikerRef(hl, dummy, NULL, HLINKGETREF_RELATIVE); cloned = NULL; - hres = HlinkClone(hl, &IID_IHlink, &HlinkSite, 17, (void**)&cloned); + hres = HlinkClone(hl, &IID_IHlink, &HlinkSite, SITEDATA_SUCCESS, (void**)&cloned); ok(hres == S_OK, "HlinkClone failed: %08x\n", hres); ok(cloned != NULL, "Should have gotten a clone\n"); - fnd_mk = getMonikerRef(cloned, (IMoniker*)0xFFFFFFFF, NULL); + fnd_mk = getMonikerRef(cloned, (IMoniker*)0xFFFFFFFF, NULL, HLINKGETREF_RELATIVE); ok(fnd_mk != NULL, "Expected non-null Moniker\n"); ok(fnd_mk != dummy, "Expected a new Moniker to be created\n"); @@ -1813,7 +1857,7 @@ hres = IHlink_GetHlinkSite(cloned, &fnd_site, &fnd_data); ok(hres == S_OK, "GetHlinkSite failed: %08x\n", hres); ok(fnd_site == &HlinkSite, "Expected found site to be HlinkSite, was: %p\n", fnd_site); - ok(fnd_data == 17, "Expected site data to be 17, was: %d\n", fnd_data); + ok(fnd_data == SITEDATA_SUCCESS, "Unexpected site data: %u\n", fnd_data); IHlink_Release(cloned); IHlink_Release(hl);
12 years, 7 months
1
0
0
0
[akhaldi] 56615: [HLINK] * Sync to Wine 1.5.4.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat May 19 10:12:58 2012 New Revision: 56615 URL:
http://svn.reactos.org/svn/reactos?rev=56615&view=rev
Log: [HLINK] * Sync to Wine 1.5.4. Modified: trunk/reactos/dll/win32/hlink/CMakeLists.txt trunk/reactos/dll/win32/hlink/extserv.c trunk/reactos/dll/win32/hlink/link.c trunk/reactos/media/doc/README.WINE Modified: trunk/reactos/dll/win32/hlink/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hlink/CMakeLists…
============================================================================== --- trunk/reactos/dll/win32/hlink/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hlink/CMakeLists.txt [iso-8859-1] Sat May 19 10:12:58 2012 @@ -2,7 +2,6 @@ add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -set_rc_compiler() spec2def(hlink.dll hlink.spec ADD_IMPORTLIB) list(APPEND SOURCE @@ -18,15 +17,6 @@ set_module_type(hlink win32dll) target_link_libraries(hlink uuid wine) add_delay_importlibs(hlink urlmon) - -add_importlibs(hlink - shell32 - ole32 - advapi32 - msvcrt - kernel32 - ntdll) - +add_importlibs(hlink shell32 ole32 advapi32 msvcrt kernel32 ntdll) add_pch(hlink hlink_private.h) - add_cd_file(TARGET hlink DESTINATION reactos/system32 FOR all) Modified: trunk/reactos/dll/win32/hlink/extserv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hlink/extserv.c?…
============================================================================== --- trunk/reactos/dll/win32/hlink/extserv.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hlink/extserv.c [iso-8859-1] Sat May 19 10:12:58 2012 @@ -24,13 +24,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(hlink); typedef struct { - IUnknown IUnknown_iface; + IUnknown IUnknown_inner; IAuthenticate IAuthenticate_iface; IHttpNegotiate IHttpNegotiate_iface; IExtensionServices IExtensionServices_iface; + IUnknown *outer_unk; LONG ref; - IUnknown *outer; HWND hwnd; LPWSTR username; @@ -40,7 +40,7 @@ static inline ExtensionService *impl_from_IUnknown(IUnknown *iface) { - return CONTAINING_RECORD(iface, ExtensionService, IUnknown_iface); + return CONTAINING_RECORD(iface, ExtensionService, IUnknown_inner); } static HRESULT WINAPI ExtServUnk_QueryInterface(IUnknown *iface, REFIID riid, void **ppv) @@ -51,7 +51,7 @@ if(IsEqualGUID(&IID_IUnknown, riid)) { TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); - *ppv = &This->IUnknown_iface; + *ppv = &This->IUnknown_inner; }else if(IsEqualGUID(&IID_IAuthenticate, riid)) { TRACE("(%p)->(IID_IAuthenticate %p)\n", This, ppv); *ppv = &This->IAuthenticate_iface; @@ -113,19 +113,19 @@ static HRESULT WINAPI Authenticate_QueryInterface(IAuthenticate *iface, REFIID riid, void **ppv) { ExtensionService *This = impl_from_IAuthenticate(iface); - return IUnknown_QueryInterface(This->outer, riid, ppv); + return IUnknown_QueryInterface(This->outer_unk, riid, ppv); } static ULONG WINAPI Authenticate_AddRef(IAuthenticate *iface) { ExtensionService *This = impl_from_IAuthenticate(iface); - return IUnknown_AddRef(This->outer); + return IUnknown_AddRef(This->outer_unk); } static ULONG WINAPI Authenticate_Release(IAuthenticate *iface) { ExtensionService *This = impl_from_IAuthenticate(iface); - return IUnknown_Release(This->outer); + return IUnknown_Release(This->outer_unk); } static HRESULT WINAPI Authenticate_Authenticate(IAuthenticate *iface, @@ -160,19 +160,19 @@ static HRESULT WINAPI HttpNegotiate_QueryInterface(IHttpNegotiate *iface, REFIID riid, void **ppv) { ExtensionService *This = impl_from_IHttpNegotiate(iface); - return IUnknown_QueryInterface(This->outer, riid, ppv); + return IUnknown_QueryInterface(This->outer_unk, riid, ppv); } static ULONG WINAPI HttpNegotiate_AddRef(IHttpNegotiate *iface) { ExtensionService *This = impl_from_IHttpNegotiate(iface); - return IUnknown_AddRef(This->outer); + return IUnknown_AddRef(This->outer_unk); } static ULONG WINAPI HttpNegotiate_Release(IHttpNegotiate *iface) { ExtensionService *This = impl_from_IHttpNegotiate(iface); - return IUnknown_Release(This->outer); + return IUnknown_Release(This->outer_unk); } static HRESULT WINAPI HttpNegotiate_BeginningTransaction(IHttpNegotiate *iface, @@ -218,19 +218,19 @@ static HRESULT WINAPI ExtServ_QueryInterface(IExtensionServices *iface, REFIID riid, void **ppv) { ExtensionService *This = impl_from_IExtensionServices(iface); - return IUnknown_QueryInterface(This->outer, riid, ppv); + return IUnknown_QueryInterface(This->outer_unk, riid, ppv); } static ULONG WINAPI ExtServ_AddRef(IExtensionServices *iface) { ExtensionService *This = impl_from_IExtensionServices(iface); - return IUnknown_AddRef(This->outer); + return IUnknown_AddRef(This->outer_unk); } static ULONG WINAPI ExtServ_Release(IExtensionServices *iface) { ExtensionService *This = impl_from_IExtensionServices(iface); - return IUnknown_Release(This->outer); + return IUnknown_Release(This->outer_unk); } static HRESULT ExtServ_ImplSetAdditionalHeaders(ExtensionService* This, LPCWSTR pwzAdditionalHeaders) @@ -311,7 +311,7 @@ ret = heap_alloc(sizeof(*ret)); - ret->IUnknown_iface.lpVtbl = &ExtServUnkVtbl; + ret->IUnknown_inner.lpVtbl = &ExtServUnkVtbl; ret->IAuthenticate_iface.lpVtbl = &AuthenticateVtbl; ret->IHttpNegotiate_iface.lpVtbl = &HttpNegotiateVtbl; ret->IExtensionServices_iface.lpVtbl = &ExtServVtbl; @@ -325,14 +325,14 @@ ExtServ_ImplSetAdditionalHeaders(ret, pwzAdditionalHeaders); if(!punkOuter) { - ret->outer = &ret->IUnknown_iface; - hres = IUnknown_QueryInterface(&ret->IUnknown_iface, riid, ppv); - IUnknown_Release(&ret->IUnknown_iface); + ret->outer_unk = &ret->IUnknown_inner; + hres = IUnknown_QueryInterface(&ret->IUnknown_inner, riid, ppv); + IUnknown_Release(&ret->IUnknown_inner); }else if(IsEqualGUID(&IID_IUnknown, riid)) { - ret->outer = punkOuter; - *ppv = &ret->IUnknown_iface; + ret->outer_unk = punkOuter; + *ppv = &ret->IUnknown_inner; }else { - IUnknown_Release(&ret->IUnknown_iface); + IUnknown_Release(&ret->IUnknown_inner); hres = E_INVALIDARG; } Modified: trunk/reactos/dll/win32/hlink/link.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hlink/link.c?rev…
============================================================================== --- trunk/reactos/dll/win32/hlink/link.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hlink/link.c [iso-8859-1] Sat May 19 10:12:58 2012 @@ -78,6 +78,19 @@ if (ref_type == HLINKGETREF_DEFAULT) ref_type = HLINKGETREF_RELATIVE; + if (This->Moniker) + { + DWORD mktype = MKSYS_NONE; + + hres = IMoniker_IsSystemMoniker(This->Moniker, &mktype); + if (hres == S_OK && mktype != MKSYS_NONE) + { + *moniker = This->Moniker; + IMoniker_AddRef(*moniker); + return S_OK; + } + } + if (ref_type == HLINKGETREF_ABSOLUTE && This->Site) { IMoniker *hls_moniker; @@ -217,9 +230,12 @@ This->Moniker = pmkTarget; if (This->Moniker) { + IBindCtx *pbc; LPOLESTR display_name; IMoniker_AddRef(This->Moniker); - IMoniker_GetDisplayName(This->Moniker, NULL, NULL, &display_name); + CreateBindCtx( 0, &pbc); + IMoniker_GetDisplayName(This->Moniker, pbc, NULL, &display_name); + IBindCtx_Release(pbc); This->absolute = display_name && strchrW(display_name, ':'); CoTaskMemFree(display_name); } 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] Sat May 19 10:12:58 2012 @@ -63,7 +63,7 @@ reactos/dll/win32/fusion # Synced to Wine-1.5.4 reactos/dll/win32/gdiplus # Synced to Wine-1.5.4 reactos/dll/win32/hhctrl.ocx # Autosync -reactos/dll/win32/hlink # Synced to Wine-1.3.37 +reactos/dll/win32/hlink # Synced to Wine-1.5.4 reactos/dll/win32/hnetcfg # Synced to Wine-1.3.37 reactos/dll/win32/httpapi # Synced to Wine-1.3.37 reactos/dll/win32/iccvid # Autosync
12 years, 7 months
1
0
0
0
[akhaldi] 56614: [GDIPLUS_WINETEST] * Sync to Wine 1.5.4.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat May 19 10:03:49 2012 New Revision: 56614 URL:
http://svn.reactos.org/svn/reactos?rev=56614&view=rev
Log: [GDIPLUS_WINETEST] * Sync to Wine 1.5.4. Added: trunk/rostests/winetests/gdiplus/metafile.c (with props) Modified: trunk/rostests/winetests/gdiplus/CMakeLists.txt trunk/rostests/winetests/gdiplus/brush.c trunk/rostests/winetests/gdiplus/font.c trunk/rostests/winetests/gdiplus/testlist.c Modified: trunk/rostests/winetests/gdiplus/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/CMakeLi…
============================================================================== --- trunk/rostests/winetests/gdiplus/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/winetests/gdiplus/CMakeLists.txt [iso-8859-1] Sat May 19 10:03:49 2012 @@ -11,6 +11,7 @@ graphicspath.c image.c matrix.c + metafile.c pathiterator.c pen.c region.c Modified: trunk/rostests/winetests/gdiplus/brush.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/brush.c…
============================================================================== --- trunk/rostests/winetests/gdiplus/brush.c [iso-8859-1] (original) +++ trunk/rostests/winetests/gdiplus/brush.c [iso-8859-1] Sat May 19 10:03:49 2012 @@ -773,21 +773,58 @@ { GpStatus status; GpPathGradient *grad; - ARGB *color; - INT count = 3; + ARGB color[3]; + INT count; status = GdipCreatePathGradient(blendcount_ptf, 2, WrapModeClamp, &grad); expect(Ok, status); - color = GdipAlloc(sizeof(ARGB[3])); - + count = 0; + status = GdipGetPathGradientSurroundColorCount(grad, &count); + expect(Ok, status); + expect(2, count); + + color[0] = color[1] = color[2] = 0xdeadbeef; + count = 3; + status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count); + expect(Ok, status); + expect(1, count); + expect(0xffffffff, color[0]); + expect(0xffffffff, color[1]); + expect(0xdeadbeef, color[2]); + + color[0] = color[1] = color[2] = 0xdeadbeef; + count = 2; + status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count); + expect(Ok, status); + expect(1, count); + expect(0xffffffff, color[0]); + expect(0xffffffff, color[1]); + expect(0xdeadbeef, color[2]); + + color[0] = color[1] = color[2] = 0xdeadbeef; + count = 1; + status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count); + expect(InvalidParameter, status); + expect(1, count); + expect(0xdeadbeef, color[0]); + expect(0xdeadbeef, color[1]); + expect(0xdeadbeef, color[2]); + + color[0] = color[1] = color[2] = 0xdeadbeef; + count = 0; + status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count); + expect(InvalidParameter, status); + expect(0, count); + expect(0xdeadbeef, color[0]); + expect(0xdeadbeef, color[1]); + expect(0xdeadbeef, color[2]); + + count = 3; status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count); expect(InvalidParameter, status); - GdipFree(color); count = 2; - - color = GdipAlloc(sizeof(ARGB[2])); color[0] = 0x00ff0000; color[1] = 0x0000ff00; @@ -806,7 +843,7 @@ } status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count); - todo_wine expect(Ok, status); + expect(Ok, status); expect(2, count); status = GdipGetPathGradientSurroundColorCount(NULL, &count); @@ -817,11 +854,418 @@ count = 0; status = GdipGetPathGradientSurroundColorCount(grad, &count); - todo_wine expect(Ok, status); - todo_wine expect(2, count); - - GdipFree(color); + expect(Ok, status); + expect(2, count); + + color[0] = color[1] = color[2] = 0xdeadbeef; + count = 2; + status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count); + expect(Ok, status); + expect(2, count); + expect(0x00ff0000, color[0]); + expect(0x0000ff00, color[1]); + expect(0xdeadbeef, color[2]); + + count = 1; + status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count); + expect(Ok, status); + expect(1, count); + + count = 0; + status = GdipGetPathGradientSurroundColorCount(grad, &count); + expect(Ok, status); + expect(2, count); + + /* If all colors are the same, count is set to 1. */ + color[0] = color[1] = 0; + count = 2; + status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count); + expect(Ok, status); + expect(2, count); + + color[0] = color[1] = color[2] = 0xdeadbeef; + count = 2; + status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count); + expect(Ok, status); + expect(1, count); + expect(0x00000000, color[0]); + expect(0x00000000, color[1]); + expect(0xdeadbeef, color[2]); + + color[0] = color[1] = 0xff00ff00; + count = 2; + status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count); + expect(Ok, status); + expect(2, count); + + color[0] = color[1] = color[2] = 0xdeadbeef; + count = 2; + status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count); + expect(Ok, status); + expect(1, count); + expect(0xff00ff00, color[0]); + expect(0xff00ff00, color[1]); + expect(0xdeadbeef, color[2]); + + count = 0; + status = GdipSetPathGradientSurroundColorsWithCount(grad, color, &count); + expect(InvalidParameter, status); + expect(0, count); + GdipDeleteBrush((GpBrush*)grad); + + status = GdipCreatePathGradient(getbounds_ptf, 3, WrapModeClamp, &grad); + expect(Ok, status); + + color[0] = color[1] = color[2] = 0xdeadbeef; + count = 3; + status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count); + expect(Ok, status); + expect(1, count); + expect(0xffffffff, color[0]); + expect(0xffffffff, color[1]); + expect(0xffffffff, color[2]); + + color[0] = color[1] = color[2] = 0xdeadbeef; + count = 2; + status = GdipGetPathGradientSurroundColorsWithCount(grad, color, &count); + expect(InvalidParameter, status); + expect(2, count); + expect(0xdeadbeef, color[0]); + expect(0xdeadbeef, color[1]); + expect(0xdeadbeef, color[2]); + + count = 0; + status = GdipGetPathGradientSurroundColorCount(grad, &count); + expect(Ok, status); + expect(3, count); + + GdipDeleteBrush((GpBrush*)grad); +} + +static void test_pathgradientpath(void) +{ + GpStatus status; + GpPath *path=NULL; + GpPathGradient *grad=NULL; + + status = GdipCreatePathGradient(blendcount_ptf, 2, WrapModeClamp, &grad); + expect(Ok, status); + + status = GdipGetPathGradientPath(grad, NULL); + expect(NotImplemented, status); + + status = GdipCreatePath(FillModeWinding, &path); + expect(Ok, status); + + status = GdipGetPathGradientPath(NULL, path); + expect(NotImplemented, status); + + status = GdipGetPathGradientPath(grad, path); + expect(NotImplemented, status); + + status = GdipDeletePath(path); + expect(Ok, status); + + status = GdipDeleteBrush((GpBrush*)grad); + expect(Ok, status); +} + +static void test_pathgradientcenterpoint(void) +{ + static const GpPointF path_points[] = {{0,0}, {3,0}, {0,4}}; + GpStatus status; + GpPathGradient *grad; + GpPointF point; + + status = GdipCreatePathGradient(path_points+1, 2, WrapModeClamp, &grad); + expect(Ok, status); + + status = GdipGetPathGradientCenterPoint(NULL, &point); + expect(InvalidParameter, status); + + status = GdipGetPathGradientCenterPoint(grad, NULL); + expect(InvalidParameter, status); + + status = GdipGetPathGradientCenterPoint(grad, &point); + expect(Ok, status); + expectf(1.5, point.X); + expectf(2.0, point.Y); + + status = GdipSetPathGradientCenterPoint(NULL, &point); + expect(InvalidParameter, status); + + status = GdipSetPathGradientCenterPoint(grad, NULL); + expect(InvalidParameter, status); + + point.X = 10.0; + point.Y = 15.0; + status = GdipSetPathGradientCenterPoint(grad, &point); + expect(Ok, status); + + point.X = point.Y = -1; + status = GdipGetPathGradientCenterPoint(grad, &point); + expect(Ok, status); + expectf(10.0, point.X); + expectf(15.0, point.Y); + + status = GdipDeleteBrush((GpBrush*)grad); + expect(Ok, status); + + status = GdipCreatePathGradient(path_points, 3, WrapModeClamp, &grad); + expect(Ok, status); + + status = GdipGetPathGradientCenterPoint(grad, &point); + expect(Ok, status); + todo_wine expectf(1.0, point.X); + todo_wine expectf(4.0/3.0, point.Y); + + status = GdipDeleteBrush((GpBrush*)grad); + expect(Ok, status); +} + +static void test_pathgradientpresetblend(void) +{ + static const GpPointF path_points[] = {{0,0}, {3,0}, {0,4}}; + GpStatus status; + GpPathGradient *grad; + INT count; + int i; + const REAL positions[5] = {0.0f, 0.2f, 0.5f, 0.8f, 1.0f}; + const REAL two_positions[2] = {0.0f, 1.0f}; + const ARGB colors[5] = {0xff0000ff, 0xff00ff00, 0xff00ffff, 0xffff0000, 0xffffffff}; + REAL res_positions[6] = {0.3f, 0.0f, 0.0f, 0.0f, 0.0f}; + ARGB res_colors[6] = {0xdeadbeef, 0, 0, 0, 0}; + + status = GdipCreatePathGradient(path_points+1, 2, WrapModeClamp, &grad); + expect(Ok, status); + + status = GdipGetPathGradientPresetBlendCount(NULL, &count); + expect(InvalidParameter, status); + + status = GdipGetPathGradientPresetBlendCount(grad, NULL); + expect(InvalidParameter, status); + + status = GdipGetPathGradientPresetBlendCount(grad, &count); + expect(Ok, status); + expect(0, count); + + status = GdipGetPathGradientPresetBlend(NULL, res_colors, res_positions, 1); + expect(InvalidParameter, status); + + status = GdipGetPathGradientPresetBlend(grad, NULL, res_positions, 1); + expect(InvalidParameter, status); + + status = GdipGetPathGradientPresetBlend(grad, res_colors, NULL, 1); + expect(InvalidParameter, status); + + status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, 0); + expect(InvalidParameter, status); + + status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, -1); + expect(OutOfMemory, status); + + status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, 1); + expect(InvalidParameter, status); + + status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, 2); + expect(GenericError, status); + + status = GdipSetPathGradientPresetBlend(NULL, colors, positions, 5); + expect(InvalidParameter, status); + + status = GdipSetPathGradientPresetBlend(grad, NULL, positions, 5); + expect(InvalidParameter, status); + + if (0) + { + /* crashes on windows xp */ + status = GdipSetPathGradientPresetBlend(grad, colors, NULL, 5); + expect(InvalidParameter, status); + } + + status = GdipSetPathGradientPresetBlend(grad, colors, positions, 0); + expect(InvalidParameter, status); + + status = GdipSetPathGradientPresetBlend(grad, colors, positions, -1); + expect(InvalidParameter, status); + + status = GdipSetPathGradientPresetBlend(grad, colors, positions, 1); + expect(InvalidParameter, status); + + /* leave off the 0.0 position */ + status = GdipSetPathGradientPresetBlend(grad, &colors[1], &positions[1], 4); + expect(InvalidParameter, status); + + /* leave off the 1.0 position */ + status = GdipSetPathGradientPresetBlend(grad, colors, positions, 4); + expect(InvalidParameter, status); + + status = GdipSetPathGradientPresetBlend(grad, colors, positions, 5); + expect(Ok, status); + + status = GdipGetPathGradientPresetBlendCount(grad, &count); + expect(Ok, status); + expect(5, count); + + if (0) + { + /* Native GdipGetPathGradientPresetBlend seems to copy starting from + * the end of each array and do no bounds checking. This is so braindead + * I'm not going to copy it. */ + + res_colors[0] = 0xdeadbeef; + res_positions[0] = 0.3; + + status = GdipGetPathGradientPresetBlend(grad, &res_colors[1], &res_positions[1], 4); + expect(Ok, status); + + expect(0xdeadbeef, res_colors[0]); + expectf(0.3, res_positions[0]); + + for (i=1; i<5; i++) + { + expect(colors[i], res_colors[i]); + expectf(positions[i], res_positions[i]); + } + + status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, 6); + expect(Ok, status); + + for (i=0; i<5; i++) + { + expect(colors[i], res_colors[i+1]); + expectf(positions[i], res_positions[i+1]); + } + } + + status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, 5); + expect(Ok, status); + + for (i=0; i<5; i++) + { + expect(colors[i], res_colors[i]); + expectf(positions[i], res_positions[i]); + } + + status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, 0); + expect(InvalidParameter, status); + + status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, -1); + expect(OutOfMemory, status); + + status = GdipGetPathGradientPresetBlend(grad, res_colors, res_positions, 1); + expect(InvalidParameter, status); + + status = GdipSetPathGradientPresetBlend(grad, colors, two_positions, 2); + expect(Ok, status); + + status = GdipDeleteBrush((GpBrush*)grad); + expect(Ok, status); +} + +static void test_pathgradientblend(void) +{ + static const GpPointF path_points[] = {{0,0}, {3,0}, {0,4}}; + GpPathGradient *brush; + GpStatus status; + INT count, i; + const REAL factors[5] = {0.0f, 0.1f, 0.5f, 0.9f, 1.0f}; + const REAL positions[5] = {0.0f, 0.2f, 0.5f, 0.8f, 1.0f}; + REAL res_factors[6] = {0.3f, 0.0f, 0.0f, 0.0f, 0.0f}; + REAL res_positions[6] = {0.3f, 0.0f, 0.0f, 0.0f, 0.0f}; + + status = GdipCreatePathGradient(path_points, 3, WrapModeClamp, &brush); + expect(Ok, status); + + status = GdipGetPathGradientBlendCount(NULL, &count); + expect(InvalidParameter, status); + + status = GdipGetPathGradientBlendCount(brush, NULL); + expect(InvalidParameter, status); + + status = GdipGetPathGradientBlendCount(brush, &count); + expect(Ok, status); + expect(1, count); + + status = GdipGetPathGradientBlend(NULL, res_factors, res_positions, 1); + expect(InvalidParameter, status); + + status = GdipGetPathGradientBlend(brush, NULL, res_positions, 1); + expect(InvalidParameter, status); + + status = GdipGetPathGradientBlend(brush, res_factors, NULL, 1); + expect(InvalidParameter, status); + + status = GdipGetPathGradientBlend(brush, res_factors, res_positions, 0); + expect(InvalidParameter, status); + + status = GdipGetPathGradientBlend(brush, res_factors, res_positions, -1); + expect(InvalidParameter, status); + + status = GdipGetPathGradientBlend(brush, res_factors, res_positions, 1); + expect(Ok, status); + + status = GdipGetPathGradientBlend(brush, res_factors, res_positions, 2); + expect(Ok, status); + + status = GdipSetPathGradientBlend(NULL, factors, positions, 5); + expect(InvalidParameter, status); + + status = GdipSetPathGradientBlend(brush, NULL, positions, 5); + expect(InvalidParameter, status); + + status = GdipSetPathGradientBlend(brush, factors, NULL, 5); + expect(InvalidParameter, status); + + status = GdipSetPathGradientBlend(brush, factors, positions, 0); + expect(InvalidParameter, status); + + status = GdipSetPathGradientBlend(brush, factors, positions, -1); + expect(InvalidParameter, status); + + /* leave off the 0.0 position */ + status = GdipSetPathGradientBlend(brush, &factors[1], &positions[1], 4); + expect(InvalidParameter, status); + + /* leave off the 1.0 position */ + status = GdipSetPathGradientBlend(brush, factors, positions, 4); + expect(InvalidParameter, status); + + status = GdipSetPathGradientBlend(brush, factors, positions, 5); + expect(Ok, status); + + status = GdipGetPathGradientBlendCount(brush, &count); + expect(Ok, status); + expect(5, count); + + status = GdipGetPathGradientBlend(brush, res_factors, res_positions, 4); + expect(InsufficientBuffer, status); + + status = GdipGetPathGradientBlend(brush, res_factors, res_positions, 5); + expect(Ok, status); + + for (i=0; i<5; i++) + { + expectf(factors[i], res_factors[i]); + expectf(positions[i], res_positions[i]); + } + + status = GdipGetPathGradientBlend(brush, res_factors, res_positions, 6); + expect(Ok, status); + + status = GdipSetPathGradientBlend(brush, factors, positions, 1); + expect(Ok, status); + + status = GdipGetPathGradientBlendCount(brush, &count); + expect(Ok, status); + expect(1, count); + + status = GdipGetPathGradientBlend(brush, res_factors, res_positions, 1); + expect(Ok, status); + + status = GdipDeleteBrush((GpBrush*)brush); + expect(Ok, status); } START_TEST(brush) @@ -848,6 +1292,10 @@ test_lineblend(); test_linelinearblend(); test_gradientsurroundcolorcount(); + test_pathgradientpath(); + test_pathgradientcenterpoint(); + test_pathgradientpresetblend(); + test_pathgradientblend(); GdiplusShutdown(gdiplusToken); } Modified: trunk/rostests/winetests/gdiplus/font.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/font.c?…
============================================================================== --- trunk/rostests/winetests/gdiplus/font.c [iso-8859-1] (original) +++ trunk/rostests/winetests/gdiplus/font.c [iso-8859-1] Sat May 19 10:03:49 2012 @@ -2,6 +2,7 @@ * Unit test suite for fonts * * Copyright (C) 2007 Google (Evan Stade) + * Copyright (C) 2012 Dmitry Timoshkov * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,10 +25,9 @@ #include "gdiplus.h" #include "wine/test.h" -#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) -#define expectf(expected, got) ok(fabs(expected - got) < 0.0001, "Expected %.2f, got %.2f\n", expected, got) - -static const WCHAR arial[] = {'A','r','i','a','l','\0'}; +#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got) +#define expectf(expected, got) ok(fabs(expected - got) < 0.0001, "Expected %f, got %f\n", expected, got) + static const WCHAR nonexistent[] = {'T','h','i','s','F','o','n','t','s','h','o','u','l','d','N','o','t','E','x','i','s','t','\0'}; static const WCHAR MSSansSerif[] = {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'}; static const WCHAR MicrosoftSansSerif[] = {'M','i','c','r','o','s','o','f','t',' ','S','a','n','s',' ','S','e','r','i','f','\0'}; @@ -50,12 +50,7 @@ expect (FontFamilyNotFound, stat); stat = GdipDeleteFont(font); expect (InvalidParameter, stat); - stat = GdipCreateFontFamilyFromName(arial, NULL, &fontfamily); - if(stat == FontFamilyNotFound) - { - skip("Arial not installed\n"); - return; - } + stat = GdipCreateFontFamilyFromName(Tahoma, NULL, &fontfamily); expect (Ok, stat); stat = GdipCreateFont(fontfamily, 12, FontStyleRegular, UnitPoint, &font); expect (Ok, stat); @@ -67,7 +62,7 @@ expect(Ok, stat); stat = GdipGetFamilyName(fontfamily2, familyname, 0); expect(Ok, stat); - ok (lstrcmpiW(arial, familyname) == 0, "Expected arial, got %s\n", + ok (lstrcmpiW(Tahoma, familyname) == 0, "Expected Tahoma, got %s\n", wine_dbgstr_w(familyname)); stat = GdipDeleteFontFamily(fontfamily2); expect(Ok, stat); @@ -96,12 +91,17 @@ { LOGFONTA lfa, lfa2; GpFont *font; + GpFontFamily *family; GpStatus stat; GpGraphics *graphics; HDC hdc = GetDC(0); INT style; + REAL rval; + UINT16 em_height, line_spacing; + Unit unit; GdipCreateFromHDC(hdc, &graphics); + memset(&lfa, 0, sizeof(LOGFONTA)); memset(&lfa2, 0xff, sizeof(LOGFONTA)); @@ -110,14 +110,9 @@ stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font); expect(NotTrueTypeFont, stat); - lstrcpyA(lfa.lfFaceName, "Arial"); + lstrcpyA(lfa.lfFaceName, "Tahoma"); stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font); - if (stat == FileNotFound) - { - skip("Arial not installed.\n"); - return; - } expect(Ok, stat); stat = GdipGetLogFontA(font, graphics, &lfa2); expect(Ok, stat); @@ -146,7 +141,7 @@ lfa.lfItalic = lfa.lfUnderline = lfa.lfStrikeOut = TRUE; memset(&lfa2, 0xff, sizeof(LOGFONTA)); - lstrcpyA(lfa.lfFaceName, "Arial"); + lstrcpyA(lfa.lfFaceName, "Tahoma"); stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font); expect(Ok, stat); @@ -173,6 +168,60 @@ ok (style == (FontStyleItalic | FontStyleUnderline | FontStyleStrikeout), "Expected , got %d\n", style); + stat = GdipGetFontUnit(font, &unit); + expect(Ok, stat); + expect(UnitWorld, unit); + + stat = GdipGetFontHeight(font, graphics, &rval); + expect(Ok, stat); + expectf(25.347656, rval); + stat = GdipGetFontSize(font, &rval); + expect(Ok, stat); + expectf(21.0, rval); + + stat = GdipGetFamily(font, &family); + expect(Ok, stat); + stat = GdipGetEmHeight(family, FontStyleRegular, &em_height); + expect(Ok, stat); + expect(2048, em_height); + stat = GdipGetLineSpacing(family, FontStyleRegular, &line_spacing); + expect(Ok, stat); + expect(2472, line_spacing); + GdipDeleteFontFamily(family); + + GdipDeleteFont(font); + + memset(&lfa, 0, sizeof(lfa)); + lfa.lfHeight = -25; + lstrcpyA(lfa.lfFaceName, "Tahoma"); + stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font); + expect(Ok, stat); + memset(&lfa2, 0xff, sizeof(lfa2)); + stat = GdipGetLogFontA(font, graphics, &lfa2); + expect(Ok, stat); + expect(lfa.lfHeight, lfa2.lfHeight); + + stat = GdipGetFontUnit(font, &unit); + expect(Ok, stat); + expect(UnitWorld, unit); + + stat = GdipGetFontHeight(font, graphics, &rval); + expect(Ok, stat); + expectf(30.175781, rval); + stat = GdipGetFontSize(font, &rval); + expect(Ok, stat); + expectf(25.0, rval); + + stat = GdipGetFamily(font, &family); + expect(Ok, stat); + stat = GdipGetEmHeight(family, FontStyleRegular, &em_height); + expect(Ok, stat); + expect(2048, em_height); + stat = GdipGetLineSpacing(family, FontStyleRegular, &line_spacing); + expect(Ok, stat); + expect(2472, line_spacing); + GdipDeleteFontFamily(family); + GdipDeleteFont(font); GdipDeleteGraphics(graphics); @@ -186,7 +235,7 @@ GpStatus stat; /* FontFamily cannot be NULL */ - stat = GdipCreateFontFamilyFromName (arial , NULL, NULL); + stat = GdipCreateFontFamilyFromName (Tahoma , NULL, NULL); expect (InvalidParameter, stat); /* FontFamily must be able to actually find the family. @@ -200,17 +249,12 @@ expect (FontFamilyNotFound, stat); if(stat == Ok) GdipDeleteFontFamily(family); - stat = GdipCreateFontFamilyFromName (arial, NULL, &family); - if(stat == FontFamilyNotFound) - { - skip("Arial not installed\n"); - return; - } + stat = GdipCreateFontFamilyFromName (Tahoma, NULL, &family); expect (Ok, stat); stat = GdipGetFamilyName (family, itsName, LANG_NEUTRAL); expect (Ok, stat); - expect (0, lstrcmpiW(itsName, arial)); + expect (0, lstrcmpiW(itsName, Tahoma)); if (0) { @@ -226,7 +270,7 @@ GdipDeleteFontFamily(family); stat = GdipGetFamilyName(clonedFontFamily, itsName, LANG_NEUTRAL); expect(Ok, stat); - expect(0, lstrcmpiW(itsName, arial)); + expect(0, lstrcmpiW(itsName, Tahoma)); GdipDeleteFontFamily(clonedFontFamily); } @@ -237,28 +281,25 @@ GpStatus stat; UINT16 result = 0; - stat = GdipCreateFontFamilyFromName(arial, NULL, &FontFamily); - if(stat == FontFamilyNotFound) - skip("Arial not installed\n"); - else - { - stat = GdipGetLineSpacing(FontFamily, FontStyleRegular, &result); - expect(Ok, stat); - ok (result == 2355, "Expected 2355, got %d\n", result); - result = 0; - stat = GdipGetEmHeight(FontFamily, FontStyleRegular, &result); - expect(Ok, stat); - ok(result == 2048, "Expected 2048, got %d\n", result); - result = 0; - stat = GdipGetCellAscent(FontFamily, FontStyleRegular, &result); - expect(Ok, stat); - ok(result == 1854, "Expected 1854, got %d\n", result); - result = 0; - stat = GdipGetCellDescent(FontFamily, FontStyleRegular, &result); - expect(Ok, stat); - ok(result == 434, "Expected 434, got %d\n", result); - GdipDeleteFontFamily(FontFamily); - } + stat = GdipCreateFontFamilyFromName(Tahoma, NULL, &FontFamily); + expect(Ok, stat); + + stat = GdipGetLineSpacing(FontFamily, FontStyleRegular, &result); + expect(Ok, stat); + ok (result == 2472, "Expected 2472, got %d\n", result); + result = 0; + stat = GdipGetEmHeight(FontFamily, FontStyleRegular, &result); + expect(Ok, stat); + ok(result == 2048, "Expected 2048, got %d\n", result); + result = 0; + stat = GdipGetCellAscent(FontFamily, FontStyleRegular, &result); + expect(Ok, stat); + ok(result == 2049, "Expected 2049, got %d\n", result); + result = 0; + stat = GdipGetCellDescent(FontFamily, FontStyleRegular, &result); + expect(Ok, stat); + ok(result == 423, "Expected 423, got %d\n", result); + GdipDeleteFontFamily(FontFamily); stat = GdipCreateFontFamilyFromName(TimesNewRoman, NULL, &FontFamily); if(stat == FontFamilyNotFound) @@ -362,13 +403,9 @@ GpFont* font = NULL; GpFontFamily* fontfamily = NULL; REAL height; - - stat = GdipCreateFontFamilyFromName(arial, NULL, &fontfamily); - if(stat == FontFamilyNotFound) - { - skip("Arial not installed\n"); - return; - } + Unit unit; + + stat = GdipCreateFontFamilyFromName(Tahoma, NULL, &fontfamily); expect(Ok, stat); stat = GdipCreateFont(fontfamily, 30, FontStyleRegular, UnitPixel, &font); @@ -382,15 +419,20 @@ stat = GdipGetFontHeightGivenDPI(font, 96, &height); expect(Ok, stat); - expectf((REAL)34.497070, height); + expectf(36.210938, height); GdipDeleteFont(font); height = 12345; stat = GdipCreateFont(fontfamily, 30, FontStyleRegular, UnitWorld, &font); expect(Ok, stat); + + stat = GdipGetFontUnit(font, &unit); + expect(Ok, stat); + expect(UnitWorld, unit); + stat = GdipGetFontHeightGivenDPI(font, 96, &height); expect(Ok, stat); - expectf((REAL)34.497070, height); + expectf(36.210938, height); GdipDeleteFont(font); height = 12345; @@ -398,34 +440,286 @@ expect(Ok, stat); stat = GdipGetFontHeightGivenDPI(font, 96, &height); expect(Ok, stat); - expectf((REAL)45.996094, height); + expectf(48.281250, height); GdipDeleteFont(font); height = 12345; stat = GdipCreateFont(fontfamily, 30, FontStyleRegular, UnitInch, &font); expect(Ok, stat); + + stat = GdipGetFontUnit(font, &unit); + expect(Ok, stat); + expect(UnitInch, unit); + stat = GdipGetFontHeightGivenDPI(font, 96, &height); expect(Ok, stat); - expectf((REAL)3311.718750, height); + expectf(3476.250000, height); GdipDeleteFont(font); height = 12345; stat = GdipCreateFont(fontfamily, 30, FontStyleRegular, UnitDocument, &font); expect(Ok, stat); + + stat = GdipGetFontUnit(font, &unit); + expect(Ok, stat); + expect(UnitDocument, unit); + stat = GdipGetFontHeightGivenDPI(font, 96, &height); expect(Ok, stat); - expectf((REAL)11.039062, height); + expectf(11.587500, height); GdipDeleteFont(font); height = 12345; stat = GdipCreateFont(fontfamily, 30, FontStyleRegular, UnitMillimeter, &font); expect(Ok, stat); + + stat = GdipGetFontUnit(font, &unit); + expect(Ok, stat); + expect(UnitMillimeter, unit); + stat = GdipGetFontHeightGivenDPI(font, 96, &height); expect(Ok, stat); - expectf((REAL)130.382614, height); + expectf(136.860245, height); GdipDeleteFont(font); GdipDeleteFontFamily(fontfamily); +} + +static int CALLBACK font_enum_proc(const LOGFONTW *lfe, const TEXTMETRICW *ntme, + DWORD type, LPARAM lparam) +{ + NEWTEXTMETRICW *ntm = (NEWTEXTMETRICW *)lparam; + + if (type != TRUETYPE_FONTTYPE) return 1; + + *ntm = *(NEWTEXTMETRICW *)ntme; + return 0; +} + +struct font_metrics +{ + UINT16 em_height, line_spacing, ascent, descent; + REAL font_height, font_size; + INT lfHeight; +}; + +static void gdi_get_font_metrics(LOGFONTW *lf, struct font_metrics *fm) +{ + HDC hdc; + HFONT hfont; + NEWTEXTMETRICW ntm; + OUTLINETEXTMETRICW otm; + int ret; + + hdc = CreateCompatibleDC(0); + + /* it's the only way to get extended NEWTEXTMETRIC fields */ + ret = EnumFontFamiliesExW(hdc, lf, font_enum_proc, (LPARAM)&ntm, 0); + ok(!ret, "EnumFontFamiliesExW failed to find %s\n", wine_dbgstr_w(lf->lfFaceName)); + + hfont = CreateFontIndirectW(lf); + SelectObject(hdc, hfont); + + otm.otmSize = sizeof(otm); + ret = GetOutlineTextMetricsW(hdc, otm.otmSize, &otm); + ok(ret, "GetOutlineTextMetrics failed\n"); + + DeleteDC(hdc); + DeleteObject(hfont); + + fm->lfHeight = -otm.otmTextMetrics.tmAscent; + fm->line_spacing = ntm.ntmCellHeight; + fm->font_size = (REAL)otm.otmTextMetrics.tmAscent; + fm->font_height = (REAL)fm->line_spacing * fm->font_size / (REAL)ntm.ntmSizeEM; + fm->em_height = ntm.ntmSizeEM; + fm->ascent = ntm.ntmSizeEM; + fm->descent = ntm.ntmCellHeight - ntm.ntmSizeEM; +} + +static void gdip_get_font_metrics(GpFont *font, struct font_metrics *fm) +{ + INT style; + GpFontFamily *family; + GpStatus stat; + + stat = GdipGetFontStyle(font, &style); + expect(Ok, stat); + + stat = GdipGetFontHeight(font, NULL, &fm->font_height); + expect(Ok, stat); + stat = GdipGetFontSize(font, &fm->font_size); + expect(Ok, stat); + + fm->lfHeight = (INT)(fm->font_size * -1.0); + + stat = GdipGetFamily(font, &family); + expect(Ok, stat); + + stat = GdipGetEmHeight(family, style, &fm->em_height); + expect(Ok, stat); + stat = GdipGetLineSpacing(family, style, &fm->line_spacing); + expect(Ok, stat); + stat = GdipGetCellAscent(family, style, &fm->ascent); + expect(Ok, stat); + stat = GdipGetCellDescent(family, style, &fm->descent); + expect(Ok, stat); + + GdipDeleteFontFamily(family); +} + +static void cmp_font_metrics(struct font_metrics *fm1, struct font_metrics *fm2, int line) +{ + ok_(__FILE__, line)(fm1->lfHeight == fm2->lfHeight, "lfHeight %d != %d\n", fm1->lfHeight, fm2->lfHeight); + ok_(__FILE__, line)(fm1->em_height == fm2->em_height, "em_height %u != %u\n", fm1->em_height, fm2->em_height); + ok_(__FILE__, line)(fm1->line_spacing == fm2->line_spacing, "line_spacing %u != %u\n", fm1->line_spacing, fm2->line_spacing); + ok_(__FILE__, line)(abs(fm1->ascent - fm2->ascent) <= 1, "ascent %u != %u\n", fm1->ascent, fm2->ascent); + ok_(__FILE__, line)(abs(fm1->descent - fm2->descent) <= 1, "descent %u != %u\n", fm1->descent, fm2->descent); + ok(fm1->font_height > 0.0, "fm1->font_height should be positive, got %f\n", fm1->font_height); + ok(fm2->font_height > 0.0, "fm2->font_height should be positive, got %f\n", fm2->font_height); + ok_(__FILE__, line)(fm1->font_height == fm2->font_height, "font_height %f != %f\n", fm1->font_height, fm2->font_height); + ok(fm1->font_size > 0.0, "fm1->font_size should be positive, got %f\n", fm1->font_size); + ok(fm2->font_size > 0.0, "fm2->font_size should be positive, got %f\n", fm2->font_size); + ok_(__FILE__, line)(fm1->font_size == fm2->font_size, "font_size %f != %f\n", fm1->font_size, fm2->font_size); +} + +static void test_font_metrics(void) +{ + LOGFONTW lf; + GpFont *font; + GpFontFamily *family; + GpGraphics *graphics; + GpStatus stat; + Unit unit; + struct font_metrics fm_gdi, fm_gdip; + HDC hdc; + + hdc = CreateCompatibleDC(0); + stat = GdipCreateFromHDC(hdc, &graphics); + expect(Ok, stat); + + memset(&lf, 0, sizeof(lf)); + + /* Tahoma,-13 */ + lstrcpyW(lf.lfFaceName, Tahoma); + lf.lfHeight = -13; + stat = GdipCreateFontFromLogfontW(hdc, &lf, &font); + expect(Ok, stat); + + stat = GdipGetFontUnit(font, &unit); + expect(Ok, stat); + expect(UnitWorld, unit); + + gdip_get_font_metrics(font, &fm_gdip); + trace("gdiplus:\n"); + trace("%s,%d: EmHeight %u, LineSpacing %u, CellAscent %u, CellDescent %u, FontHeight %f, FontSize %f\n", + wine_dbgstr_w(lf.lfFaceName), lf.lfHeight, + fm_gdip.em_height, fm_gdip.line_spacing, fm_gdip.ascent, fm_gdip.descent, + fm_gdip.font_height, fm_gdip.font_size); + + gdi_get_font_metrics(&lf, &fm_gdi); + trace("gdi:\n"); + trace("%s,%d: EmHeight %u, LineSpacing %u, CellAscent %u, CellDescent %u, FontHeight %f, FontSize %f\n", + wine_dbgstr_w(lf.lfFaceName), lf.lfHeight, + fm_gdi.em_height, fm_gdi.line_spacing, fm_gdi.ascent, fm_gdi.descent, + fm_gdi.font_height, fm_gdi.font_size); + + cmp_font_metrics(&fm_gdip, &fm_gdi, __LINE__); + + stat = GdipGetLogFontW(font, graphics, &lf); + expect(Ok, stat); + ok(lf.lfHeight < 0, "lf.lfHeight should be negative, got %d\n", lf.lfHeight); + gdi_get_font_metrics(&lf, &fm_gdi); + trace("gdi:\n"); + trace("%s,%d: EmHeight %u, LineSpacing %u, CellAscent %u, CellDescent %u, FontHeight %f, FontSize %f\n", + wine_dbgstr_w(lf.lfFaceName), lf.lfHeight, + fm_gdi.em_height, fm_gdi.line_spacing, fm_gdi.ascent, fm_gdi.descent, + fm_gdi.font_height, fm_gdi.font_size); + ok((REAL)lf.lfHeight * -1.0 == fm_gdi.font_size, "expected %f, got %f\n", (REAL)lf.lfHeight * -1.0, fm_gdi.font_size); + + cmp_font_metrics(&fm_gdip, &fm_gdi, __LINE__); + + GdipDeleteFont(font); + + /* Tahoma,13 */ + lstrcpyW(lf.lfFaceName, Tahoma); + lf.lfHeight = 13; + stat = GdipCreateFontFromLogfontW(hdc, &lf, &font); + expect(Ok, stat); + + stat = GdipGetFontUnit(font, &unit); + expect(Ok, stat); + expect(UnitWorld, unit); + + gdip_get_font_metrics(font, &fm_gdip); + trace("gdiplus:\n"); + trace("%s,%d: EmHeight %u, LineSpacing %u, CellAscent %u, CellDescent %u, FontHeight %f, FontSize %f\n", + wine_dbgstr_w(lf.lfFaceName), lf.lfHeight, + fm_gdip.em_height, fm_gdip.line_spacing, fm_gdip.ascent, fm_gdip.descent, + fm_gdip.font_height, fm_gdip.font_size); + + gdi_get_font_metrics(&lf, &fm_gdi); + trace("gdi:\n"); + trace("%s,%d: EmHeight %u, LineSpacing %u, CellAscent %u, CellDescent %u, FontHeight %f, FontSize %f\n", + wine_dbgstr_w(lf.lfFaceName), lf.lfHeight, + fm_gdi.em_height, fm_gdi.line_spacing, fm_gdi.ascent, fm_gdi.descent, + fm_gdi.font_height, fm_gdi.font_size); + + cmp_font_metrics(&fm_gdip, &fm_gdi, __LINE__); + + stat = GdipGetLogFontW(font, graphics, &lf); + expect(Ok, stat); + ok(lf.lfHeight < 0, "lf.lfHeight should be negative, got %d\n", lf.lfHeight); + gdi_get_font_metrics(&lf, &fm_gdi); + trace("gdi:\n"); + trace("%s,%d: EmHeight %u, LineSpacing %u, CellAscent %u, CellDescent %u, FontHeight %f, FontSize %f\n", + wine_dbgstr_w(lf.lfFaceName), lf.lfHeight, + fm_gdi.em_height, fm_gdi.line_spacing, fm_gdi.ascent, fm_gdi.descent, + fm_gdi.font_height, fm_gdi.font_size); + ok((REAL)lf.lfHeight * -1.0 == fm_gdi.font_size, "expected %f, got %f\n", (REAL)lf.lfHeight * -1.0, fm_gdi.font_size); + + cmp_font_metrics(&fm_gdip, &fm_gdi, __LINE__); + + GdipDeleteFont(font); + + stat = GdipCreateFontFamilyFromName(Tahoma, NULL, &family); + expect(Ok, stat); + + /* Tahoma,13 */ + stat = GdipCreateFont(family, 13.0, FontStyleRegular, UnitPixel, &font); + expect(Ok, stat); + + gdip_get_font_metrics(font, &fm_gdip); + trace("gdiplus:\n"); + trace("%s,%d: EmHeight %u, LineSpacing %u, CellAscent %u, CellDescent %u, FontHeight %f, FontSize %f\n", + wine_dbgstr_w(lf.lfFaceName), lf.lfHeight, + fm_gdip.em_height, fm_gdip.line_spacing, fm_gdip.ascent, fm_gdip.descent, + fm_gdip.font_height, fm_gdip.font_size); + + stat = GdipGetLogFontW(font, graphics, &lf); + expect(Ok, stat); + ok(lf.lfHeight < 0, "lf.lfHeight should be negative, got %d\n", lf.lfHeight); + gdi_get_font_metrics(&lf, &fm_gdi); + trace("gdi:\n"); + trace("%s,%d: EmHeight %u, LineSpacing %u, CellAscent %u, CellDescent %u, FontHeight %f, FontSize %f\n", + wine_dbgstr_w(lf.lfFaceName), lf.lfHeight, + fm_gdi.em_height, fm_gdi.line_spacing, fm_gdi.ascent, fm_gdi.descent, + fm_gdi.font_height, fm_gdi.font_size); + ok((REAL)lf.lfHeight * -1.0 == fm_gdi.font_size, "expected %f, got %f\n", (REAL)lf.lfHeight * -1.0, fm_gdi.font_size); + + cmp_font_metrics(&fm_gdip, &fm_gdi, __LINE__); + + stat = GdipGetLogFontW(font, NULL, &lf); + expect(InvalidParameter, stat); + + GdipDeleteFont(font); + + stat = GdipCreateFont(family, -13.0, FontStyleRegular, UnitPixel, &font); + expect(InvalidParameter, stat); + + GdipDeleteFontFamily(family); + + GdipDeleteGraphics(graphics); + DeleteDC(hdc); } START_TEST(font) @@ -440,6 +734,7 @@ GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); + test_font_metrics(); test_createfont(); test_logfont(); test_fontfamily(); Added: trunk/rostests/winetests/gdiplus/metafile.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/metafil…
============================================================================== --- trunk/rostests/winetests/gdiplus/metafile.c (added) +++ trunk/rostests/winetests/gdiplus/metafile.c [iso-8859-1] Sat May 19 10:03:49 2012 @@ -1,0 +1,568 @@ +/* + * Unit test suite for metafiles + * + * Copyright (C) 2011 Vincent Povirk for CodeWeavers + * + * 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 + */ + +#include "windows.h" +#include <stdio.h> +#include "gdiplus.h" +#include "wine/test.h" + +#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) + +typedef struct emfplus_record +{ + ULONG todo; + ULONG record_type; + ULONG playback_todo; +} emfplus_record; + +typedef struct emfplus_check_state +{ + const char *desc; + int count; + const struct emfplus_record *expected; + GpMetafile *metafile; +} emfplus_check_state; + +static void check_record(int count, const char *desc, const struct emfplus_record *expected, const struct emfplus_record *actual) +{ + if (expected->todo) + todo_wine ok(expected->record_type == actual->record_type, + "%s.%i: Expected record type 0x%x, got 0x%x\n", desc, count, + expected->record_type, actual->record_type); + else + ok(expected->record_type == actual->record_type, + "%s.%i: Expected record type 0x%x, got 0x%x\n", desc, count, + expected->record_type, actual->record_type); +} + +typedef struct EmfPlusRecordHeader +{ + WORD Type; + WORD Flags; + DWORD Size; + DWORD DataSize; +} EmfPlusRecordHeader; + +static int CALLBACK enum_emf_proc(HDC hDC, HANDLETABLE *lpHTable, const ENHMETARECORD *lpEMFR, + int nObj, LPARAM lpData) +{ + emfplus_check_state *state = (emfplus_check_state*)lpData; + emfplus_record actual; + + if (lpEMFR->iType == EMR_GDICOMMENT) + { + const EMRGDICOMMENT *comment = (const EMRGDICOMMENT*)lpEMFR; + + if (comment->cbData >= 4 && memcmp(comment->Data, "EMF+", 4) == 0) + { + int offset = 4; + + while (offset + sizeof(EmfPlusRecordHeader) <= comment->cbData) + { + const EmfPlusRecordHeader *record = (const EmfPlusRecordHeader*)&comment->Data[offset]; + + ok(record->Size == record->DataSize + sizeof(EmfPlusRecordHeader), + "%s: EMF+ record datasize %u and size %u mismatch\n", state->desc, record->DataSize, record->Size); + + ok(offset + record->DataSize <= comment->cbData, + "%s: EMF+ record truncated\n", state->desc); + + if (offset + record->DataSize > comment->cbData) + return 0; + + if (state->expected[state->count].record_type) + { + actual.todo = 0; + actual.record_type = record->Type; + + check_record(state->count, state->desc, &state->expected[state->count], &actual); + + state->count++; + } + else + { + ok(0, "%s: Unexpected EMF+ 0x%x record\n", state->desc, record->Type); + } + + offset += record->Size; + } + + ok(offset == comment->cbData, "%s: truncated EMF+ record data?\n", state->desc); + + return 1; + } + } + + if (state->expected[state->count].record_type) + { + actual.todo = 0; + actual.record_type = lpEMFR->iType; + + check_record(state->count, state->desc, &state->expected[state->count], &actual); + + state->count++; + } + else + { + ok(0, "%s: Unexpected EMF 0x%x record\n", state->desc, lpEMFR->iType); + } + + return 1; +} + +static void check_emfplus(HENHMETAFILE hemf, const emfplus_record *expected, const char *desc) +{ + emfplus_check_state state; + + state.desc = desc; + state.count = 0; + state.expected = expected; + + EnumEnhMetaFile(0, hemf, enum_emf_proc, &state, NULL); + + if (expected[state.count].todo) + todo_wine ok(expected[state.count].record_type == 0, "%s: Got %i records, expecting more\n", desc, state.count); + else + ok(expected[state.count].record_type == 0, "%s: Got %i records, expecting more\n", desc, state.count); +} + +static BOOL CALLBACK enum_metafile_proc(EmfPlusRecordType record_type, unsigned int flags, + unsigned int dataSize, const unsigned char *pStr, void *userdata) +{ + emfplus_check_state *state = (emfplus_check_state*)userdata; + emfplus_record actual; + + actual.todo = 0; + actual.record_type = record_type; + + if (dataSize == 0) + ok(pStr == NULL, "non-NULL pStr\n"); + + if (state->expected[state->count].record_type) + { + check_record(state->count, state->desc, &state->expected[state->count], &actual); + + state->count++; + } + else + { + ok(0, "%s: Unexpected EMF 0x%x record\n", state->desc, record_type); + } + + return TRUE; +} + +static void check_metafile(GpMetafile *metafile, const emfplus_record *expected, const char *desc, + const GpPointF *dst_points, const GpRectF *src_rect, Unit src_unit) +{ + GpStatus stat; + HDC hdc; + GpGraphics *graphics; + emfplus_check_state state; + + state.desc = desc; + state.count = 0; + state.expected = expected; + state.metafile = metafile; + + hdc = CreateCompatibleDC(0); + + stat = GdipCreateFromHDC(hdc, &graphics); + expect(Ok, stat); + + stat = GdipEnumerateMetafileSrcRectDestPoints(graphics, metafile, dst_points, + 3, src_rect, src_unit, enum_metafile_proc, &state, NULL); + expect(Ok, stat); + + if (expected[state.count].todo) + todo_wine ok(expected[state.count].record_type == 0, "%s: Got %i records, expecting more\n", desc, state.count); + else + ok(expected[state.count].record_type == 0, "%s: Got %i records, expecting more\n", desc, state.count); + + GdipDeleteGraphics(graphics); + + DeleteDC(hdc); +} + +static BOOL CALLBACK play_metafile_proc(EmfPlusRecordType record_type, unsigned int flags, + unsigned int dataSize, const unsigned char *pStr, void *userdata) +{ + emfplus_check_state *state = (emfplus_check_state*)userdata; + GpStatus stat; + + stat = GdipPlayMetafileRecord(state->metafile, record_type, flags, dataSize, pStr); + + if (state->expected[state->count].record_type) + { + if (state->expected[state->count].playback_todo) + todo_wine ok(stat == Ok, "%s.%i: GdipPlayMetafileRecord failed with stat %i\n", state->desc, state->count, stat); + else + ok(stat == Ok, "%s.%i: GdipPlayMetafileRecord failed with stat %i\n", state->desc, state->count, stat); + state->count++; + } + else + { + if (state->expected[state->count].playback_todo) + todo_wine ok(0, "%s: too many records\n", state->desc); + else + ok(0, "%s: too many records\n", state->desc); + + return FALSE; + } + + return TRUE; +} + +static void play_metafile(GpMetafile *metafile, GpGraphics *graphics, const emfplus_record *expected, + const char *desc, const GpPointF *dst_points, const GpRectF *src_rect, Unit src_unit) +{ + GpStatus stat; + emfplus_check_state state; + + state.desc = desc; + state.count = 0; + state.expected = expected; + state.metafile = metafile; + + stat = GdipEnumerateMetafileSrcRectDestPoints(graphics, metafile, dst_points, + 3, src_rect, src_unit, play_metafile_proc, &state, NULL); + expect(Ok, stat); +} + +static const emfplus_record empty_records[] = { + {0, EMR_HEADER}, + {0, EmfPlusRecordTypeHeader}, + {0, EmfPlusRecordTypeEndOfFile}, + {0, EMR_EOF}, + {0} +}; + +static void test_empty(void) +{ + GpStatus stat; + GpMetafile *metafile; + GpGraphics *graphics; + HDC hdc; + HENHMETAFILE hemf, dummy; + BOOL ret; + static const GpRectF frame = {0.0, 0.0, 100.0, 100.0}; + static const GpPointF dst_points[3] = {{0.0,0.0},{100.0,0.0},{0.0,100.0}}; + static const WCHAR description[] = {'w','i','n','e','t','e','s','t',0}; + + hdc = CreateCompatibleDC(0); + + stat = GdipRecordMetafile(NULL, EmfTypeEmfPlusOnly, &frame, MetafileFrameUnitPixel, description, &metafile); + expect(InvalidParameter, stat); + + stat = GdipRecordMetafile(hdc, MetafileTypeInvalid, &frame, MetafileFrameUnitPixel, description, &metafile); + expect(InvalidParameter, stat); + + stat = GdipRecordMetafile(hdc, MetafileTypeWmf, &frame, MetafileFrameUnitPixel, description, &metafile); + expect(InvalidParameter, stat); + + stat = GdipRecordMetafile(hdc, MetafileTypeWmfPlaceable, &frame, MetafileFrameUnitPixel, description, &metafile); + expect(InvalidParameter, stat); + + stat = GdipRecordMetafile(hdc, MetafileTypeEmfPlusDual+1, &frame, MetafileFrameUnitPixel, description, &metafile); + expect(InvalidParameter, stat); + + stat = GdipRecordMetafile(hdc, EmfTypeEmfPlusOnly, &frame, MetafileFrameUnitPixel, description, NULL); + expect(InvalidParameter, stat); + + stat = GdipRecordMetafile(hdc, EmfTypeEmfPlusOnly, &frame, MetafileFrameUnitPixel, description, &metafile); + expect(Ok, stat); + + DeleteDC(hdc); + + if (stat != Ok) + return; + + stat = GdipGetHemfFromMetafile(metafile, &hemf); + expect(InvalidParameter, stat); + + stat = GdipGetImageGraphicsContext((GpImage*)metafile, &graphics); + expect(Ok, stat); + + stat = GdipGetHemfFromMetafile(metafile, &hemf); + expect(InvalidParameter, stat); + + stat = GdipDeleteGraphics(graphics); + expect(Ok, stat); + + check_metafile(metafile, empty_records, "empty metafile", dst_points, &frame, UnitPixel); + + stat = GdipGetHemfFromMetafile(metafile, &hemf); + expect(Ok, stat); + + stat = GdipGetHemfFromMetafile(metafile, &dummy); + expect(InvalidParameter, stat); + + stat = GdipDisposeImage((GpImage*)metafile); + expect(Ok, stat); + + check_emfplus(hemf, empty_records, "empty emf"); + + ret = DeleteEnhMetaFile(hemf); + ok(ret != 0, "Failed to delete enhmetafile %p\n", hemf); +} + +static const emfplus_record getdc_records[] = { + {0, EMR_HEADER}, + {0, EmfPlusRecordTypeHeader}, + {0, EmfPlusRecordTypeGetDC}, + {0, EMR_CREATEBRUSHINDIRECT}, + {0, EMR_SELECTOBJECT}, + {0, EMR_RECTANGLE}, + {0, EMR_SELECTOBJECT}, + {0, EMR_DELETEOBJECT}, + {0, EmfPlusRecordTypeEndOfFile}, + {0, EMR_EOF}, + {0} +}; + +static void test_getdc(void) +{ + GpStatus stat; + GpMetafile *metafile; + GpGraphics *graphics; + HDC hdc, metafile_dc; + HENHMETAFILE hemf; + BOOL ret; + static const GpRectF frame = {0.0, 0.0, 100.0, 100.0}; + static const GpPointF dst_points[3] = {{0.0,0.0},{100.0,0.0},{0.0,100.0}}; + static const GpPointF dst_points_half[3] = {{0.0,0.0},{50.0,0.0},{0.0,50.0}}; + static const WCHAR description[] = {'w','i','n','e','t','e','s','t',0}; + HBRUSH hbrush, holdbrush; + GpBitmap *bitmap; + ARGB color; + + hdc = CreateCompatibleDC(0); + + stat = GdipRecordMetafile(hdc, EmfTypeEmfPlusOnly, &frame, MetafileFrameUnitPixel, description, &metafile); + expect(Ok, stat); + + DeleteDC(hdc); + + if (stat != Ok) + return; + + stat = GdipGetHemfFromMetafile(metafile, &hemf); + expect(InvalidParameter, stat); + + stat = GdipGetImageGraphicsContext((GpImage*)metafile, &graphics); + expect(Ok, stat); + + stat = GdipGetDC(graphics, &metafile_dc); + expect(Ok, stat); + + if (stat != Ok) + { + GdipDeleteGraphics(graphics); + GdipDisposeImage((GpImage*)metafile); + return; + } + + hbrush = CreateSolidBrush(0xff0000); + + holdbrush = SelectObject(metafile_dc, hbrush); + + Rectangle(metafile_dc, 25, 25, 75, 75); + + SelectObject(metafile_dc, holdbrush); + + DeleteObject(hbrush); + + stat = GdipReleaseDC(graphics, metafile_dc); + expect(Ok, stat); + + stat = GdipDeleteGraphics(graphics); + expect(Ok, stat); + + check_metafile(metafile, getdc_records, "getdc metafile", dst_points, &frame, UnitPixel); + + stat = GdipCreateBitmapFromScan0(100, 100, 0, PixelFormat32bppARGB, NULL, &bitmap); + expect(Ok, stat); + + stat = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics); + expect(Ok, stat); + + play_metafile(metafile, graphics, getdc_records, "getdc playback", dst_points, &frame, UnitPixel); + + stat = GdipBitmapGetPixel(bitmap, 15, 15, &color); + expect(Ok, stat); + expect(0, color); + + stat = GdipBitmapGetPixel(bitmap, 50, 50, &color); + expect(Ok, stat); + expect(0xff0000ff, color); + + stat = GdipBitmapSetPixel(bitmap, 50, 50, 0); + expect(Ok, stat); + + play_metafile(metafile, graphics, getdc_records, "getdc playback", dst_points_half, &frame, UnitPixel); + + stat = GdipBitmapGetPixel(bitmap, 15, 15, &color); + expect(Ok, stat); + expect(0xff0000ff, color); + + stat = GdipBitmapGetPixel(bitmap, 50, 50, &color); + expect(Ok, stat); + expect(0, color); + + stat = GdipDeleteGraphics(graphics); + expect(Ok, stat); + + stat = GdipDisposeImage((GpImage*)bitmap); + expect(Ok, stat); + + stat = GdipGetHemfFromMetafile(metafile, &hemf); + expect(Ok, stat); + + stat = GdipDisposeImage((GpImage*)metafile); + expect(Ok, stat); + + check_emfplus(hemf, getdc_records, "getdc emf"); + + ret = DeleteEnhMetaFile(hemf); + ok(ret != 0, "Failed to delete enhmetafile %p\n", hemf); +} + +static const emfplus_record emfonly_records[] = { + {0, EMR_HEADER}, + {0, EMR_CREATEBRUSHINDIRECT}, + {0, EMR_SELECTOBJECT}, + {0, EMR_RECTANGLE}, + {0, EMR_SELECTOBJECT}, + {0, EMR_DELETEOBJECT}, + {0, EMR_EOF}, + {0} +}; + +static void test_emfonly(void) +{ + GpStatus stat; + GpMetafile *metafile; + GpGraphics *graphics; + HDC hdc, metafile_dc; + HENHMETAFILE hemf; + BOOL ret; + static const GpRectF frame = {0.0, 0.0, 100.0, 100.0}; + static const GpPointF dst_points[3] = {{0.0,0.0},{100.0,0.0},{0.0,100.0}}; + static const WCHAR description[] = {'w','i','n','e','t','e','s','t',0}; + HBRUSH hbrush, holdbrush; + GpBitmap *bitmap; + ARGB color; + + hdc = CreateCompatibleDC(0); + + stat = GdipRecordMetafile(hdc, EmfTypeEmfOnly, &frame, MetafileFrameUnitPixel, description, &metafile); + expect(Ok, stat); + + DeleteDC(hdc); + + if (stat != Ok) + return; + + stat = GdipGetHemfFromMetafile(metafile, &hemf); + expect(InvalidParameter, stat); + + stat = GdipGetImageGraphicsContext((GpImage*)metafile, &graphics); + expect(Ok, stat); + + stat = GdipGetDC(graphics, &metafile_dc); + expect(Ok, stat); + + if (stat != Ok) + { + GdipDeleteGraphics(graphics); + GdipDisposeImage((GpImage*)metafile); + return; + } + + hbrush = CreateSolidBrush(0xff0000); + + holdbrush = SelectObject(metafile_dc, hbrush); + + Rectangle(metafile_dc, 25, 25, 75, 75); + + SelectObject(metafile_dc, holdbrush); + + DeleteObject(hbrush); + + stat = GdipReleaseDC(graphics, metafile_dc); + expect(Ok, stat); + + stat = GdipDeleteGraphics(graphics); + expect(Ok, stat); + + check_metafile(metafile, emfonly_records, "emfonly metafile", dst_points, &frame, UnitPixel); + + stat = GdipCreateBitmapFromScan0(100, 100, 0, PixelFormat32bppARGB, NULL, &bitmap); + expect(Ok, stat); + + stat = GdipGetImageGraphicsContext((GpImage*)bitmap, &graphics); + expect(Ok, stat); + + play_metafile(metafile, graphics, emfonly_records, "emfonly playback", dst_points, &frame, UnitPixel); + + stat = GdipBitmapGetPixel(bitmap, 15, 15, &color); + expect(Ok, stat); + expect(0, color); + + stat = GdipBitmapGetPixel(bitmap, 50, 50, &color); + expect(Ok, stat); + expect(0xff0000ff, color); + + stat = GdipDeleteGraphics(graphics); + expect(Ok, stat); + + stat = GdipDisposeImage((GpImage*)bitmap); + expect(Ok, stat); + + stat = GdipGetHemfFromMetafile(metafile, &hemf); + expect(Ok, stat); + + stat = GdipDisposeImage((GpImage*)metafile); + expect(Ok, stat); + + check_emfplus(hemf, emfonly_records, "emfonly emf"); + + ret = DeleteEnhMetaFile(hemf); + ok(ret != 0, "Failed to delete enhmetafile %p\n", hemf); +} + +START_TEST(metafile) +{ + struct GdiplusStartupInput gdiplusStartupInput; + ULONG_PTR gdiplusToken; + + gdiplusStartupInput.GdiplusVersion = 1; + gdiplusStartupInput.DebugEventCallback = NULL; + gdiplusStartupInput.SuppressBackgroundThread = 0; + gdiplusStartupInput.SuppressExternalCodecs = 0; + + GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); + + test_empty(); + test_getdc(); + test_emfonly(); + + GdiplusShutdown(gdiplusToken); +} Propchange: trunk/rostests/winetests/gdiplus/metafile.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/winetests/gdiplus/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/testlis…
============================================================================== --- trunk/rostests/winetests/gdiplus/testlist.c [iso-8859-1] (original) +++ trunk/rostests/winetests/gdiplus/testlist.c [iso-8859-1] Sat May 19 10:03:49 2012 @@ -13,6 +13,7 @@ extern void func_graphicspath(void); extern void func_image(void); extern void func_matrix(void); +extern void func_metafile(void); extern void func_pathiterator(void); extern void func_pen(void); extern void func_region(void); @@ -21,12 +22,13 @@ const struct test winetest_testlist[] = { { "brush", func_brush }, - { "customlinecap", func_customlinecap }, + { "customlinecap", func_customlinecap }, { "font", func_font }, { "graphics", func_graphics }, { "graphicspath", func_graphicspath }, { "image", func_image }, { "matrix", func_matrix }, + { "metafile", func_metafile }, { "pathiterator", func_pathiterator }, { "pen", func_pen }, { "region", func_region },
12 years, 7 months
1
0
0
0
[akhaldi] 56613: [GDIPLUS] * Sync to Wine 1.5.4.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat May 19 10:03:40 2012 New Revision: 56613 URL:
http://svn.reactos.org/svn/reactos?rev=56613&view=rev
Log: [GDIPLUS] * Sync to Wine 1.5.4. Modified: trunk/reactos/dll/win32/gdiplus/CMakeLists.txt trunk/reactos/dll/win32/gdiplus/brush.c trunk/reactos/dll/win32/gdiplus/font.c trunk/reactos/dll/win32/gdiplus/gdiplus.c trunk/reactos/dll/win32/gdiplus/gdiplus.spec trunk/reactos/dll/win32/gdiplus/gdiplus_private.h trunk/reactos/dll/win32/gdiplus/graphics.c trunk/reactos/dll/win32/gdiplus/graphicspath.c trunk/reactos/dll/win32/gdiplus/image.c trunk/reactos/dll/win32/gdiplus/imageattributes.c trunk/reactos/include/psdk/gdiplusflat.h 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/gdiplus/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/CMakeLis…
Modified: trunk/reactos/dll/win32/gdiplus/brush.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/brush.c?…
Modified: trunk/reactos/dll/win32/gdiplus/font.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/font.c?r…
Modified: trunk/reactos/dll/win32/gdiplus/gdiplus.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/gdiplus.…
Modified: trunk/reactos/dll/win32/gdiplus/gdiplus.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/gdiplus.…
Modified: trunk/reactos/dll/win32/gdiplus/gdiplus_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/gdiplus_…
Modified: trunk/reactos/dll/win32/gdiplus/graphics.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/graphics…
Modified: trunk/reactos/dll/win32/gdiplus/graphicspath.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/graphics…
Modified: trunk/reactos/dll/win32/gdiplus/image.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/image.c?…
Modified: trunk/reactos/dll/win32/gdiplus/imageattributes.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdiplus/imageatt…
Modified: trunk/reactos/include/psdk/gdiplusflat.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/gdiplusflat.h…
Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
12 years, 7 months
1
0
0
0
[akhaldi] 56612: [FUSION_WINETEST] * Sync to Wine 1.5.4.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat May 19 09:41:19 2012 New Revision: 56612 URL:
http://svn.reactos.org/svn/reactos?rev=56612&view=rev
Log: [FUSION_WINETEST] * Sync to Wine 1.5.4. Modified: trunk/rostests/winetests/fusion/asmcache.c Modified: trunk/rostests/winetests/fusion/asmcache.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/fusion/asmcache…
============================================================================== --- trunk/rostests/winetests/fusion/asmcache.c [iso-8859-1] (original) +++ trunk/rostests/winetests/fusion/asmcache.c [iso-8859-1] Sat May 19 09:41:19 2012 @@ -888,7 +888,6 @@ ULONG disp; DWORD attr; char dllpath[MAX_PATH]; - UINT size; static const WCHAR empty[] = {0}; static const WCHAR noext[] = {'f','i','l','e',0}; @@ -942,7 +941,7 @@ hr = IAssemblyCache_InstallAssembly(cache, 0, winedll, NULL); ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - size = GetWindowsDirectoryA(dllpath, MAX_PATH); + GetWindowsDirectoryA(dllpath, MAX_PATH); strcat(dllpath, "\\assembly\\GAC_MSIL\\wine\\\\1.0.0.0__2d03617b1c31e2f5\\wine.dll"); attr = GetFileAttributes(dllpath); @@ -951,19 +950,18 @@ /* uninstall the assembly from the GAC */ disp = 0xf00dbad; hr = IAssemblyCache_UninstallAssembly(cache, 0, wine, NULL, &disp); - todo_wine - { - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(disp == IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, - "Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, got %d\n", disp); - } - - /* FIXME: remove once UninstallAssembly is implemented */ - DeleteFileA(dllpath); - dllpath[size + sizeof("\\assembly\\GAC_MSIL\\wine\\1.0.0.0__2d03617b1c31e2f5")] = '\0'; - RemoveDirectoryA(dllpath); - dllpath[size + sizeof("\\assembly\\GAC_MSIL\\wine")] = '\0'; - RemoveDirectoryA(dllpath); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(disp == IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, + "Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, got %d\n", disp); + + attr = GetFileAttributes(dllpath); + ok(attr == INVALID_FILE_ATTRIBUTES, "Expected assembly not to exist\n"); + + disp = 0xf00dbad; + hr = IAssemblyCache_UninstallAssembly(cache, 0, wine, NULL, &disp); + ok(hr == S_FALSE, "Expected S_FALSE, got %08x\n", hr); + ok(disp == IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED, + "Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_ALREADY_UNINSTALLED, got %d\n", disp); DeleteFileA("test.dll"); DeleteFileA("wine.dll"); @@ -987,8 +985,6 @@ HRESULT hr; DWORD size; ULONG disp; - char dllpath[MAX_PATH]; - UINT len; static const WCHAR empty[] = {0}; static const WCHAR commasep[] = {',',' ',0}; @@ -1485,24 +1481,27 @@ ok(info.cchBuf == lstrlenW(asmpath) + 1, "Expected %d, got %d\n", lstrlenW(asmpath) + 1, info.cchBuf); + /* no flags, display name is "wine, Version=1.0.0.0" */ + INIT_ASM_INFO(); + info.pszCurrentAssemblyPathBuf = NULL; + info.cchBuf = 0; + lstrcpyW(name, wine); + lstrcatW(name, commasep); + lstrcatW(name, ver); + hr = IAssemblyCache_QueryAssemblyInfo(cache, 0, name, &info); + ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), + "Expected HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER), got %08x\n", hr); + ok(info.cbAssemblyInfo == sizeof(ASSEMBLY_INFO), + "Expected sizeof(ASSEMBLY_INFO), got %d\n", info.cbAssemblyInfo); + ok(info.dwAssemblyFlags == ASSEMBLYINFO_FLAG_INSTALLED, + "Expected ASSEMBLYINFO_FLAG_INSTALLED, got %08x\n", info.dwAssemblyFlags); + /* uninstall the assembly from the GAC */ disp = 0xf00dbad; hr = IAssemblyCache_UninstallAssembly(cache, 0, wine, NULL, &disp); - todo_wine - { - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - ok(disp == IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, - "Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, got %d\n", disp); - } - - /* FIXME: remove once UninstallAssembly is implemented */ - len = GetWindowsDirectoryA(dllpath, MAX_PATH); - strcat(dllpath, "\\assembly\\GAC_MSIL\\wine\\\\1.0.0.0__2d03617b1c31e2f5\\wine.dll"); - DeleteFileA(dllpath); - dllpath[len + sizeof("\\assembly\\GAC_MSIL\\wine\\1.0.0.0__2d03617b1c31e2f5")] = '\0'; - RemoveDirectoryA(dllpath); - dllpath[len + sizeof("\\assembly\\GAC_MSIL\\wine")] = '\0'; - RemoveDirectoryA(dllpath); + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + ok(disp == IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, + "Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, got %d\n", disp); DeleteFileA("test.dll"); DeleteFileA("wine.dll");
12 years, 7 months
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
23
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
Results per page:
10
25
50
100
200