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
March 2009
----- 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
834 discussions
Start a n
N
ew thread
Alexandre Julliard : iphlpapi/tests: Output the various tables in verbose mode.
by Alexandre Julliard
11 Mar '09
11 Mar '09
Module: wine Branch: master Commit: a8c5bd9f420c0467ea9ba2148f1853d9fc1f7e51 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a8c5bd9f420c0467ea9ba2148…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 10 17:50:50 2009 +0100 iphlpapi/tests: Output the various tables in verbose mode. --- dlls/iphlpapi/tests/iphlpapi.c | 164 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 163 insertions(+), 1 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a8c5bd9f420c0467ea9ba…
1
0
0
0
Alexandre Julliard : iphlpapi: Implemented AllocateAndGetIpForwardTableFromStack for Solaris.
by Alexandre Julliard
11 Mar '09
11 Mar '09
Module: wine Branch: master Commit: 4f67d8233dbc15c36a76d0668203713e0a1602c1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f67d8233dbc15c36a76d0668…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 10 17:11:44 2009 +0100 iphlpapi: Implemented AllocateAndGetIpForwardTableFromStack for Solaris. --- dlls/iphlpapi/ipstats.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c index 9a157cd..69f3376 100644 --- a/dlls/iphlpapi/ipstats.c +++ b/dlls/iphlpapi/ipstats.c @@ -1054,6 +1054,44 @@ DWORD WINAPI AllocateAndGetIpForwardTableFromStack(PMIB_IPFORWARDTABLE *ppIpForw } else ret = ERROR_NOT_SUPPORTED; } +#elif defined(HAVE_SYS_TIHDR_H) && defined(T_OPTMGMT_ACK) + { + void *data; + int fd, len, namelen; + mib2_ipRouteEntry_t *entry; + char name[64]; + + if ((fd = open_streams_mib( NULL )) != -1) + { + if ((data = read_mib_entry( fd, MIB2_IP, MIB2_IP_ROUTE, &len ))) + { + for (entry = data; (char *)(entry + 1) <= (char *)data + len; entry++) + { + row.dwForwardDest = entry->ipRouteDest; + row.dwForwardMask = entry->ipRouteMask; + row.dwForwardPolicy = 0; + row.dwForwardNextHop = entry->ipRouteNextHop; + row.dwForwardType = entry->ipRouteType; + row.dwForwardProto = entry->ipRouteProto; + row.dwForwardAge = entry->ipRouteAge; + row.dwForwardNextHopAS = 0; + row.dwForwardMetric1 = entry->ipRouteMetric1; + row.dwForwardMetric2 = entry->ipRouteMetric2; + row.dwForwardMetric3 = entry->ipRouteMetric3; + row.dwForwardMetric4 = entry->ipRouteMetric4; + row.dwForwardMetric5 = entry->ipRouteMetric5; + namelen = min( sizeof(name) - 1, entry->ipRouteIfIndex.o_length ); + memcpy( name, entry->ipRouteIfIndex.o_bytes, namelen ); + name[namelen] = 0; + getInterfaceIndexByName( name, &row.dwForwardIfIndex ); + if (!(table = append_ipforward_row( heap, flags, table, &count, &row ))) break; + } + HeapFree( GetProcessHeap(), 0, data ); + } + close( fd ); + } + else ret = ERROR_NOT_SUPPORTED; + } #elif defined(HAVE_SYS_SYSCTL_H) && defined(NET_RT_DUMP) { int mib[6] = {CTL_NET, PF_ROUTE, 0, PF_INET, NET_RT_DUMP, 0};
1
0
0
0
Alexandre Julliard : iphlpapi: Implemented AllocateAndGetIpNetTableFromStack for Solaris.
by Alexandre Julliard
11 Mar '09
11 Mar '09
Module: wine Branch: master Commit: e5ec9aeb79b68da38fcb240bf25fb0b9eb4fbb15 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e5ec9aeb79b68da38fcb240bf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 10 17:10:08 2009 +0100 iphlpapi: Implemented AllocateAndGetIpNetTableFromStack for Solaris. --- dlls/iphlpapi/ipstats.c | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c index 846a41b..9a157cd 100644 --- a/dlls/iphlpapi/ipstats.c +++ b/dlls/iphlpapi/ipstats.c @@ -1280,6 +1280,35 @@ DWORD WINAPI AllocateAndGetIpNetTableFromStack(PMIB_IPNETTABLE *ppIpNetTable, BO } else ret = ERROR_NOT_SUPPORTED; } +#elif defined(HAVE_SYS_TIHDR_H) && defined(T_OPTMGMT_ACK) + { + void *data; + int fd, len, namelen; + mib2_ipNetToMediaEntry_t *entry; + char name[64]; + + if ((fd = open_streams_mib( NULL )) != -1) + { + if ((data = read_mib_entry( fd, MIB2_IP, MIB2_IP_MEDIA, &len ))) + { + for (entry = data; (char *)(entry + 1) <= (char *)data + len; entry++) + { + row.dwPhysAddrLen = min( entry->ipNetToMediaPhysAddress.o_length, MAXLEN_PHYSADDR ); + memcpy( row.bPhysAddr, entry->ipNetToMediaPhysAddress.o_bytes, row.dwPhysAddrLen ); + row.dwAddr = entry->ipNetToMediaNetAddress; + row.dwType = entry->ipNetToMediaType; + namelen = min( sizeof(name) - 1, entry->ipNetToMediaIfIndex.o_length ); + memcpy( name, entry->ipNetToMediaIfIndex.o_bytes, namelen ); + name[namelen] = 0; + getInterfaceIndexByName( name, &row.dwIndex ); + if (!(table = append_ipnet_row( heap, flags, table, &count, &row ))) break; + } + HeapFree( GetProcessHeap(), 0, data ); + } + close( fd ); + } + else ret = ERROR_NOT_SUPPORTED; + } #elif defined(HAVE_SYS_SYSCTL_H) && defined(NET_RT_DUMP) { int mib[] = {CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_FLAGS, RTF_LLINFO};
1
0
0
0
Alexandre Julliard : iphlpapi: Implemented AllocateAndGetUdpTableFromStack for Solaris.
by Alexandre Julliard
11 Mar '09
11 Mar '09
Module: wine Branch: master Commit: 8f481bef2e1b6639c2f4e2ffb0ec1ea2c5a3573c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8f481bef2e1b6639c2f4e2ffb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 10 17:08:28 2009 +0100 iphlpapi: Implemented AllocateAndGetUdpTableFromStack for Solaris. --- dlls/iphlpapi/ipstats.c | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c index c92f0e4..846a41b 100644 --- a/dlls/iphlpapi/ipstats.c +++ b/dlls/iphlpapi/ipstats.c @@ -1442,6 +1442,28 @@ DWORD WINAPI AllocateAndGetUdpTableFromStack(PMIB_UDPTABLE *ppUdpTable, BOOL bOr } else ret = ERROR_NOT_SUPPORTED; } +#elif defined(HAVE_SYS_TIHDR_H) && defined(T_OPTMGMT_ACK) + { + void *data; + int fd, len; + mib2_udpEntry_t *entry; + + if ((fd = open_streams_mib( "udp" )) != -1) + { + if ((data = read_mib_entry( fd, MIB2_UDP, MIB2_UDP_ENTRY, &len ))) + { + for (entry = data; (char *)(entry + 1) <= (char *)data + len; entry++) + { + row.dwLocalAddr = entry->udpLocalAddress; + row.dwLocalPort = htons( entry->udpLocalPort ); + if (!(table = append_udp_row( heap, flags, table, &count, &row ))) break; + } + HeapFree( GetProcessHeap(), 0, data ); + } + close( fd ); + } + else ret = ERROR_NOT_SUPPORTED; + } #else FIXME( "not implemented\n" ); ret = ERROR_NOT_SUPPORTED;
1
0
0
0
Alexandre Julliard : iphlpapi: Implemented AllocateAndGetTcpTableFromStack for Solaris.
by Alexandre Julliard
11 Mar '09
11 Mar '09
Module: wine Branch: master Commit: 801d9c3a847387d4797b9122ab493eda5d8f658b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=801d9c3a847387d4797b9122a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 10 17:05:58 2009 +0100 iphlpapi: Implemented AllocateAndGetTcpTableFromStack for Solaris. --- configure | 6 +++ configure.ac | 3 + dlls/iphlpapi/ipstats.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++- include/config.h.in | 9 ++++ 4 files changed, 129 insertions(+), 1 deletions(-) diff --git a/configure b/configure index 2d77fe1..e32cb69 100755 --- a/configure +++ b/configure @@ -6076,6 +6076,9 @@ done + + + for ac_header in \ AudioUnit/AudioUnit.h \ Carbon/Carbon.h \ @@ -6098,6 +6101,7 @@ for ac_header in \ getopt.h \ grp.h \ ieeefp.h \ + inet/mib2.h \ io.h \ jack/jack.h \ jpeglib.h \ @@ -6146,6 +6150,7 @@ for ac_header in \ soundcard.h \ stdint.h \ strings.h \ + stropts.h \ sys/asoundlib.h \ sys/cdio.h \ sys/elf32.h \ @@ -6180,6 +6185,7 @@ for ac_header in \ sys/statvfs.h \ sys/strtio.h \ sys/syscall.h \ + sys/tihdr.h \ sys/time.h \ sys/timeout.h \ sys/times.h \ diff --git a/configure.ac b/configure.ac index f70222f..274d60a 100644 --- a/configure.ac +++ b/configure.ac @@ -279,6 +279,7 @@ AC_CHECK_HEADERS(\ getopt.h \ grp.h \ ieeefp.h \ + inet/mib2.h \ io.h \ jack/jack.h \ jpeglib.h \ @@ -327,6 +328,7 @@ AC_CHECK_HEADERS(\ soundcard.h \ stdint.h \ strings.h \ + stropts.h \ sys/asoundlib.h \ sys/cdio.h \ sys/elf32.h \ @@ -361,6 +363,7 @@ AC_CHECK_HEADERS(\ sys/statvfs.h \ sys/strtio.h \ sys/syscall.h \ + sys/tihdr.h \ sys/time.h \ sys/timeout.h \ sys/times.h \ diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c index a1b9981..c92f0e4 100644 --- a/dlls/iphlpapi/ipstats.c +++ b/dlls/iphlpapi/ipstats.c @@ -25,6 +25,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <errno.h> #include <sys/types.h> #ifdef HAVE_ALIAS_H #include <alias.h> @@ -110,6 +111,15 @@ #ifdef HAVE_KSTAT_H #include <kstat.h> #endif +#ifdef HAVE_INET_MIB2_H +#include <inet/mib2.h> +#endif +#ifdef HAVE_STROPTS_H +#include <stropts.h> +#endif +#ifdef HAVE_SYS_TIHDR_H +#include <sys/tihdr.h> +#endif #ifndef ROUNDUP #define ROUNDUP(a) \ @@ -173,6 +183,81 @@ static ULONGLONG kstat_get_ui64( kstat_t *ksp, const char *name ) } #endif +#if defined(HAVE_SYS_TIHDR_H) && defined(T_OPTMGMT_ACK) +static int open_streams_mib( const char *proto ) +{ + int fd; + struct strbuf buf; + struct request + { + struct T_optmgmt_req req_header; + struct opthdr opt_header; + } request; + + if ((fd = open( "/dev/arp", O_RDWR )) == -1) + { + WARN( "could not open /dev/arp: %s\n", strerror(errno) ); + return -1; + } + if (proto) ioctl( fd, I_PUSH, proto ); + + request.req_header.PRIM_type = T_SVR4_OPTMGMT_REQ; + request.req_header.OPT_length = sizeof(request.opt_header); + request.req_header.OPT_offset = FIELD_OFFSET( struct request, opt_header ); + request.req_header.MGMT_flags = T_CURRENT; + request.opt_header.level = MIB2_IP; + request.opt_header.name = 0; + request.opt_header.len = 0; + + buf.len = sizeof(request); + buf.buf = (caddr_t)&request; + if (putmsg( fd, &buf, NULL, 0 ) == -1) + { + WARN( "putmsg: %s\n", strerror(errno) ); + close( fd ); + fd = -1; + } + return fd; +} + +static void *read_mib_entry( int fd, int level, int name, int *len ) +{ + struct strbuf buf; + void *data; + int ret, flags = 0; + + struct reply + { + struct T_optmgmt_ack ack_header; + struct opthdr opt_header; + } reply; + + for (;;) + { + buf.maxlen = sizeof(reply); + buf.buf = (caddr_t)&reply; + if ((ret = getmsg( fd, &buf, NULL, &flags )) < 0) return NULL; + if (!(ret & MOREDATA)) return NULL; + if (reply.ack_header.PRIM_type != T_OPTMGMT_ACK) return NULL; + if (buf.len < sizeof(reply.ack_header)) return NULL; + if (reply.ack_header.OPT_length < sizeof(reply.opt_header)) return NULL; + + if (!(data = HeapAlloc( GetProcessHeap(), 0, reply.opt_header.len ))) return NULL; + buf.maxlen = reply.opt_header.len; + buf.buf = (caddr_t)data; + flags = 0; + if (getmsg( fd, NULL, &buf, &flags ) >= 0 && + reply.opt_header.level == level && + reply.opt_header.name == name) + { + *len = buf.len; + return data; + } + HeapFree( GetProcessHeap(), 0, data ); + } +} +#endif /* HAVE_SYS_TIHDR_H && T_OPTMGMT_ACK */ + DWORD getInterfaceStatsByName(const char *name, PMIB_IFROW entry) { DWORD ret = ERROR_NOT_SUPPORTED; @@ -1398,7 +1483,7 @@ static MIB_TCPTABLE *append_tcp_row( HANDLE heap, DWORD flags, MIB_TCPTABLE *tab /* Why not a lookup table? Because the TCPS_* constants are different on different platforms */ -static DWORD TCPStateToMIBState (int state) +static inline DWORD TCPStateToMIBState (int state) { switch (state) { @@ -1491,6 +1576,31 @@ DWORD WINAPI AllocateAndGetTcpTableFromStack( PMIB_TCPTABLE *ppTcpTable, BOOL bO } else ret = ERROR_NOT_SUPPORTED; } +#elif defined(HAVE_SYS_TIHDR_H) && defined(T_OPTMGMT_ACK) + { + void *data; + int fd, len; + mib2_tcpConnEntry_t *entry; + + if ((fd = open_streams_mib( "tcp" )) != -1) + { + if ((data = read_mib_entry( fd, MIB2_TCP, MIB2_TCP_CONN, &len ))) + { + for (entry = data; (char *)(entry + 1) <= (char *)data + len; entry++) + { + row.dwLocalAddr = entry->tcpConnLocalAddress; + row.dwLocalPort = htons( entry->tcpConnLocalPort ); + row.dwRemoteAddr = entry->tcpConnRemAddress; + row.dwRemotePort = htons( entry->tcpConnRemPort ); + row.dwState = entry->tcpConnState; + if (!(table = append_tcp_row( heap, flags, table, &count, &row ))) break; + } + HeapFree( GetProcessHeap(), 0, data ); + } + close( fd ); + } + else ret = ERROR_NOT_SUPPORTED; + } #elif defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_STRUCT_XINPGEN) { size_t Len = 0; diff --git a/include/config.h.in b/include/config.h.in index f3bd775..2b7c655 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -240,6 +240,9 @@ /* Define to 1 if you have the <ieeefp.h> header file. */ #undef HAVE_IEEEFP_H +/* Define to 1 if you have the <inet/mib2.h> header file. */ +#undef HAVE_INET_MIB2_H + /* Define to 1 if you have the `inet_network' function. */ #undef HAVE_INET_NETWORK @@ -708,6 +711,9 @@ /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP +/* Define to 1 if you have the <stropts.h> header file. */ +#undef HAVE_STROPTS_H + /* Define to 1 if you have the `strtold' function. */ #undef HAVE_STRTOLD @@ -906,6 +912,9 @@ /* Define to 1 if you have the <sys/thr.h> header file. */ #undef HAVE_SYS_THR_H +/* Define to 1 if you have the <sys/tihdr.h> header file. */ +#undef HAVE_SYS_TIHDR_H + /* Define to 1 if you have the <sys/timeout.h> header file. */ #undef HAVE_SYS_TIMEOUT_H
1
0
0
0
Nikolay Sivov : user32: Button should get captured when highlighted with VK_SPACE.
by Alexandre Julliard
10 Mar '09
10 Mar '09
Module: wine Branch: master Commit: 2948ec6a7061bd4f260d60eaa6f44981691e1e7a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2948ec6a7061bd4f260d60eaa…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Tue Mar 10 07:09:35 2009 -0400 user32: Button should get captured when highlighted with VK_SPACE. --- dlls/user32/button.c | 1 + dlls/user32/tests/msg.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/dlls/user32/button.c b/dlls/user32/button.c index 84b54ab..f2097aa 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -309,6 +309,7 @@ static LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, { SendMessageW( hWnd, BM_SETSTATE, TRUE, 0 ); set_button_state( hWnd, get_button_state( hWnd ) | BUTTON_BTNPRESSED ); + SetCapture( hWnd ); } break; diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 054cc03..ed6a820 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -5213,6 +5213,17 @@ static void test_button_messages(void) DWORD dlg_code; HFONT zfont; + /* selection with VK_SPACE should capture button window */ + hwnd = CreateWindowExA(0, "button", "test", BS_CHECKBOX | WS_VISIBLE | WS_POPUP, + 0, 0, 50, 14, 0, 0, 0, NULL); + ok(hwnd != 0, "Failed to create button window\n"); + ReleaseCapture(); + SetFocus(hwnd); + SendMessageA(hwnd, WM_KEYDOWN, VK_SPACE, 0); + ok(GetCapture() == hwnd, "Should be captured on VK_SPACE WM_KEYDOWN\n"); + SendMessageA(hwnd, WM_KEYUP, VK_SPACE, 0); + DestroyWindow(hwnd); + subclass_button(); for (i = 0; i < sizeof(button)/sizeof(button[0]); i++)
1
0
0
0
Francois Gouget : avifil32: Add a missing AddRef in IGetFrame_QueryInterface().
by Alexandre Julliard
10 Mar '09
10 Mar '09
Module: wine Branch: master Commit: 5e56845546fda6cc01524ae5a355f0625037cc0f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e56845546fda6cc01524ae5a…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Mar 10 12:39:09 2009 +0100 avifil32: Add a missing AddRef in IGetFrame_QueryInterface(). --- dlls/avifil32/getframe.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/avifil32/getframe.c b/dlls/avifil32/getframe.c index 428901e..db05f85 100644 --- a/dlls/avifil32/getframe.c +++ b/dlls/avifil32/getframe.c @@ -140,6 +140,7 @@ static HRESULT WINAPI IGetFrame_fnQueryInterface(IGetFrame *iface, if (IsEqualGUID(&IID_IUnknown, refiid) || IsEqualGUID(&IID_IGetFrame, refiid)) { *obj = iface; + IGetFrame_AddRef(iface); return S_OK; }
1
0
0
0
Francois Gouget : avifil32: Add missing AddRefs in IAVIFile_QueryInterface( ).
by Alexandre Julliard
10 Mar '09
10 Mar '09
Module: wine Branch: master Commit: f884cf0ddf4167b97f67d23c59f0f078f8b89036 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f884cf0ddf4167b97f67d23c5…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Mar 10 12:38:20 2009 +0100 avifil32: Add missing AddRefs in IAVIFile_QueryInterface(). --- dlls/avifil32/wavfile.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/avifil32/wavfile.c b/dlls/avifil32/wavfile.c index 2ec9b5e..fd6d9ec 100644 --- a/dlls/avifil32/wavfile.c +++ b/dlls/avifil32/wavfile.c @@ -251,13 +251,16 @@ static HRESULT WINAPI IAVIFile_fnQueryInterface(IAVIFile *iface, REFIID refiid, if (IsEqualGUID(&IID_IUnknown, refiid) || IsEqualGUID(&IID_IAVIFile, refiid)) { *obj = iface; + IAVIFile_AddRef(iface); return S_OK; } else if (This->fInfo.dwStreams == 1 && IsEqualGUID(&IID_IAVIStream, refiid)) { *obj = &This->iAVIStream; + IAVIFile_AddRef(iface); return S_OK; } else if (IsEqualGUID(&IID_IPersistFile, refiid)) { *obj = &This->iPersistFile; + IAVIFile_AddRef(iface); return S_OK; }
1
0
0
0
Aric Stewart : dinput: Create generic joystick Acquire/Unacquire.
by Alexandre Julliard
10 Mar '09
10 Mar '09
Module: wine Branch: master Commit: 5dbe136027463a3c14d8379408167e2b3e274caa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5dbe136027463a3c14d837940…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon Mar 9 10:07:35 2009 -0500 dinput: Create generic joystick Acquire/Unacquire. --- dlls/dinput/joystick.c | 34 ++++++++++++++++++++++++++++++++++ dlls/dinput/joystick_linux.c | 16 +++++++++------- dlls/dinput/joystick_private.h | 4 ++++ 3 files changed, 47 insertions(+), 7 deletions(-) diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c index a19cf27..6e7e7ef 100644 --- a/dlls/dinput/joystick.c +++ b/dlls/dinput/joystick.c @@ -32,6 +32,40 @@ WINE_DEFAULT_DEBUG_CHANNEL(dinput); /****************************************************************************** + * Acquire : gets exclusive control of the joystick + */ +HRESULT WINAPI JoystickAGenericImpl_Acquire(LPDIRECTINPUTDEVICE8A iface) +{ + JoystickGenericImpl *This = (JoystickGenericImpl *)iface; + + TRACE("(%p)\n",This); + + if (This->base.acquired) { + WARN("already acquired\n"); + return S_FALSE; + } + + This->base.acquired = 1; + + return DI_OK; +} + +/****************************************************************************** + * Unacquire : frees the joystick + */ +HRESULT WINAPI JoystickAGenericImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface) +{ + JoystickGenericImpl *This = (JoystickGenericImpl *)iface; + HRESULT res; + + TRACE("(%p)\n",This); + + if ((res = IDirectInputDevice2AImpl_Unacquire(iface)) != DI_OK) return res; + + return DI_OK; +} + +/****************************************************************************** * SetProperty : change input device properties */ HRESULT WINAPI JoystickAGenericImpl_SetProperty( diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index 67ec02b..afabebe 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -605,13 +605,13 @@ const struct dinput_device joystick_linux_device = { static HRESULT WINAPI JoystickLinuxAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface) { JoystickImpl *This = (JoystickImpl *)iface; + HRESULT res; TRACE("(%p)\n",This); - if (This->generic.base.acquired) { - WARN("already acquired\n"); - return S_FALSE; - } + res = JoystickAGenericImpl_Acquire(iface); + if (res != DI_OK) + return res; /* open the joystick device */ if (This->joyfd==-1) { @@ -620,12 +620,11 @@ static HRESULT WINAPI JoystickLinuxAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface) This->joyfd=open(This->dev,O_RDONLY); if (This->joyfd==-1) { ERR("open(%s) failed: %s\n", This->dev, strerror(errno)); + JoystickAGenericImpl_Unacquire(iface); return DIERR_NOTFOUND; } } - This->generic.base.acquired = 1; - return DI_OK; } @@ -639,7 +638,10 @@ static HRESULT WINAPI JoystickLinuxAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface) TRACE("(%p)\n",This); - if ((res = IDirectInputDevice2AImpl_Unacquire(iface)) != DI_OK) return res; + res = JoystickAGenericImpl_Unacquire(iface); + + if (res != DI_OK) + return res; if (This->joyfd!=-1) { TRACE("closing joystick device\n"); diff --git a/dlls/dinput/joystick_private.h b/dlls/dinput/joystick_private.h index e1709e9..b61406f 100644 --- a/dlls/dinput/joystick_private.h +++ b/dlls/dinput/joystick_private.h @@ -78,4 +78,8 @@ HRESULT WINAPI JoystickAGenericImpl_Poll(LPDIRECTINPUTDEVICE8A iface); HRESULT WINAPI JoystickAGenericImpl_GetDeviceState( LPDIRECTINPUTDEVICE8A iface, DWORD len, LPVOID ptr); +HRESULT WINAPI JoystickAGenericImpl_Acquire(LPDIRECTINPUTDEVICE8A iface); + +HRESULT WINAPI JoystickAGenericImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface); + #endif /* __WINE_DLLS_DINPUT_JOYSTICK_PRIVATE_H */
1
0
0
0
Aric Stewart : dinput: Remove easy redundancy from linuxinput.
by Alexandre Julliard
10 Mar '09
10 Mar '09
Module: wine Branch: master Commit: 36f538eb91f0e18b5d5744198b351c1b6f3ca22b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36f538eb91f0e18b5d5744198…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Mon Mar 9 10:07:27 2009 -0500 dinput: Remove easy redundancy from linuxinput. --- dlls/dinput/joystick_linuxinput.c | 50 +----------------------------------- 1 files changed, 2 insertions(+), 48 deletions(-) diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index 548f920..f5dc542 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -1069,52 +1069,6 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface, return DI_OK; } -/****************************************************************************** - * GetObjectInfo : get information about a device object such as a button - * or axis - */ -static HRESULT WINAPI JoystickWImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface, - LPDIDEVICEOBJECTINSTANCEW pdidoi, DWORD dwObj, DWORD dwHow) -{ - static const WCHAR axisW[] = {'A','x','i','s',' ','%','d',0}; - static const WCHAR povW[] = {'P','O','V',' ','%','d',0}; - static const WCHAR buttonW[] = {'B','u','t','t','o','n',' ','%','d',0}; - HRESULT res; - - res = IDirectInputDevice2WImpl_GetObjectInfo(iface, pdidoi, dwObj, dwHow); - if (res != DI_OK) return res; - - if (pdidoi->dwType & DIDFT_AXIS) - sprintfW(pdidoi->tszName, axisW, DIDFT_GETINSTANCE(pdidoi->dwType)); - else if (pdidoi->dwType & DIDFT_POV) - sprintfW(pdidoi->tszName, povW, DIDFT_GETINSTANCE(pdidoi->dwType)); - else if (pdidoi->dwType & DIDFT_BUTTON) - sprintfW(pdidoi->tszName, buttonW, DIDFT_GETINSTANCE(pdidoi->dwType)); - - _dump_OBJECTINSTANCEW(pdidoi); - return res; -} - -static HRESULT WINAPI JoystickAImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8A iface, - LPDIDEVICEOBJECTINSTANCEA pdidoi, DWORD dwObj, DWORD dwHow) -{ - HRESULT res; - DIDEVICEOBJECTINSTANCEW didoiW; - DWORD dwSize = pdidoi->dwSize; - - didoiW.dwSize = sizeof(didoiW); - res = JoystickWImpl_GetObjectInfo((LPDIRECTINPUTDEVICE8W)iface, &didoiW, dwObj, dwHow); - if (res != DI_OK) return res; - - memset(pdidoi, 0, pdidoi->dwSize); - memcpy(pdidoi, &didoiW, FIELD_OFFSET(DIDEVICEOBJECTINSTANCEW, tszName)); - pdidoi->dwSize = dwSize; - WideCharToMultiByte(CP_ACP, 0, didoiW.tszName, -1, pdidoi->tszName, - sizeof(pdidoi->tszName), NULL, NULL); - - return res; -} - /****************************************************************************** * CreateEffect - Create a new FF effect with the specified params */ @@ -1516,7 +1470,7 @@ static const IDirectInputDevice8AVtbl JoystickAvt = IDirectInputDevice2AImpl_SetDataFormat, IDirectInputDevice2AImpl_SetEventNotification, IDirectInputDevice2AImpl_SetCooperativeLevel, - JoystickAImpl_GetObjectInfo, + JoystickAGenericImpl_GetObjectInfo, JoystickAImpl_GetDeviceInfo, IDirectInputDevice2AImpl_RunControlPanel, IDirectInputDevice2AImpl_Initialize, @@ -1558,7 +1512,7 @@ static const IDirectInputDevice8WVtbl JoystickWvt = XCAST(SetDataFormat)IDirectInputDevice2AImpl_SetDataFormat, XCAST(SetEventNotification)IDirectInputDevice2AImpl_SetEventNotification, XCAST(SetCooperativeLevel)IDirectInputDevice2AImpl_SetCooperativeLevel, - JoystickWImpl_GetObjectInfo, + JoystickWGenericImpl_GetObjectInfo, JoystickWImpl_GetDeviceInfo, XCAST(RunControlPanel)IDirectInputDevice2AImpl_RunControlPanel, XCAST(Initialize)IDirectInputDevice2AImpl_Initialize,
1
0
0
0
← Newer
1
...
48
49
50
51
52
53
54
...
84
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
Results per page:
10
25
50
100
200