winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2008
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1216 discussions
Start a n
N
ew thread
Alexandre Julliard : kernel32: Only try to open a VxD if opening a normal device failed.
by Alexandre Julliard
30 Oct '08
30 Oct '08
Module: wine Branch: master Commit: 7c6302b7ff5571a5119a7dea2f946e043b956156 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7c6302b7ff5571a5119a7dea2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Oct 30 10:33:45 2008 +0100 kernel32: Only try to open a VxD if opening a normal device failed. --- dlls/kernel32/file.c | 17 +++++------------ 1 files changed, 5 insertions(+), 12 deletions(-) diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c index adbc69d..608a539 100644 --- a/dlls/kernel32/file.c +++ b/dlls/kernel32/file.c @@ -1316,6 +1316,7 @@ HANDLE WINAPI CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing, IO_STATUS_BLOCK io; HANDLE ret; DWORD dosdev; + const WCHAR *vxd_name = NULL; static const WCHAR bkslashes_with_dotW[] = {'\\','\\','.','\\',0}; static const WCHAR coninW[] = {'C','O','N','I','N','$',0}; static const WCHAR conoutW[] = {'C','O','N','O','U','T','$',0}; @@ -1371,19 +1372,9 @@ HANDLE WINAPI CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing, { dosdev += MAKELONG( 0, 4*sizeof(WCHAR) ); /* adjust position to start of filename */ } - else if (!(GetVersion() & 0x80000000)) + else if (GetVersion() & 0x80000000) { - dosdev = 0; - } - else if (filename[4]) - { - ret = VXD_Open( filename+4, access, sa ); - goto done; - } - else - { - SetLastError( ERROR_INVALID_NAME ); - return INVALID_HANDLE_VALUE; + vxd_name = filename + 4; } } else dosdev = RtlIsDosDeviceName_U( filename ); @@ -1465,6 +1456,8 @@ HANDLE WINAPI CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing, options, NULL, 0 ); if (status) { + if (vxd_name && vxd_name[0] && (ret = VXD_Open( vxd_name, access, sa ))) goto done; + WARN("Unable to create file %s (status %x)\n", debugstr_w(filename), status); ret = INVALID_HANDLE_VALUE;
1
0
0
0
Alexandre Julliard : ntdll: Store the exit code in the server in RtlExitUserThread.
by Alexandre Julliard
30 Oct '08
30 Oct '08
Module: wine Branch: master Commit: 74cdb539a4b2e50d169d37b35d0cc9ecc1b2e7bd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74cdb539a4b2e50d169d37b35…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 29 20:37:43 2008 +0100 ntdll: Store the exit code in the server in RtlExitUserThread. --- dlls/kernel32/thread.c | 23 ++--------------------- dlls/ntdll/thread.c | 24 ++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c index bddeba7..b5a3708 100644 --- a/dlls/kernel32/thread.c +++ b/dlls/kernel32/thread.c @@ -152,27 +152,8 @@ HANDLE WINAPI OpenThread( DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwTh */ void WINAPI ExitThread( DWORD code ) /* [in] Exit code for this thread */ { - BOOL last; - SERVER_START_REQ( terminate_thread ) - { - /* send the exit code to the server */ - req->handle = GetCurrentThread(); - req->exit_code = code; - wine_server_call( req ); - last = reply->last; - } - SERVER_END_REQ; - - if (last) - { - LdrShutdownProcess(); - exit( code ); - } - else - { - RtlFreeThreadActivationContextStack(); - RtlExitUserThread( code ); - } + RtlFreeThreadActivationContextStack(); + RtlExitUserThread( code ); } diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 47e0196..db126bb 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -604,8 +604,28 @@ error: */ void WINAPI RtlExitUserThread( ULONG status ) { - LdrShutdownThread(); - server_exit_thread( status ); + BOOL last; + + SERVER_START_REQ( terminate_thread ) + { + /* send the exit code to the server */ + req->handle = GetCurrentThread(); + req->exit_code = status; + wine_server_call( req ); + last = reply->last; + } + SERVER_END_REQ; + + if (last) + { + LdrShutdownProcess(); + exit( status ); + } + else + { + LdrShutdownThread(); + server_exit_thread( status ); + } }
1
0
0
0
Alexandre Julliard : ntdll: Allocate a new virtual region for large blocks, and ensure 16-byte alignment.
by Alexandre Julliard
30 Oct '08
30 Oct '08
Module: wine Branch: master Commit: 21453b4c2e163ec2fb5e630ef812b74e53c58083 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21453b4c2e163ec2fb5e630ef…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 29 17:32:45 2008 +0100 ntdll: Allocate a new virtual region for large blocks, and ensure 16-byte alignment. --- dlls/kernel32/tests/heap.c | 6 + dlls/ntdll/heap.c | 256 ++++++++++++++++++++++++++++++++++++++------ 2 files changed, 228 insertions(+), 34 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=21453b4c2e163ec2fb5e6…
1
0
0
0
Vitaly Perov : netapi32: Add stub for NetShareGetInfo.
by Alexandre Julliard
29 Oct '08
29 Oct '08
Module: wine Branch: master Commit: 38815e1c89ad8f0c4522b3956e929661bfce3255 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=38815e1c89ad8f0c4522b3956…
Author: Vitaly Perov <vitperov(a)etersoft.ru> Date: Mon Jul 14 17:58:57 2008 +0400 netapi32: Add stub for NetShareGetInfo. --- dlls/netapi32/netapi32.spec | 2 +- dlls/netapi32/share.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletions(-) diff --git a/dlls/netapi32/netapi32.spec b/dlls/netapi32/netapi32.spec index 8f1a544..a43703f 100644 --- a/dlls/netapi32/netapi32.spec +++ b/dlls/netapi32/netapi32.spec @@ -194,7 +194,7 @@ @ stub NetShareDelSticky @ stdcall NetShareEnum(wstr long ptr long ptr ptr ptr) @ stub NetShareEnumSticky -@ stub NetShareGetInfo +@ stdcall NetShareGetInfo(wstr wstr long ptr) @ stub NetShareSetInfo @ stdcall NetStatisticsGet(wstr wstr long long ptr) @ stdcall NetUseAdd(wstr long ptr ptr) diff --git a/dlls/netapi32/share.c b/dlls/netapi32/share.c index 54f13cf..03f92bb 100644 --- a/dlls/netapi32/share.c +++ b/dlls/netapi32/share.c @@ -92,3 +92,14 @@ NET_API_STATUS WINAPI NetShareDel(LMSTR servername, LMSTR netname, DWORD reserve FIXME("Stub (%s %s %d)\n", debugstr_w(servername), debugstr_w(netname), reserved); return NERR_Success; } + +/************************************************************ + * NetShareGetInfo (NETAPI32.@) + */ +NET_API_STATUS WINAPI NetShareGetInfo(LMSTR servername, LMSTR netname, + DWORD level, LPBYTE *bufptr) +{ + FIXME("Stub (%s %s %d %p)\n", debugstr_w(servername), + debugstr_w(netname),level, bufptr); + return NERR_NetNameNotFound; +}
1
0
0
0
Alexandre Julliard : ntdll: Add a few more tests for RtlIsDosDeviceName_U, fix some failures on Windows.
by Alexandre Julliard
29 Oct '08
29 Oct '08
Module: wine Branch: master Commit: 7db820e900fcdf7222b9e0a60dba4e9c57a98f30 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7db820e900fcdf7222b9e0a60…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 29 15:22:06 2008 +0100 ntdll: Add a few more tests for RtlIsDosDeviceName_U, fix some failures on Windows. --- dlls/ntdll/tests/path.c | 28 +++++++++++----------------- 1 files changed, 11 insertions(+), 17 deletions(-) diff --git a/dlls/ntdll/tests/path.c b/dlls/ntdll/tests/path.c index e1b1767..fd6e40f 100644 --- a/dlls/ntdll/tests/path.c +++ b/dlls/ntdll/tests/path.c @@ -91,6 +91,7 @@ static void test_RtlIsDosDeviceName(void) const char *path; WORD pos; WORD len; + BOOL fails; }; static const struct test tests[] = @@ -101,22 +102,26 @@ static void test_RtlIsDosDeviceName(void) { "", 0, 0 }, { "\\\\foo\\nul", 0, 0 }, { "c:\\nul:", 6, 6 }, - { "c:\\nul::", 6, 6 }, - { "c:\\nul::::::", 6, 6 }, + { "c:\\nul\\", 0, 0 }, + { "c:\\nul\\foo", 0, 0 }, + { "c:\\nul::", 6, 6, TRUE }, /* fails on nt4 */ + { "c:\\nul::::::", 6, 6, TRUE }, /* fails on nt4 */ { "c:prn ", 4, 6 }, { "c:prn.......", 4, 6 }, { "c:prn... ...", 4, 6 }, - { "c:NUL .... ", 4, 6 }, + { "c:NUL .... ", 4, 6, TRUE }, /* fails on nt4 */ { "c: . . .", 0, 0 }, { "c:", 0, 0 }, { " . . . :", 0, 0 }, { ":", 0, 0 }, { "c:nul. . . :", 4, 6 }, - { "c:nul . . :", 4, 6 }, + { "c:nul . . :", 4, 6, TRUE }, /* fails on nt4 */ { "c:nul0", 0, 0 }, + { "c:prn:aaa", 4, 6, TRUE }, /* fails on win9x */ { "c:PRN:.txt", 4, 6 }, { "c:aux:.txt...", 4, 6 }, { "c:prn:.txt:", 4, 6 }, + { "c:nul:aaa", 4, 6, TRUE }, /* fails on win9x */ { "con:", 0, 6 }, { "lpt1:", 0, 8 }, { "c:com5:", 4, 8 }, @@ -141,22 +146,11 @@ static void test_RtlIsDosDeviceName(void) { pRtlMultiByteToUnicodeN( buffer, sizeof(buffer), NULL, test->path, strlen(test->path)+1 ); ret = pRtlIsDosDeviceName_U( buffer ); - ok( ret == MAKELONG( test->len, test->pos ), + ok( ret == MAKELONG( test->len, test->pos ) || + (test->fails && broken( ret == 0 )), "Wrong result (%d,%d)/(%d,%d) for %s\n", HIWORD(ret), LOWORD(ret), test->pos, test->len, test->path ); } - - pRtlMultiByteToUnicodeN( buffer, sizeof(buffer), NULL, "c:prn:aaa", strlen("c:prn:aaa")+1 ); - ret = pRtlIsDosDeviceName_U( buffer ); - ok( ret == MAKELONG( 6, 4 ) || /* NT */ - ret == MAKELONG( 0, 0), /* win9x */ - "Wrong result (%d,%d)/(4,6) or (0,0) for c:prn:aaa\n", HIWORD(ret), LOWORD(ret) ); - - pRtlMultiByteToUnicodeN( buffer, sizeof(buffer), NULL, "c:nul:aaa", strlen("c:nul:aaa")+1 ); - ret = pRtlIsDosDeviceName_U( buffer ); - ok( ret == MAKELONG( 6, 4 ) || /* NT */ - ret == MAKELONG( 0, 0), /* win9x */ - "Wrong result (%d,%d)/(4,6) or (0,0) for c:nul:aaa\n", HIWORD(ret), LOWORD(ret) ); } static void test_RtlIsNameLegalDOS8Dot3(void)
1
0
0
0
Alexandre Julliard : ntdll: Simplify the RtlIsDosDeviceName_U implementation.
by Alexandre Julliard
29 Oct '08
29 Oct '08
Module: wine Branch: master Commit: 6be25f8cb1f1c0f98ae704ed812a03db4eec8ae8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6be25f8cb1f1c0f98ae704ed8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Oct 29 15:21:51 2008 +0100 ntdll: Simplify the RtlIsDosDeviceName_U implementation. --- dlls/ntdll/path.c | 28 +++++++++++----------------- 1 files changed, 11 insertions(+), 17 deletions(-) diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c index a6fb090..6716c6a 100644 --- a/dlls/ntdll/path.c +++ b/dlls/ntdll/path.c @@ -287,30 +287,24 @@ ULONG WINAPI RtlIsDosDeviceName_U( PCWSTR dos_name ) if (!strcmpiW( dos_name, consoleW )) return MAKELONG( sizeof(conW), 4 * sizeof(WCHAR) ); /* 4 is length of \\.\ prefix */ return 0; + case ABSOLUTE_DRIVE_PATH: + case RELATIVE_DRIVE_PATH: + start = dos_name + 2; /* skip drive letter */ + break; default: + start = dos_name; break; } - end = dos_name + strlenW(dos_name) - 1; - while (end >= dos_name && *end == ':') end--; /* remove all trailing ':' */ - /* find start of file name */ - for (start = end; start >= dos_name; start--) - { - if (IS_SEPARATOR(start[0])) break; - /* check for ':' but ignore if before extension (for things like NUL:.txt) */ - if (start[0] == ':' && start[1] != '.') break; - } - start++; + for (p = start; *p; p++) if (IS_SEPARATOR(*p)) start = p + 1; + + /* truncate at extension and ':' */ + for (end = start; *end; end++) if (*end == '.' || *end == ':') break; + end--; - /* remove extension */ - if ((p = strchrW( start, '.' ))) - { - end = p - 1; - if (end >= dos_name && *end == ':') end--; /* remove trailing ':' before extension */ - } /* remove trailing spaces */ - while (end >= dos_name && *end == ' ') end--; + while (end >= start && *end == ' ') end--; /* now we have a potential device name between start and end, check it */ switch(end - start + 1)
1
0
0
0
Aric Stewart : ws2_32: Only set the overlapped hEvent if it exists.
by Alexandre Julliard
29 Oct '08
29 Oct '08
Module: wine Branch: master Commit: 6b4d22ca2c26fcb098cf333c1fa0a00390e1f213 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6b4d22ca2c26fcb098cf333c1…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Oct 28 10:37:43 2008 -0500 ws2_32: Only set the overlapped hEvent if it exists. --- dlls/ws2_32/socket.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 7449f11..b485777 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2757,7 +2757,7 @@ INT WINAPI WSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, if (!wsa->completion_func) { if (cvalue) WS_AddCompletion( s, cvalue, STATUS_SUCCESS, n ); - SetEvent( lpOverlapped->hEvent ); + if (lpOverlapped->hEvent) SetEvent( lpOverlapped->hEvent ); HeapFree( GetProcessHeap(), 0, wsa ); } else NtQueueApcThread( GetCurrentThread(), (PNTAPCFUNC)ws2_async_apc, @@ -4279,7 +4279,7 @@ INT WINAPI WSARecvFrom( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, if (!wsa->completion_func) { if (cvalue) WS_AddCompletion( s, cvalue, STATUS_SUCCESS, n ); - SetEvent( lpOverlapped->hEvent ); + if (lpOverlapped->hEvent) SetEvent( lpOverlapped->hEvent ); HeapFree( GetProcessHeap(), 0, wsa ); } else NtQueueApcThread( GetCurrentThread(), (PNTAPCFUNC)ws2_async_apc,
1
0
0
0
Alistair Leslie-Hughes : inetcomm: Correct test under w2k8.
by Alexandre Julliard
29 Oct '08
29 Oct '08
Module: wine Branch: master Commit: 5416057e79c5f4d55d1fa78d5a387e355c416691 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5416057e79c5f4d55d1fa78d5…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Oct 29 16:13:13 2008 +1100 inetcomm: Correct test under w2k8. --- dlls/inetcomm/tests/mimeintl.c | 25 +++++++++++++++++++------ 1 files changed, 19 insertions(+), 6 deletions(-) diff --git a/dlls/inetcomm/tests/mimeintl.c b/dlls/inetcomm/tests/mimeintl.c index d82c191..e49567d 100644 --- a/dlls/inetcomm/tests/mimeintl.c +++ b/dlls/inetcomm/tests/mimeintl.c @@ -46,13 +46,26 @@ static void test_create(void) hr = MimeOleGetInternat(&internat2); ok(hr == S_OK, "ret %08x\n", hr); - /* test to show that the object is a singleton with - a reference held by the dll. */ - ok(internat == internat2, "instances differ\n"); - ref = IMimeInternational_Release(internat2); - ok(ref == 2, "got %d\n", ref); + /* Under w2k8 it's no longer a singleton */ + if(internat == internat2) + { + /* test to show that the object is a singleton with + a reference held by the dll. */ + ref = IMimeInternational_Release(internat2); + ok(ref == 2, "got %d\n", ref); + + ref = IMimeInternational_Release(internat); + ok(ref == 1, "got %d\n", ref); + } + else + { + ref = IMimeInternational_Release(internat2); + ok(ref == 0, "got %d\n", ref); + + ref = IMimeInternational_Release(internat); + ok(ref == 0, "got %d\n", ref); + } - IMimeInternational_Release(internat); } static inline HRESULT get_mlang(IMultiLanguage **ml)
1
0
0
0
Henri Verbeet : d3d10: Add a test to show d3d10 devices implement IDXGIDevice.
by Alexandre Julliard
29 Oct '08
29 Oct '08
Module: wine Branch: master Commit: 65e614a9ca2e3d12c1848cfe0070238b6ddf6426 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=65e614a9ca2e3d12c1848cfe0…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Oct 29 09:00:27 2008 +0100 d3d10: Add a test to show d3d10 devices implement IDXGIDevice. --- configure | 9 +++++ configure.ac | 1 + dlls/d3d10/tests/Makefile.in | 13 +++++++ dlls/d3d10/tests/device.c | 83 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 106 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 0f78ad7..bc9c630 100755 --- a/configure +++ b/configure @@ -22953,6 +22953,14 @@ dlls/d3d10/Makefile: dlls/d3d10/Makefile.in dlls/Makedll.rules" ac_config_files="$ac_config_files dlls/d3d10/Makefile" ALL_MAKEFILES="$ALL_MAKEFILES \\ + dlls/d3d10/tests/Makefile" +test "x$enable_d3d10_tests" != xno && ALL_TEST_DIRS="$ALL_TEST_DIRS \\ + d3d10/tests" +ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS +dlls/d3d10/tests/Makefile: dlls/d3d10/tests/Makefile.in dlls/Maketest.rules" +ac_config_files="$ac_config_files dlls/d3d10/tests/Makefile" + +ALL_MAKEFILES="$ALL_MAKEFILES \\ dlls/d3d8/Makefile" test "x$enable_d3d8" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \\ d3d8" @@ -26668,6 +26676,7 @@ do "dlls/ctapi32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/ctapi32/Makefile" ;; "dlls/ctl3d32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/ctl3d32/Makefile" ;; "dlls/d3d10/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d10/Makefile" ;; + "dlls/d3d10/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d10/tests/Makefile" ;; "dlls/d3d8/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d8/Makefile" ;; "dlls/d3d8/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d8/tests/Makefile" ;; "dlls/d3d9/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d9/Makefile" ;; diff --git a/configure.ac b/configure.ac index 254bdb4..e83ee37 100644 --- a/configure.ac +++ b/configure.ac @@ -1775,6 +1775,7 @@ WINE_CONFIG_MAKEFILE([dlls/cryptui/tests/Makefile],[dlls/Maketest.rules],[dlls], WINE_CONFIG_MAKEFILE([dlls/ctapi32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/ctl3d32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/d3d10/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) +WINE_CONFIG_MAKEFILE([dlls/d3d10/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS]) WINE_CONFIG_MAKEFILE([dlls/d3d8/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) WINE_CONFIG_MAKEFILE([dlls/d3d8/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS]) WINE_CONFIG_MAKEFILE([dlls/d3d9/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS]) diff --git a/dlls/d3d10/tests/Makefile.in b/dlls/d3d10/tests/Makefile.in new file mode 100644 index 0000000..892b9ce --- /dev/null +++ b/dlls/d3d10/tests/Makefile.in @@ -0,0 +1,13 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +TESTDLL = d3d10.dll +IMPORTS = d3d10 kernel32 + +CTESTS = \ + device.c \ + +@MAKE_TEST_RULES@ + +@DEPENDENCIES@ # everything below this line is overwritten by make depend diff --git a/dlls/d3d10/tests/device.c b/dlls/d3d10/tests/device.c new file mode 100644 index 0000000..3ad9113 --- /dev/null +++ b/dlls/d3d10/tests/device.c @@ -0,0 +1,83 @@ +/* + * Copyright 2008 Henri Verbeet 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 + */ + +#define COBJMACROS +#include "initguid.h" +#include "d3d10.h" +#include "wine/test.h" + +static ID3D10Device *create_device(void) +{ + ID3D10Device *device; + + if (SUCCEEDED(D3D10CreateDevice(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0, D3D10_SDK_VERSION, &device))) + { + trace("Created a HW device\n"); + return device; + } + + trace("Failed to create a HW device, trying REF\n"); + if (SUCCEEDED(D3D10CreateDevice(NULL, D3D10_DRIVER_TYPE_REFERENCE, NULL, 0, D3D10_SDK_VERSION, &device))) + { + trace("Created a REF device\n"); + return device; + } + + trace("Failed to create a device, returning NULL\n"); + return NULL; +} + +static void test_device_interfaces(ID3D10Device *device) +{ + HRESULT hr; + IUnknown *obj; + + if (SUCCEEDED(hr = ID3D10Device_QueryInterface(device, &IID_IUnknown, (void **)&obj))) + IUnknown_Release(obj); + ok(SUCCEEDED(hr), "ID3D10Device does not implement IUnknown (%#x)\n", hr); + + if (SUCCEEDED(hr = ID3D10Device_QueryInterface(device, &IID_ID3D10Device, (void **)&obj))) + IUnknown_Release(obj); + ok(SUCCEEDED(hr), "ID3D10Device does not implement ID3D10Device (%#x)\n", hr); + + if (SUCCEEDED(hr = ID3D10Device_QueryInterface(device, &IID_IDXGIObject, (void **)&obj))) + IUnknown_Release(obj); + todo_wine ok(SUCCEEDED(hr), "ID3D10Device does not implement IDXGIObject (%#x)\n", hr); + + if (SUCCEEDED(hr = ID3D10Device_QueryInterface(device, &IID_IDXGIDevice, (void **)&obj))) + IUnknown_Release(obj); + todo_wine ok(SUCCEEDED(hr), "ID3D10Device does not implement IDXGIDevice (%#x)\n", hr); +} + +START_TEST(device) +{ + ID3D10Device *device; + ULONG refcount; + + device = create_device(); + if (!device) + { + skip("Failed to create device, skipping tests\n"); + return; + } + + test_device_interfaces(device); + + refcount = ID3D10Device_Release(device); + ok(!refcount, "Device has %u references left\n", refcount); +}
1
0
0
0
Henri Verbeet : dxgi: Add some stubs for IDXGISwapChain.
by Alexandre Julliard
29 Oct '08
29 Oct '08
Module: wine Branch: master Commit: 926c47940ca5090007bfa1dbc2d4225d7530333e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=926c47940ca5090007bfa1dbc…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Oct 29 09:00:26 2008 +0100 dxgi: Add some stubs for IDXGISwapChain. --- dlls/dxgi/Makefile.in | 3 +- dlls/dxgi/dxgi_private.h | 8 ++ dlls/dxgi/factory.c | 19 ++++- dlls/dxgi/swapchain.c | 219 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 246 insertions(+), 3 deletions(-) diff --git a/dlls/dxgi/Makefile.in b/dlls/dxgi/Makefile.in index e304884..aeba0b0 100644 --- a/dlls/dxgi/Makefile.in +++ b/dlls/dxgi/Makefile.in @@ -11,7 +11,8 @@ C_SRCS = \ device.c \ dxgi_main.c \ factory.c \ - utils.c + utils.c \ + swapchain.c RC_SRCS = version.rc diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h index 5493ed3..2c828e3 100644 --- a/dlls/dxgi/dxgi_private.h +++ b/dlls/dxgi/dxgi_private.h @@ -55,4 +55,12 @@ struct dxgi_adapter LONG refcount; }; +/* IDXGISwapChain */ +extern const struct IDXGISwapChainVtbl dxgi_swapchain_vtbl; +struct dxgi_swapchain +{ + const struct IDXGISwapChainVtbl *vtbl; + LONG refcount; +}; + #endif /* __WINE_DXGI_PRIVATE_H */ diff --git a/dlls/dxgi/factory.c b/dlls/dxgi/factory.c index 5b85783..bcd63d2 100644 --- a/dlls/dxgi/factory.c +++ b/dlls/dxgi/factory.c @@ -129,9 +129,24 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_GetWindowAssociation(IDXGIFactory static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IDXGIFactory *iface, IUnknown *device, DXGI_SWAP_CHAIN_DESC *desc, IDXGISwapChain **swapchain) { - FIXME("iface %p, device %p, desc %p, swapchain %p stub!\n", iface, device, desc, swapchain); + struct dxgi_swapchain *object; - return E_NOTIMPL; + FIXME("iface %p, device %p, desc %p, swapchain %p partial stub!\n", iface, device, desc, swapchain); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate DXGI swapchain object memory\n"); + return E_OUTOFMEMORY; + } + + object->vtbl = &dxgi_swapchain_vtbl; + object->refcount = 1; + *swapchain = (IDXGISwapChain *)object; + + TRACE("Created IDXGISwapChain %p\n", object); + + return S_OK; } static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSoftwareAdapter(IDXGIFactory *iface, diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c new file mode 100644 index 0000000..3287c4c --- /dev/null +++ b/dlls/dxgi/swapchain.c @@ -0,0 +1,219 @@ +/* + * Copyright 2008 Henri Verbeet 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 "config.h" +#include "wine/port.h" + +#include "dxgi_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dxgi); + +/* IUnknown methods */ + +static HRESULT STDMETHODCALLTYPE dxgi_swapchain_QueryInterface(IDXGISwapChain *iface, REFIID riid, void **object) +{ + TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object); + + if (IsEqualGUID(riid, &IID_IUnknown) + || IsEqualGUID(riid, &IID_IDXGIObject) + || IsEqualGUID(riid, &IID_IDXGIDeviceSubObject) + || IsEqualGUID(riid, &IID_IDXGISwapChain)) + { + IUnknown_AddRef(iface); + *object = iface; + return S_OK; + } + + WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid)); + + *object = NULL; + return E_NOINTERFACE; +} + +static ULONG STDMETHODCALLTYPE dxgi_swapchain_AddRef(IDXGISwapChain *iface) +{ + struct dxgi_swapchain *This = (struct dxgi_swapchain *)iface; + ULONG refcount = InterlockedIncrement(&This->refcount); + + TRACE("%p increasing refcount to %u\n", This, refcount); + + return refcount; +} + +static ULONG STDMETHODCALLTYPE dxgi_swapchain_Release(IDXGISwapChain *iface) +{ + struct dxgi_swapchain *This = (struct dxgi_swapchain *)iface; + ULONG refcount = InterlockedDecrement(&This->refcount); + + TRACE("%p decreasing refcount to %u\n", This, refcount); + + if (!refcount) + { + HeapFree(GetProcessHeap(), 0, This); + } + + return refcount; +} + +/* IDXGIObject methods */ + +static HRESULT STDMETHODCALLTYPE dxgi_swapchain_SetPrivateData(IDXGISwapChain *iface, + REFGUID guid, UINT data_size, const void *data) +{ + FIXME("iface %p, guid %s, data_size %u, data %p stub!\n", iface, debugstr_guid(guid), data_size, data); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_swapchain_SetPrivateDataInterface(IDXGISwapChain *iface, + REFGUID guid, const IUnknown *object) +{ + FIXME("iface %p, guid %s, object %p stub!\n", iface, debugstr_guid(guid), object); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetPrivateData(IDXGISwapChain *iface, + REFGUID guid, UINT *data_size, void *data) +{ + FIXME("iface %p, guid %s, data_size %p, data %p stub!\n", iface, debugstr_guid(guid), data_size, data); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetParent(IDXGISwapChain *iface, REFIID riid, void **parent) +{ + FIXME("iface %p, riid %s, parent %p stub!\n", iface, debugstr_guid(riid), parent); + + return E_NOTIMPL; +} + +/* IDXGIDeviceSubObject methods */ + +static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetDevice(IDXGISwapChain *iface, REFIID riid, void **device) +{ + FIXME("iface %p, riid %s, device %p stub!\n", iface, debugstr_guid(riid), device); + + return E_NOTIMPL; +} + +/* IDXGISwapChain methods */ + +static HRESULT STDMETHODCALLTYPE dxgi_swapchain_Present(IDXGISwapChain *iface, UINT sync_interval, UINT flags) +{ + FIXME("iface %p, sync_interval %u, flags %#x stub!\n", iface, sync_interval, flags); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetBuffer(IDXGISwapChain *iface, + UINT buffer_idx, REFIID riid, void **surface) +{ + FIXME("iface %p, buffer_idx %u, riid %s, surface %p stub!\n", + iface, buffer_idx, debugstr_guid(riid), surface); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_swapchain_SetFullscreenState(IDXGISwapChain *iface, + BOOL fullscreen, IDXGIOutput *target) +{ + FIXME("iface %p, fullscreen %u, target %p stub!\n", iface, fullscreen, target); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetFullscreenState(IDXGISwapChain *iface, + BOOL *fullscreen, IDXGIOutput **target) +{ + FIXME("iface %p, fullscreen %p, target %p stub!\n", iface, fullscreen, target); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetDesc(IDXGISwapChain *iface, DXGI_SWAP_CHAIN_DESC *desc) +{ + FIXME("iface %p, desc %p stub!\n", iface, desc); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_swapchain_ResizeBuffers(IDXGISwapChain *iface, + UINT buffer_count, UINT width, UINT height, DXGI_FORMAT format, UINT flags) +{ + FIXME("iface %p, buffer_count %u, width %u, height %u, format %s, flags %#x stub!\n", + iface, buffer_count, width, height, debug_dxgi_format(format), flags); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_swapchain_ResizeTarget(IDXGISwapChain *iface, + const DXGI_MODE_DESC *target_mode_desc) +{ + FIXME("iface %p, target_mode_desc %p stub!\n", iface, target_mode_desc); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetContainingOutput(IDXGISwapChain *iface, IDXGIOutput **output) +{ + FIXME("iface %p, output %p stub!\n", iface, output); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetFrameStatistics(IDXGISwapChain *iface, DXGI_FRAME_STATISTICS *stats) +{ + FIXME("iface %p, stats %p stub!\n", iface, stats); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetLastPresentCount(IDXGISwapChain *iface, UINT *last_present_count) +{ + FIXME("iface %p, last_present_count %p stub!\n", iface, last_present_count); + + return E_NOTIMPL; +} + +const struct IDXGISwapChainVtbl dxgi_swapchain_vtbl = +{ + /* IUnknown methods */ + dxgi_swapchain_QueryInterface, + dxgi_swapchain_AddRef, + dxgi_swapchain_Release, + /* IDXGIObject methods */ + dxgi_swapchain_SetPrivateData, + dxgi_swapchain_SetPrivateDataInterface, + dxgi_swapchain_GetPrivateData, + dxgi_swapchain_GetParent, + /* IDXGIDeviceSubObject methods */ + dxgi_swapchain_GetDevice, + /* IDXGISwapChain methods */ + dxgi_swapchain_Present, + dxgi_swapchain_GetBuffer, + dxgi_swapchain_SetFullscreenState, + dxgi_swapchain_GetFullscreenState, + dxgi_swapchain_GetDesc, + dxgi_swapchain_ResizeBuffers, + dxgi_swapchain_ResizeTarget, + dxgi_swapchain_GetContainingOutput, + dxgi_swapchain_GetFrameStatistics, + dxgi_swapchain_GetLastPresentCount, +};
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
122
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Results per page:
10
25
50
100
200