winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2013
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
645 discussions
Start a n
N
ew thread
Piotr Caban : msvcrt: Don't forward memmove to ntdll.
by Alexandre Julliard
17 Sep '13
17 Sep '13
Module: wine Branch: master Commit: 5b1f7f85494fb6ad4c2e781558864bd9018641eb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5b1f7f85494fb6ad4c2e78155…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Sep 17 14:45:11 2013 +0200 msvcrt: Don't forward memmove to ntdll. --- dlls/msvcrt/msvcrt.spec | 2 +- dlls/msvcrt/string.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 93c09ce..79124c5 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1373,7 +1373,7 @@ @ cdecl memcmp(ptr ptr long) MSVCRT_memcmp @ cdecl memcpy(ptr ptr long) MSVCRT_memcpy @ cdecl memcpy_s(ptr long ptr long) -@ cdecl memmove(ptr ptr long) ntdll.memmove +@ cdecl memmove(ptr ptr long) MSVCRT_memmove @ cdecl memmove_s(ptr long ptr long) @ cdecl memset(ptr long long) MSVCRT_memset @ cdecl mktime(ptr) MSVCRT_mktime diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index b6a51b6..645cc03 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -1610,6 +1610,14 @@ void * __cdecl MSVCRT_memcpy(void *dst, const void *src, MSVCRT_size_t n) } /********************************************************************* + * memmove (MSVCRT.@) + */ +void * __cdecl MSVCRT_memmove(void *dst, const void *src, MSVCRT_size_t n) +{ + return memmove(dst, src, n); +} + +/********************************************************************* * memset (MSVCRT.@) */ void* __cdecl MSVCRT_memset(void *dst, int c, MSVCRT_size_t n)
1
0
0
0
Piotr Caban : msvcrt: Don't forward memcmp to ntdll.
by Alexandre Julliard
17 Sep '13
17 Sep '13
Module: wine Branch: master Commit: 4fbf246298f8cef5cb40290084c8858a1b547fac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4fbf246298f8cef5cb4029008…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Sep 17 14:44:56 2013 +0200 msvcrt: Don't forward memcmp to ntdll. --- dlls/msvcrt/msvcrt.spec | 2 +- dlls/msvcrt/string.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 23d29a3..93c09ce 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1370,7 +1370,7 @@ @ cdecl mbstowcs_s(ptr ptr long str long) MSVCRT__mbstowcs_s @ cdecl mbtowc(ptr str long) MSVCRT_mbtowc @ cdecl memchr(ptr long long) MSVCRT_memchr -@ cdecl memcmp(ptr ptr long) ntdll.memcmp +@ cdecl memcmp(ptr ptr long) MSVCRT_memcmp @ cdecl memcpy(ptr ptr long) MSVCRT_memcpy @ cdecl memcpy_s(ptr long ptr long) @ cdecl memmove(ptr ptr long) ntdll.memmove diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index 082029d..b6a51b6 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -1594,11 +1594,19 @@ int CDECL MSVCRT_I10_OUTPUT(MSVCRT__LDOUBLE ld80, int prec, int flag, struct _I1 #undef I10_OUTPUT_MAX_PREC /********************************************************************* + * memcmp (MSVCRT.@) + */ +int __cdecl MSVCRT_memcmp(const void *ptr1, const void *ptr2, MSVCRT_size_t n) +{ + return memcmp(ptr1, ptr2, n); +} + +/********************************************************************* * memcpy (MSVCRT.@) */ -void * __cdecl MSVCRT_memcpy( void *dst, const void *src, size_t n ) +void * __cdecl MSVCRT_memcpy(void *dst, const void *src, MSVCRT_size_t n) { - return memmove( dst, src, n ); + return memmove(dst, src, n); } /*********************************************************************
1
0
0
0
Huw Davies : iphlpapi: Add a version of get_dns_servers for Android.
by Alexandre Julliard
17 Sep '13
17 Sep '13
Module: wine Branch: master Commit: 208eae73ae8fda6ffd34688a0f64c3456d2010ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=208eae73ae8fda6ffd34688a0…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Sep 17 13:09:16 2013 +0100 iphlpapi: Add a version of get_dns_servers for Android. --- configure | 2 + configure.ac | 2 + dlls/iphlpapi/iphlpapi_main.c | 49 +++++++++++++++++++++++++++++++++++++++++ include/config.h.in | 6 +++++ 4 files changed, 59 insertions(+), 0 deletions(-) diff --git a/configure b/configure index a01bee0..e6f6971 100755 --- a/configure +++ b/configure @@ -13370,6 +13370,8 @@ esac ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $BUILTINFLAG" for ac_func in \ + __res_get_state \ + __res_getservers \ _finite \ _isnan \ _pclose \ diff --git a/configure.ac b/configure.ac index b69c379..e03928c 100644 --- a/configure.ac +++ b/configure.ac @@ -1997,6 +1997,8 @@ dnl **** Check for functions **** ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $BUILTINFLAG" AC_CHECK_FUNCS(\ + __res_get_state \ + __res_getservers \ _finite \ _isnan \ _pclose \ diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index 6ce2c94..f84c700 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -978,7 +978,56 @@ static int get_dns_servers( SOCKADDR_STORAGE *servers, int num, BOOL ip4_only ) } return addr - servers; } +#elif defined(HAVE___RES_GET_STATE) && defined(HAVE___RES_GETSERVERS) + +static int get_dns_servers( SOCKADDR_STORAGE *servers, int num, BOOL ip4_only ) +{ + extern struct res_state *__res_get_state( void ); + extern int __res_getservers( struct res_state *, struct sockaddr_storage *, int ); + struct res_state *state = __res_get_state(); + int i, found = 0, total = __res_getservers( state, NULL, 0 ); + SOCKADDR_STORAGE *addr = servers; + struct sockaddr_storage *buf; + + if ((!servers || !num) && !ip4_only) return total; + + buf = HeapAlloc( GetProcessHeap(), 0, total * sizeof(struct sockaddr_storage) ); + total = __res_getservers( state, buf, total ); + + for (i = 0; i < total; i++) + { + if (buf[i].ss_family == AF_INET6 && ip4_only) continue; + if (buf[i].ss_family != AF_INET && buf[i].ss_family != AF_INET6) continue; + + found++; + if (!servers || !num) continue; + + if (buf[i].ss_family == AF_INET6) + { + SOCKADDR_IN6 *s = (SOCKADDR_IN6 *)addr; + struct sockaddr_in6 *ptr = (struct sockaddr_in6 *)(buf + i); + s->sin6_family = WS_AF_INET6; + s->sin6_port = ptr->sin6_port; + s->sin6_flowinfo = ptr->sin6_flowinfo; + memcpy( &s->sin6_addr, &ptr->sin6_addr, sizeof(IN6_ADDR) ); + s->sin6_scope_id = ptr->sin6_scope_id; + memset( (char *)s + sizeof(SOCKADDR_IN6), 0, + sizeof(SOCKADDR_STORAGE) - sizeof(SOCKADDR_IN6) ); + } + else + { + *(struct sockaddr_in *)addr = *(struct sockaddr_in *)(buf + i); + memset( (char *)addr + sizeof(struct sockaddr_in), 0, + sizeof(SOCKADDR_STORAGE) - sizeof(struct sockaddr_in) ); + } + if (++addr >= servers + num) break; + } + + HeapFree( GetProcessHeap(), 0, buf ); + return found; +} #else + static int get_dns_servers( SOCKADDR_STORAGE *servers, int num, BOOL ip4_only ) { FIXME("Unimplemented on this system\n"); diff --git a/include/config.h.in b/include/config.h.in index 505dd28..62bee90 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -1233,6 +1233,12 @@ /* Define to 1 if you have the `_vsnprintf' function. */ #undef HAVE__VSNPRINTF +/* Define to 1 if you have the `__res_getservers' function. */ +#undef HAVE___RES_GETSERVERS + +/* Define to 1 if you have the `__res_get_state' function. */ +#undef HAVE___RES_GET_STATE + /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT
1
0
0
0
Huw Davies : iphlpapi: Add a configure check for struct __res_state.
by Alexandre Julliard
17 Sep '13
17 Sep '13
Module: wine Branch: master Commit: c7dd313d750096687f8531c27e39c7de71f0092c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c7dd313d750096687f8531c27…
Author: Huw Davies <huw(a)codeweavers.com> Date: Tue Sep 17 13:09:15 2013 +0100 iphlpapi: Add a configure check for struct __res_state. --- configure | 14 ++++++++++++ configure.ac | 6 +++++ dlls/iphlpapi/iphlpapi_main.c | 47 +++++++++++++++++++++++++++-------------- include/config.h.in | 3 ++ 4 files changed, 54 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 28e275d..a01bee0 100755 --- a/configure +++ b/configure @@ -14792,6 +14792,20 @@ _ACEOF fi +ac_fn_c_check_type "$LINENO" "struct __res_state" "ac_cv_type_struct___res_state" "#ifdef HAVE_RESOLV_H +#include <resolv.h> +#endif +" +if test "x$ac_cv_type_struct___res_state" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT___RES_STATE 1 +_ACEOF + + +fi + + ac_fn_c_check_member "$LINENO" "struct __res_state" "_u._ext.nscount6" "ac_cv_member_struct___res_state__u__ext_nscount6" "#ifdef HAVE_RESOLV_H #include <resolv.h> #endif diff --git a/configure.ac b/configure.ac index f42fc15..b69c379 100644 --- a/configure.ac +++ b/configure.ac @@ -2344,6 +2344,12 @@ AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,, #include <netinet/in.h> #endif]) +dnl Check for struct __res_state +AC_CHECK_TYPES([struct __res_state],,, +[#ifdef HAVE_RESOLV_H +#include <resolv.h> +#endif]) + dnl Check for _u._ext.nscount6 AC_CHECK_MEMBERS([struct __res_state._u._ext.nscount6],,, [#ifdef HAVE_RESOLV_H diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index 789c339..6ce2c94 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -63,14 +63,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(iphlpapi); #define INADDR_NONE ~0UL #endif -/* call res_init() just once because of a bug in Mac OS X 10.4 */ -/* Call once per thread on systems that have per-thread _res. */ -static void initialise_resolver(void) -{ - if ((_res.options & RES_INIT) == 0) - res_init(); -} - /****************************************************************** * AddIPAddress (IPHLPAPI.@) * @@ -933,6 +925,15 @@ static ULONG adapterAddressesFromIndex(ULONG family, ULONG flags, IF_INDEX index return ERROR_SUCCESS; } +#ifdef HAVE_STRUCT___RES_STATE +/* call res_init() just once because of a bug in Mac OS X 10.4 */ +/* Call once per thread on systems that have per-thread _res. */ +static void initialise_resolver(void) +{ + if ((_res.options & RES_INIT) == 0) + res_init(); +} + static int get_dns_servers( SOCKADDR_STORAGE *servers, int num, BOOL ip4_only ) { int i, ip6_count = 0; @@ -977,6 +978,13 @@ static int get_dns_servers( SOCKADDR_STORAGE *servers, int num, BOOL ip4_only ) } return addr - servers; } +#else +static int get_dns_servers( SOCKADDR_STORAGE *servers, int num, BOOL ip4_only ) +{ + FIXME("Unimplemented on this system\n"); + return 0; +} +#endif static ULONG get_dns_server_addresses(PIP_ADAPTER_DNS_SERVER_ADDRESS address, ULONG *len) { @@ -1015,6 +1023,7 @@ static ULONG get_dns_server_addresses(PIP_ADAPTER_DNS_SERVER_ADDRESS address, UL return ERROR_SUCCESS; } +#ifdef HAVE_STRUCT___RES_STATE static BOOL is_ip_address_string(const char *str) { struct in_addr in; @@ -1023,22 +1032,28 @@ static BOOL is_ip_address_string(const char *str) ret = inet_aton(str, &in); return ret != 0; } +#endif static ULONG get_dns_suffix(WCHAR *suffix, ULONG *len) { - ULONG size, i; + ULONG size; const char *found_suffix = ""; /* Always return a NULL-terminated string, even if it's empty. */ - initialise_resolver(); - for (i = 0; !*found_suffix && i < MAXDNSRCH + 1 && _res.dnsrch[i]; i++) +#ifdef HAVE_STRUCT___RES_STATE { - /* This uses a heuristic to select a DNS suffix: - * the first, non-IP address string is selected. - */ - if (!is_ip_address_string(_res.dnsrch[i])) - found_suffix = _res.dnsrch[i]; + ULONG i; + initialise_resolver(); + for (i = 0; !*found_suffix && i < MAXDNSRCH + 1 && _res.dnsrch[i]; i++) + { + /* This uses a heuristic to select a DNS suffix: + * the first, non-IP address string is selected. + */ + if (!is_ip_address_string(_res.dnsrch[i])) + found_suffix = _res.dnsrch[i]; + } } +#endif size = MultiByteToWideChar( CP_UNIXCP, 0, found_suffix, -1, NULL, 0 ) * sizeof(WCHAR); if (!suffix || *len < size) diff --git a/include/config.h.in b/include/config.h.in index 2ab1081..505dd28 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -912,6 +912,9 @@ /* Define to 1 if the system has the type `struct xinpgen'. */ #undef HAVE_STRUCT_XINPGEN +/* Define to 1 if the system has the type `struct __res_state'. */ +#undef HAVE_STRUCT___RES_STATE + /* Define to 1 if `_u._ext.nscount6' is a member of `struct __res_state'. */ #undef HAVE_STRUCT___RES_STATE__U__EXT_NSCOUNT6
1
0
0
0
Jacek Caban : d3dcommon.idl: Added WKPDID_D3DDebugObjectName declaration.
by Alexandre Julliard
17 Sep '13
17 Sep '13
Module: wine Branch: master Commit: 4f1c0e93558f20ce7c9e18ff1831582c4b1299f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f1c0e93558f20ce7c9e18ff1…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Sep 17 13:22:26 2013 +0200 d3dcommon.idl: Added WKPDID_D3DDebugObjectName declaration. --- include/d3dcommon.idl | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/d3dcommon.idl b/include/d3dcommon.idl index bc1f372..3230e80 100644 --- a/include/d3dcommon.idl +++ b/include/d3dcommon.idl @@ -635,3 +635,5 @@ typedef enum _D3D_SHADER_INPUT_TYPE D3D11_SIT_UAV_CONSUME_STRUCTURED, D3D11_SIT_UAV_RWSTRUCTURED_WITH_COUNTER, } D3D_SHADER_INPUT_TYPE; + +cpp_quote("DEFINE_GUID(WKPDID_D3DDebugObjectName,0x429b8c22,0x9188,0x4b0c,0x87,0x42,0xac,0xb0,0xbf,0x85,0xc2,0x00);")
1
0
0
0
Jacek Caban : dxgi.idl: Added DXGI_PRESENT_* defines.
by Alexandre Julliard
17 Sep '13
17 Sep '13
Module: wine Branch: master Commit: 268e2dc9002318996e11359a81d2119beaea49b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=268e2dc9002318996e11359a8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Sep 17 12:05:48 2013 +0200 dxgi.idl: Added DXGI_PRESENT_* defines. --- include/dxgi.idl | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/include/dxgi.idl b/include/dxgi.idl index d87a72c..a4326a7 100644 --- a/include/dxgi.idl +++ b/include/dxgi.idl @@ -289,6 +289,16 @@ interface IDXGIAdapter : IDXGIObject ); } +cpp_quote("#define DXGI_MAX_SWAP_CHAIN_BUFFERS (16)") + +cpp_quote("#define DXGI_PRESENT_TEST __MSABI_LONG(0x00000001U)") +cpp_quote("#define DXGI_PRESENT_DO_NOT_SEQUENCE __MSABI_LONG(0x00000002U)") +cpp_quote("#define DXGI_PRESENT_RESTART __MSABI_LONG(0x00000004U)") +cpp_quote("#define DXGI_PRESENT_DO_NOT_WAIT __MSABI_LONG(0x00000008U)") +cpp_quote("#define DXGI_PRESENT_STEREO_PREFER_RIGHT __MSABI_LONG(0x00000010U)") +cpp_quote("#define DXGI_PRESENT_STEREO_TEMPORARY_MONO __MSABI_LONG(0x00000020U)") +cpp_quote("#define DXGI_PRESENT_RESTRICT_TO_OUTPUT __MSABI_LONG(0x00000040U)") + [ object, local,
1
0
0
0
Stefan Dösinger : d3dx9_36/tests: Create*TextureFromFileInMemory doesn't fail.
by Alexandre Julliard
17 Sep '13
17 Sep '13
Module: wine Branch: master Commit: 7aa17eaa5c4bd4eaad71f03ba6a0e4cedffe8eb4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7aa17eaa5c4bd4eaad71f03ba…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Tue Sep 17 11:39:43 2013 +0200 d3dx9_36/tests: Create*TextureFromFileInMemory doesn't fail. If the format is unsupported it picks a replacement format. Our d3dx9 cannot handle d3dx9 decompression yet, so mark the tests todo_wine in this case. --- dlls/d3dx9_36/tests/texture.c | 32 +++++++++++++------------------- 1 files changed, 13 insertions(+), 19 deletions(-) diff --git a/dlls/d3dx9_36/tests/texture.c b/dlls/d3dx9_36/tests/texture.c index fd072c8..c168052 100644 --- a/dlls/d3dx9_36/tests/texture.c +++ b/dlls/d3dx9_36/tests/texture.c @@ -25,7 +25,7 @@ #include "d3dx9tex.h" #include "resources.h" -static int has_dxt5; +static int has_2d_dxt5, has_cube_dxt5; /* 2x2 16-bit dds, no mipmaps */ static const unsigned char dds_16bit[] = { @@ -1436,12 +1436,10 @@ static void test_D3DXCreateTextureFromFileInMemory(IDirect3DDevice9 *device) /* Check that D3DXCreateTextureFromFileInMemory accepts cube texture dds file (only first face texture is loaded) */ hr = D3DXCreateTextureFromFileInMemory(device, dds_cube_map, sizeof(dds_cube_map), &texture); - if (!has_dxt5 && hr == E_NOTIMPL) - { - skip("DXT5 is not supported, skipping the D3DXCreateTextureFromFileInMemory() tests\n"); - return; - } - ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + if (has_2d_dxt5) + ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemory returned %#x, expected %#x.\n", hr, D3D_OK); + else + todo_wine ok(hr == D3D_OK, "D3DXCreateTextureFromFileInMemory returned %#x, expected %#x.\n", hr, D3D_OK); if (SUCCEEDED(hr)) { type = IDirect3DTexture9_GetType(texture); @@ -1539,12 +1537,10 @@ static void test_D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *devic hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, dds_cube_map, sizeof(dds_cube_map), D3DX_DEFAULT, D3DX_DEFAULT, D3DUSAGE_DYNAMIC | D3DUSAGE_AUTOGENMIPMAP, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &cube_texture); - if (!has_dxt5 && hr == E_NOTIMPL) - { - skip("DXT5 is not supported, skipping the D3DXCreateCubeTextureFromFileInMemoryEx() tests\n"); - return; - } - ok(hr == D3D_OK, "D3DXCreateCubeTextureFromFileInMemoryEx returned %#x, expected %#x\n", hr, D3D_OK); + if (has_cube_dxt5) + ok(hr == D3D_OK, "D3DXCreateCubeTextureFromFileInMemoryEx returned %#x, expected %#x.\n", hr, D3D_OK); + else + todo_wine ok(hr == D3D_OK, "D3DXCreateCubeTextureFromFileInMemoryEx returned %#x, expected %#x.\n", hr, D3D_OK); if (SUCCEEDED(hr)) IDirect3DCubeTexture9_Release(cube_texture); } @@ -1569,11 +1565,6 @@ static void test_D3DXCreateVolumeTextureFromFileInMemory(IDirect3DDevice9 *devic ok(hr == D3DERR_INVALIDCALL, "D3DXCreateVolumeTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); hr = D3DXCreateVolumeTextureFromFileInMemory(device, dds_volume_map, sizeof(dds_volume_map), &volume_texture); - if (!has_dxt5 && hr == E_NOTIMPL) - { - skip("DXT5 is not supported, skipping the D3DXCreateVolumeTextureFromFileInMemory() tests\n"); - return; - } ok(hr == D3D_OK, "D3DXCreateVolumeTextureFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); if (SUCCEEDED(hr)) { @@ -1821,7 +1812,10 @@ START_TEST(texture) /* Check whether DXT5 textures are supported */ hr = IDirect3D9_CheckDeviceFormat(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, 0, D3DRTYPE_TEXTURE, D3DFMT_DXT5); - has_dxt5 = SUCCEEDED(hr); + has_2d_dxt5 = SUCCEEDED(hr); + hr = IDirect3D9_CheckDeviceFormat(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, 0, D3DRTYPE_CUBETEXTURE, D3DFMT_DXT5); + has_cube_dxt5 = SUCCEEDED(hr); test_D3DXCheckTextureRequirements(device); test_D3DXCheckCubeTextureRequirements(device);
1
0
0
0
André Hentschel : msvcrt/tests: Load the correct function on ARM.
by Alexandre Julliard
17 Sep '13
17 Sep '13
Module: wine Branch: master Commit: 0e867236dc1208aa083e6aec6b5df9877fcd434f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0e867236dc1208aa083e6aec6…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Mon Sep 16 20:51:52 2013 +0200 msvcrt/tests: Load the correct function on ARM. --- dlls/msvcrt/tests/cpp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/msvcrt/tests/cpp.c b/dlls/msvcrt/tests/cpp.c index fa6d4dd..92301ff 100644 --- a/dlls/msvcrt/tests/cpp.c +++ b/dlls/msvcrt/tests/cpp.c @@ -283,7 +283,7 @@ static BOOL InitFunctionPtrs(void) SET(ptype_info_dtor, "??1type_info@@UAA@XZ"); SET(ptype_info_raw_name, "?raw_name@type_info@@QBAPBDXZ"); SET(ptype_info_name, "?name@type_info@@QBEPBDXZ"); - SET(ptype_info_before, "?before@type_info@@QBEHABV1@@Z"); + SET(ptype_info_before, "?before@type_info@@QBA_NABV1@@Z"); SET(ptype_info_opequals_equals, "??8type_info@@QBA_NABV0@@Z"); SET(ptype_info_opnot_equals, "??9type_info@@QBA_NABV0@@Z"); #else
1
0
0
0
Hans Leidekker : wsnmp32: Add stub implementations for a couple of functions.
by Alexandre Julliard
17 Sep '13
17 Sep '13
Module: wine Branch: master Commit: d36e7c080c5631eca2e176f23d4cc0e3f3664993 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d36e7c080c5631eca2e176f23…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Sep 17 11:03:32 2013 +0200 wsnmp32: Add stub implementations for a couple of functions. --- configure | 3 +- configure.ac | 3 +- dlls/wsnmp32/Makefile.in | 3 +- dlls/wsnmp32/tests/Makefile.in | 7 +++++ dlls/wsnmp32/tests/wsnmp.c | 51 +++++++++++++++++++++++++++++++++++++ dlls/wsnmp32/wsnmp32.c | 32 +++++++++++++++++++++++ dlls/wsnmp32/wsnmp32.spec | 8 +++--- include/Makefile.in | 1 + include/winsnmp.h | 55 ++++++++++++++++++++++++++++++++++++++++ 9 files changed, 156 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 8ee4819..28e275d 100755 --- a/configure +++ b/configure @@ -16493,7 +16493,8 @@ wine_fn_config_dll ws2_32 enable_ws2_32 implib wine_fn_config_test dlls/ws2_32/tests ws2_32_test wine_fn_config_dll wshom.ocx enable_wshom_ocx wine_fn_config_test dlls/wshom.ocx/tests wshom.ocx_test -wine_fn_config_dll wsnmp32 enable_wsnmp32 +wine_fn_config_dll wsnmp32 enable_wsnmp32 implib +wine_fn_config_test dlls/wsnmp32/tests wsnmp32_test wine_fn_config_dll wsock32 enable_wsock32 implib wine_fn_config_dll wtsapi32 enable_wtsapi32 implib wine_fn_config_dll wuapi enable_wuapi diff --git a/configure.ac b/configure.ac index 96af299..f42fc15 100644 --- a/configure.ac +++ b/configure.ac @@ -3167,7 +3167,8 @@ WINE_CONFIG_DLL(ws2_32,,[implib]) WINE_CONFIG_TEST(dlls/ws2_32/tests) WINE_CONFIG_DLL(wshom.ocx) WINE_CONFIG_TEST(dlls/wshom.ocx/tests) -WINE_CONFIG_DLL(wsnmp32) +WINE_CONFIG_DLL(wsnmp32,,[implib]) +WINE_CONFIG_TEST(dlls/wsnmp32/tests) WINE_CONFIG_DLL(wsock32,,[implib]) WINE_CONFIG_DLL(wtsapi32,,[implib]) WINE_CONFIG_DLL(wuapi) diff --git a/dlls/wsnmp32/Makefile.in b/dlls/wsnmp32/Makefile.in index 0fe0da2..32e63b8 100644 --- a/dlls/wsnmp32/Makefile.in +++ b/dlls/wsnmp32/Makefile.in @@ -1,4 +1,5 @@ -MODULE = wsnmp32.dll +MODULE = wsnmp32.dll +IMPORTLIB = wsnmp32 C_SRCS = wsnmp32.c diff --git a/dlls/wsnmp32/tests/Makefile.in b/dlls/wsnmp32/tests/Makefile.in new file mode 100644 index 0000000..9d733c7 --- /dev/null +++ b/dlls/wsnmp32/tests/Makefile.in @@ -0,0 +1,7 @@ +TESTDLL = wsnmp32.dll +IMPORTS = wsnmp32 + +C_SRCS = \ + wsnmp.c + +@MAKE_TEST_RULES@ diff --git a/dlls/wsnmp32/tests/wsnmp.c b/dlls/wsnmp32/tests/wsnmp.c new file mode 100644 index 0000000..6c1cf60 --- /dev/null +++ b/dlls/wsnmp32/tests/wsnmp.c @@ -0,0 +1,51 @@ +/* + * Copyright 2013 Hans Leidekker 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 <stdarg.h> +#include <stdlib.h> +#include <windef.h> +#include <winbase.h> +#include <winsnmp.h> + +#include "wine/test.h" + +static void test_SnmpStartup(void) +{ + SNMPAPI_STATUS status; + smiUINT32 major, minor, level, translate_mode, retransmit_mode; + + status = SnmpStartup( NULL, NULL, NULL, NULL, NULL ); + ok( status == SNMPAPI_SUCCESS, "got %u\n", status ); + + status = SnmpCleanup(); + ok( status == SNMPAPI_SUCCESS, "got %u\n", status ); + + major = minor = level = translate_mode = retransmit_mode = 0xdeadbeef; + status = SnmpStartup( &major, &minor, &level, &translate_mode, &retransmit_mode ); + ok( status == SNMPAPI_SUCCESS, "got %u\n", status ); + trace( "major %u minor %u level %u translate_mode %u retransmit_mode %u\n", + major, minor, level, translate_mode, retransmit_mode ); + + status = SnmpCleanup(); + ok( status == SNMPAPI_SUCCESS, "got %u\n", status ); +} + +START_TEST (wsnmp) +{ + test_SnmpStartup(); +} diff --git a/dlls/wsnmp32/wsnmp32.c b/dlls/wsnmp32/wsnmp32.c index 838c9bb..721842f 100644 --- a/dlls/wsnmp32/wsnmp32.c +++ b/dlls/wsnmp32/wsnmp32.c @@ -19,6 +19,7 @@ #include <stdarg.h> #include "windef.h" #include "winbase.h" +#include "winsnmp.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(wsnmp32); @@ -37,3 +38,34 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) } return TRUE; } + +SNMPAPI_STATUS WINAPI SnmpCleanup( void ) +{ + FIXME( "\n" ); + return SNMPAPI_SUCCESS; +} + +SNMPAPI_STATUS WINAPI SnmpSetRetransmitMode( smiUINT32 retransmit_mode ) +{ + FIXME( "%u\n", retransmit_mode ); + return SNMPAPI_SUCCESS; +} + +SNMPAPI_STATUS WINAPI SnmpSetTranslateMode( smiUINT32 translate_mode ) +{ + FIXME( "%u\n", translate_mode ); + return SNMPAPI_SUCCESS; +} + +SNMPAPI_STATUS WINAPI SnmpStartup( smiLPUINT32 major, smiLPUINT32 minor, smiLPUINT32 level, + smiLPUINT32 translate_mode, smiLPUINT32 retransmit_mode ) +{ + FIXME( "%p, %p, %p, %p, %p\n", major, minor, level, translate_mode, retransmit_mode ); + + if (major) *major = 2; + if (minor) *minor = 0; + if (level) *level = SNMPAPI_V2_SUPPORT; + if (translate_mode) *translate_mode = SNMPAPI_UNTRANSLATED_V1; + if (retransmit_mode) *retransmit_mode = SNMPAPI_ON; + return SNMPAPI_SUCCESS; +} diff --git a/dlls/wsnmp32/wsnmp32.spec b/dlls/wsnmp32/wsnmp32.spec index fedf760..197092a 100644 --- a/dlls/wsnmp32/wsnmp32.spec +++ b/dlls/wsnmp32/wsnmp32.spec @@ -1,7 +1,7 @@ 100 stub SnmpGetTranslateMode -101 stub SnmpSetTranslateMode +101 stdcall SnmpSetTranslateMode(long) 102 stub SnmpGetRetransmitMode -103 stub SnmpSetRetransmitMode +103 stdcall SnmpSetRetransmitMode(long) 104 stub SnmpGetTimeout 105 stub SnmpSetTimeout 106 stub SnmpSetRetry @@ -9,8 +9,8 @@ 108 stub _SnmpConveyAgentAddress@4 109 stub _SnmpSetAgentAddress@4 120 stub SnmpGetVendorInfo -200 stub SnmpStartup -201 stub SnmpCleanup +200 stdcall SnmpStartup(ptr ptr ptr ptr ptr) +201 stdcall SnmpCleanup() 202 stub SnmpOpen 203 stub SnmpClose 204 stub SnmpSendMsg diff --git a/include/Makefile.in b/include/Makefile.in index d40284e..c109c06 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -589,6 +589,7 @@ SRCDIR_INCLUDES = \ winsafer.h \ winscard.h \ winsmcrd.h \ + winsnmp.h \ winsock.h \ winsock2.h \ winspool.h \ diff --git a/include/winsnmp.h b/include/winsnmp.h new file mode 100644 index 0000000..64765de --- /dev/null +++ b/include/winsnmp.h @@ -0,0 +1,55 @@ +/* + * Copyright 2013 Hans Leidekker 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 + */ + +#ifndef __WINE_WINSNMP_H +#define __WINE_WINSNMP_H + +#ifdef __cplusplus +extern "C" { +#endif + +typedef int smiINT, *smiLPINT; +typedef smiINT smiINT32, *smiLPINT32; +typedef unsigned int smiUINT32, *smiLPUINT32; +typedef smiUINT32 SNMPAPI_STATUS; + +#define SNMPAPI_NO_SUPPORT 0 +#define SNMPAPI_V1_SUPPORT 1 +#define SNMPAPI_V2_SUPPORT 2 +#define SNMPAPI_M2M_SUPPORT 3 + +#define SNMPAPI_TRANSLATED 0 +#define SNMPAPI_UNTRANSLATED_V1 1 +#define SNMPAPI_UNTRANSLATED_V2 2 + +#define SNMPAPI_OFF 0 +#define SNMPAPI_ON 1 + +#define SNMPAPI_FAILURE 0 +#define SNMPAPI_SUCCESS 1 + +SNMPAPI_STATUS WINAPI SnmpCleanup(void); +SNMPAPI_STATUS WINAPI SnmpSetRetransmitMode(smiUINT32); +SNMPAPI_STATUS WINAPI SnmpSetTranslateMode(smiUINT32); +SNMPAPI_STATUS WINAPI SnmpStartup(smiLPUINT32,smiLPUINT32,smiLPUINT32,smiLPUINT32,smiLPUINT32); + +#ifdef __cplusplus +} +#endif + +#endif /* __WINE_WINSNMP_H */
1
0
0
0
André Hentschel : kernel32/tests: Add initial CreateFile2 tests based on the CreateFileW tests.
by Alexandre Julliard
17 Sep '13
17 Sep '13
Module: wine Branch: master Commit: 22cd7a10cfe80c83717b6c976edc8409315da782 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=22cd7a10cfe80c83717b6c976…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Mon Sep 16 20:26:01 2013 +0200 kernel32/tests: Add initial CreateFile2 tests based on the CreateFileW tests. --- dlls/kernel32/tests/file.c | 85 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 85 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index d7a8776..288fc5e 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -33,6 +33,7 @@ #include "winbase.h" #include "winerror.h" #include "winnls.h" +#include "fileapi.h" static HANDLE (WINAPI *pFindFirstFileExA)(LPCSTR,FINDEX_INFO_LEVELS,LPVOID,FINDEX_SEARCH_OPS,LPVOID,DWORD); static BOOL (WINAPI *pReplaceFileA)(LPCSTR, LPCSTR, LPCSTR, DWORD, LPVOID, LPVOID); @@ -44,6 +45,7 @@ static BOOL (WINAPI *pGetFileInformationByHandleEx)(HANDLE, FILE_INFO_BY_HANDLE_ static HANDLE (WINAPI *pOpenFileById)(HANDLE, LPFILE_ID_DESCRIPTOR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD); static BOOL (WINAPI *pSetFileValidData)(HANDLE, LONGLONG); static HRESULT (WINAPI *pCopyFile2)(PCWSTR,PCWSTR,COPYFILE2_EXTENDED_PARAMETERS*); +static HANDLE (WINAPI *pCreateFile2)(LPCWSTR, DWORD, DWORD, DWORD, CREATEFILE2_EXTENDED_PARAMETERS*); /* keep filename and filenameW the same */ static const char filename[] = "testfile.xxx"; @@ -82,6 +84,7 @@ static void InitFunctionPointers(void) pOpenFileById = (void *) GetProcAddress(hkernel32, "OpenFileById"); pSetFileValidData = (void *) GetProcAddress(hkernel32, "SetFileValidData"); pCopyFile2 = (void *) GetProcAddress(hkernel32, "CopyFile2"); + pCreateFile2 = (void *) GetProcAddress(hkernel32, "CreateFile2"); } static void test__hread( void ) @@ -1488,6 +1491,87 @@ static void test_CreateFileW(void) ok(ret, "DeleteFileW: error %d\n", GetLastError()); } +static void test_CreateFile2(void) +{ + HANDLE hFile; + WCHAR temp_path[MAX_PATH]; + WCHAR filename[MAX_PATH]; + CREATEFILE2_EXTENDED_PARAMETERS exparams; + static const WCHAR emptyW[]={'\0'}; + static const WCHAR prefix[] = {'p','f','x',0}; + static const WCHAR bogus[] = { '\\', '\\', '.', '\\', 'B', 'O', 'G', 'U', 'S', 0 }; + DWORD ret; + + if (!pCreateFile2) + { + win_skip("CreateFile2 is missing\n"); + return; + } + + ret = GetTempPathW(MAX_PATH, temp_path); + ok(ret != 0, "GetTempPathW error %d\n", GetLastError()); + ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n"); + + ret = GetTempFileNameW(temp_path, prefix, 0, filename); + ok(ret != 0, "GetTempFileNameW error %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + exparams.dwSize = sizeof(exparams); + exparams.dwFileAttributes = FILE_FLAG_RANDOM_ACCESS; + exparams.dwFileFlags = 0; + exparams.dwSecurityQosFlags = 0; + exparams.lpSecurityAttributes = NULL; + exparams.hTemplateFile = 0; + hFile = pCreateFile2(filename, GENERIC_READ, 0, CREATE_NEW, &exparams); + ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_FILE_EXISTS, + "CREATE_NEW should fail if file exists and last error value should be ERROR_FILE_EXISTS\n"); + + SetLastError(0xdeadbeef); + hFile = pCreateFile2(filename, GENERIC_READ, FILE_SHARE_READ, CREATE_ALWAYS, &exparams); + ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == ERROR_ALREADY_EXISTS, + "hFile %p, last error %u\n", hFile, GetLastError()); + CloseHandle(hFile); + + SetLastError(0xdeadbeef); + hFile = pCreateFile2(filename, GENERIC_READ, FILE_SHARE_READ, OPEN_ALWAYS, &exparams); + ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == ERROR_ALREADY_EXISTS, + "hFile %p, last error %u\n", hFile, GetLastError()); + CloseHandle(hFile); + + ret = DeleteFileW(filename); + ok(ret, "DeleteFileW: error %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + hFile = pCreateFile2(filename, GENERIC_READ, FILE_SHARE_READ, OPEN_ALWAYS, &exparams); + ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == 0, + "hFile %p, last error %u\n", hFile, GetLastError()); + CloseHandle(hFile); + + ret = DeleteFileW(filename); + ok(ret, "DeleteFileW: error %d\n", GetLastError()); + + hFile = pCreateFile2(emptyW, GENERIC_READ, 0, CREATE_NEW, &exparams); + ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND, + "CreateFile2(\"\") returned ret=%p error=%d\n",hFile,GetLastError()); + + /* test the result of opening a nonexistent driver name */ + exparams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; + hFile = pCreateFile2(bogus, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING, &exparams); + ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_FILE_NOT_FOUND, + "CreateFile2 on invalid VxD name returned ret=%p error=%d\n",hFile,GetLastError()); + + ret = CreateDirectoryW(filename, NULL); + ok(ret == TRUE, "couldn't create temporary directory\n"); + exparams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS; + hFile = pCreateFile2(filename, GENERIC_READ | GENERIC_WRITE, 0, OPEN_ALWAYS, &exparams); + todo_wine + ok(hFile == INVALID_HANDLE_VALUE, + "expected CreateFile2 to fail on existing directory, error: %d\n", GetLastError()); + CloseHandle(hFile); + ret = RemoveDirectoryW(filename); + ok(ret, "DeleteFileW: error %d\n", GetLastError()); +} + static void test_GetTempFileNameA(void) { UINT result; @@ -3906,6 +3990,7 @@ START_TEST(file) test_CreateFile(); test_CreateFileA(); test_CreateFileW(); + test_CreateFile2(); test_DeleteFileA(); test_DeleteFileW(); test_MoveFileA();
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
65
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
Results per page:
10
25
50
100
200