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
June 2020
----- 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
1 participants
947 discussions
Start a n
N
ew thread
Hans Leidekker : winhttp: Implement WinHttpWebSocketClose.
by Alexandre Julliard
24 Jun '20
24 Jun '20
Module: wine Branch: master Commit: 61ea74b457dc25e5f2a3b824aa9b4a1c0d2f6a01 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=61ea74b457dc25e5f2a3b824…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jun 24 10:33:06 2020 +0200 winhttp: Implement WinHttpWebSocketClose. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winhttp/request.c | 99 +++++++++++++++++++++++++++++++++++++++++- dlls/winhttp/winhttp_private.h | 3 ++ 2 files changed, 100 insertions(+), 2 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index c5abfdb8e4..60a9585d0d 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -3540,10 +3540,105 @@ DWORD WINAPI WinHttpWebSocketShutdown( HINTERNET hsocket, USHORT status, void *r return ret; } +static DWORD socket_close( struct socket *socket, USHORT status, const void *reason, DWORD len, BOOL async ) +{ + struct netconn *netconn = socket->request->netconn; + DWORD ret, count; + + while (socket->read_size) /* drain any pending data */ + { + char buf[1024]; + if ((ret = receive_bytes( netconn, buf, min(socket->read_size, sizeof(buf)), &count ))) goto done; + socket->read_size -= count; + } + + if (socket->state < SOCKET_STATE_SHUTDOWN) + { + if ((ret = send_frame( netconn, WINHTTP_WEB_SOCKET_CLOSE_BUFFER_TYPE, status, reason, len, TRUE ))) goto done; + socket->state = SOCKET_STATE_SHUTDOWN; + } + + if ((ret = receive_frame( netconn, &count, &socket->buf_type ))) goto done; + if (socket->buf_type != WINHTTP_WEB_SOCKET_CLOSE_BUFFER_TYPE || (count && count > sizeof(socket->reason))) + { + ret = ERROR_WINHTTP_INVALID_SERVER_RESPONSE; + goto done; + } + + if ((ret = receive_bytes( netconn, (char *)&socket->status, sizeof(socket->status), &count ))) goto done; + if (count != sizeof(socket->status)) + { + ret = ERROR_WINHTTP_INVALID_SERVER_RESPONSE; + goto done; + } + socket->status = RtlUshortByteSwap( socket->status ); + ret = receive_bytes( netconn, socket->reason, sizeof(socket->reason), &socket->reason_len ); + +done: + if (async) + { + if (!ret) send_callback( &socket->hdr, WINHTTP_CALLBACK_STATUS_CLOSE_COMPLETE, NULL, 0 ); + else + { + WINHTTP_WEB_SOCKET_ASYNC_RESULT result; + result.AsyncResult.dwResult = API_READ_DATA; /* FIXME */ + result.AsyncResult.dwError = ret; + result.Operation = WINHTTP_WEB_SOCKET_CLOSE_OPERATION; + send_callback( &socket->hdr, WINHTTP_CALLBACK_STATUS_REQUEST_ERROR, &result, sizeof(result) ); + } + } + + if (!ret) socket->state = SOCKET_STATE_CLOSED; + return ret; +} + +static void task_socket_close( struct task_header *task ) +{ + struct socket *socket = (struct socket *)task->object; + struct socket_shutdown *s = (struct socket_shutdown *)task; + + socket_close( socket, s->status, s->reason, s->len, TRUE ); +} + DWORD WINAPI WinHttpWebSocketClose( HINTERNET hsocket, USHORT status, void *reason, DWORD len ) { - FIXME("%p, %u, %p, %u\n", hsocket, status, reason, len); - return ERROR_INVALID_PARAMETER; + struct socket *socket; + DWORD ret; + + TRACE("%p, %u, %p, %u\n", hsocket, status, reason, len); + + if (len && !reason) return ERROR_INVALID_PARAMETER; + + if (!(socket = (struct socket *)grab_object( hsocket ))) return ERROR_INVALID_HANDLE; + if (socket->hdr.type != WINHTTP_HANDLE_TYPE_SOCKET) + { + release_object( &socket->hdr ); + return ERROR_WINHTTP_INCORRECT_HANDLE_TYPE; + } + if (socket->state >= SOCKET_STATE_CLOSED) + { + release_object( &socket->hdr ); + return ERROR_WINHTTP_INCORRECT_HANDLE_STATE; + } + + if (socket->request->connect->hdr.flags & WINHTTP_FLAG_ASYNC) + { + struct socket_shutdown *s; + + if (!(s = heap_alloc( sizeof(*s) ))) return FALSE; + s->hdr.object = &socket->hdr; + s->hdr.proc = task_socket_close; + s->status = status; + s->reason = reason; + s->len = len; + + addref_object( &socket->hdr ); + ret = queue_task( &socket->hdr, &socket->recv_q, (struct task_header *)s ); + } + else ret = socket_close( socket, status, reason, len, FALSE ); + + release_object( &socket->hdr ); + return ret; } DWORD WINAPI WinHttpWebSocketQueryCloseStatus( HINTERNET hsocket, USHORT *status, void *reason, DWORD len, diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h index 7d81e35934..41ada14c0c 100644 --- a/dlls/winhttp/winhttp_private.h +++ b/dlls/winhttp/winhttp_private.h @@ -230,6 +230,9 @@ struct socket struct queue recv_q; WINHTTP_WEB_SOCKET_BUFFER_TYPE buf_type; DWORD read_size; + USHORT status; + char reason[128]; + DWORD reason_len; }; struct task_header
1
0
0
0
Hans Leidekker : winhttp: Implement WinHttpWebSocketShutdown.
by Alexandre Julliard
24 Jun '20
24 Jun '20
Module: wine Branch: master Commit: da0515c165826be545ec79c728271bf6b6727f24 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=da0515c165826be545ec79c7…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jun 24 10:33:05 2020 +0200 winhttp: Implement WinHttpWebSocketShutdown. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winhttp/request.c | 69 ++++++++++++++++++++++++++++++++++++++++-- dlls/winhttp/winhttp_private.h | 8 +++++ 2 files changed, 75 insertions(+), 2 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index e6dd6d9068..c5abfdb8e4 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -3469,10 +3469,75 @@ DWORD WINAPI WinHttpWebSocketReceive( HINTERNET hsocket, void *buf, DWORD len, D return ret; } +static DWORD socket_shutdown( struct socket *socket, USHORT status, const void *reason, DWORD len, BOOL async ) +{ + DWORD ret; + + ret = send_frame( socket->request->netconn, WINHTTP_WEB_SOCKET_CLOSE_BUFFER_TYPE, status, reason, len, TRUE ); + if (async) + { + if (!ret) send_callback( &socket->hdr, WINHTTP_CALLBACK_STATUS_SHUTDOWN_COMPLETE, NULL, 0 ); + else + { + WINHTTP_WEB_SOCKET_ASYNC_RESULT result; + result.AsyncResult.dwResult = API_WRITE_DATA; + result.AsyncResult.dwError = ret; + result.Operation = WINHTTP_WEB_SOCKET_SHUTDOWN_OPERATION; + send_callback( &socket->hdr, WINHTTP_CALLBACK_STATUS_REQUEST_ERROR, &result, sizeof(result) ); + } + } + + if (!ret) socket->state = SOCKET_STATE_SHUTDOWN; + return ret; +} + +static void task_socket_shutdown( struct task_header *task ) +{ + struct socket *socket = (struct socket *)task->object; + struct socket_shutdown *s = (struct socket_shutdown *)task; + + socket_shutdown( socket, s->status, s->reason, s->len, TRUE ); +} + DWORD WINAPI WinHttpWebSocketShutdown( HINTERNET hsocket, USHORT status, void *reason, DWORD len ) { - FIXME("%p, %u, %p, %u\n", hsocket, status, reason, len); - return ERROR_INVALID_PARAMETER; + struct socket *socket; + DWORD ret; + + TRACE("%p, %u, %p, %u\n", hsocket, status, reason, len); + + if (len && !reason) return ERROR_INVALID_PARAMETER; + + if (!(socket = (struct socket *)grab_object( hsocket ))) return ERROR_INVALID_HANDLE; + if (socket->hdr.type != WINHTTP_HANDLE_TYPE_SOCKET) + { + release_object( &socket->hdr ); + return ERROR_WINHTTP_INCORRECT_HANDLE_TYPE; + } + if (socket->state >= SOCKET_STATE_SHUTDOWN) + { + release_object( &socket->hdr ); + return ERROR_WINHTTP_INCORRECT_HANDLE_STATE; + } + + if (socket->request->connect->hdr.flags & WINHTTP_FLAG_ASYNC) + { + struct socket_shutdown *s; + + if (!(s = heap_alloc( sizeof(*s) ))) return FALSE; + s->hdr.object = &socket->hdr; + s->hdr.proc = task_socket_shutdown; + s->status = status; + s->reason = reason; + s->len = len; + + addref_object( &socket->hdr ); + ret = queue_task( &socket->hdr, &socket->send_q, (struct task_header *)s ); + } + else ret = socket_shutdown( socket, status, reason, len, FALSE ); + + release_object( &socket->hdr ); + return ret; } DWORD WINAPI WinHttpWebSocketClose( HINTERNET hsocket, USHORT status, void *reason, DWORD len ) diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h index 9cf9c396cb..7d81e35934 100644 --- a/dlls/winhttp/winhttp_private.h +++ b/dlls/winhttp/winhttp_private.h @@ -292,6 +292,14 @@ struct socket_receive DWORD len; }; +struct socket_shutdown +{ + struct task_header hdr; + USHORT status; + const void *reason; + DWORD len; +}; + struct object_header *addref_object( struct object_header * ) DECLSPEC_HIDDEN; struct object_header *grab_object( HINTERNET ) DECLSPEC_HIDDEN; void release_object( struct object_header * ) DECLSPEC_HIDDEN;
1
0
0
0
Hans Leidekker : winhttp: Implement WinHttpWebSocketReceive.
by Alexandre Julliard
24 Jun '20
24 Jun '20
Module: wine Branch: master Commit: f18cbfcd5d1ce72b9869f35bb5bd81ea0e5ea8d7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f18cbfcd5d1ce72b9869f35b…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jun 24 10:33:04 2020 +0200 winhttp: Implement WinHttpWebSocketReceive. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winhttp/request.c | 159 +++++++++++++++++++++++++++++++++++++++-- dlls/winhttp/winhttp_private.h | 10 +++ 2 files changed, 165 insertions(+), 4 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 9ac3c6e89e..e6dd6d9068 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -34,6 +34,7 @@ #include "schannel.h" #include "winhttp.h" #include "ntsecapi.h" +#include "winternl.h" #include "wine/debug.h" #include "winhttp_private.h" @@ -3067,10 +3068,19 @@ static void socket_destroy( struct object_header *hdr ) SetEvent( socket->send_q.cancel ); return; } + if (socket->recv_q.proc_running) + { + socket->recv_q.proc_running = FALSE; + SetEvent( socket->recv_q.cancel ); + return; + } release_object( &socket->request->hdr ); socket->send_q.cs.DebugInfo->Spare[0] = 0; DeleteCriticalSection( &socket->send_q.cs ); + + socket->recv_q.cs.DebugInfo->Spare[0] = 0; + DeleteCriticalSection( &socket->recv_q.cs ); heap_free( socket ); } @@ -3120,6 +3130,8 @@ HINTERNET WINAPI WinHttpWebSocketCompleteUpgrade( HINTERNET hrequest, DWORD_PTR socket->hdr.context = context; InitializeCriticalSection( &socket->send_q.cs ); socket->send_q.cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": socket.send_q.cs"); + InitializeCriticalSection( &socket->recv_q.cs ); + socket->recv_q.cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": socket.recv_q.cs"); addref_object( &request->hdr ); socket->request = request; @@ -3311,11 +3323,150 @@ DWORD WINAPI WinHttpWebSocketSend( HINTERNET hsocket, WINHTTP_WEB_SOCKET_BUFFER_ return ret; } -DWORD WINAPI WinHttpWebSocketReceive( HINTERNET hsocket, void *buf, DWORD len, DWORD *read, - WINHTTP_WEB_SOCKET_BUFFER_TYPE *type ) +static DWORD receive_bytes( struct netconn *netconn, char *buf, DWORD len, DWORD *ret_len ) { - FIXME("%p, %p, %u, %p, %p\n", hsocket, buf, len, read, type); - return ERROR_INVALID_PARAMETER; + DWORD err; + if ((err = netconn_recv( netconn, buf, len, 0, (int *)ret_len ))) return err; + if (len && !*ret_len) return ERROR_WINHTTP_INVALID_SERVER_RESPONSE; + return ERROR_SUCCESS; +} + +static WINHTTP_WEB_SOCKET_BUFFER_TYPE map_opcode( enum opcode opcode ) +{ + switch (opcode) + { + case OPCODE_TEXT: return WINHTTP_WEB_SOCKET_UTF8_MESSAGE_BUFFER_TYPE; + case OPCODE_BINARY: return WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE; + case OPCODE_CLOSE: return WINHTTP_WEB_SOCKET_CLOSE_BUFFER_TYPE; + default: + ERR("opcode %u not handled\n", opcode); + return ~0u; + } +} + +static DWORD receive_frame( struct netconn *netconn, DWORD *ret_len, WINHTTP_WEB_SOCKET_BUFFER_TYPE *ret_type ) +{ + WINHTTP_WEB_SOCKET_BUFFER_TYPE type; + DWORD ret, len, count; + enum opcode opcode; + char hdr[2]; + + if ((ret = receive_bytes( netconn, hdr, sizeof(hdr), &count ))) return ret; + if (count != sizeof(hdr) || (hdr[0] & RESERVED_BIT) || (hdr[1] & MASK_BIT)) + { + return ERROR_WINHTTP_INVALID_SERVER_RESPONSE; + } + + opcode = hdr[0] & 0xf; + type = map_opcode( opcode ); + + len = hdr[1] & ~MASK_BIT; + if (len == 126) + { + USHORT len16; + if ((ret = receive_bytes( netconn, (char *)&len16, sizeof(len16), &count ))) return ret; + if (count != sizeof(len16)) return ERROR_WINHTTP_INVALID_SERVER_RESPONSE; + len = RtlUshortByteSwap( len16 ); + } + else if (len == 127) + { + ULONGLONG len64; + if ((ret = receive_bytes( netconn, (char *)&len64, sizeof(len64), &count ))) return ret; + if (count != sizeof(len64)) return ERROR_WINHTTP_INVALID_SERVER_RESPONSE; + if ((len64 = RtlUlonglongByteSwap( len64 )) > ~0u) return ERROR_NOT_SUPPORTED; + len = len64; + } + + *ret_len = len; + *ret_type = type; + return ERROR_SUCCESS; +} + +static DWORD socket_receive( struct socket *socket, void *buf, DWORD len, DWORD *ret_len, + WINHTTP_WEB_SOCKET_BUFFER_TYPE *ret_type, BOOL async ) +{ + DWORD count, ret = ERROR_SUCCESS; + + if (!socket->read_size) ret = receive_frame( socket->request->netconn, &socket->read_size, &socket->buf_type ); + if (!ret) ret = receive_bytes( socket->request->netconn, buf, min(len, socket->read_size), &count ); + if (!ret) + { + socket->read_size -= count; + if (!async) + { + *ret_len = count; + *ret_type = socket->buf_type; + } + } + + if (async) + { + if (!ret) + { + WINHTTP_WEB_SOCKET_STATUS status; + status.dwBytesTransferred = count; + status.eBufferType = socket->buf_type; + send_callback( &socket->hdr, WINHTTP_CALLBACK_STATUS_READ_COMPLETE, &status, sizeof(status) ); + } + else + { + WINHTTP_WEB_SOCKET_ASYNC_RESULT result; + result.AsyncResult.dwResult = API_READ_DATA; + result.AsyncResult.dwError = ret; + result.Operation = WINHTTP_WEB_SOCKET_RECEIVE_OPERATION; + send_callback( &socket->hdr, WINHTTP_CALLBACK_STATUS_REQUEST_ERROR, &result, sizeof(result) ); + } + } + return ret; +} + +static void task_socket_receive( struct task_header *task ) +{ + struct socket *socket = (struct socket *)task->object; + struct socket_receive *r = (struct socket_receive *)task; + + socket_receive( socket, r->buf, r->len, NULL, NULL, TRUE ); +} + +DWORD WINAPI WinHttpWebSocketReceive( HINTERNET hsocket, void *buf, DWORD len, DWORD *ret_len, + WINHTTP_WEB_SOCKET_BUFFER_TYPE *ret_type ) +{ + struct socket *socket; + DWORD ret; + + TRACE("%p, %p, %u, %p, %p\n", hsocket, buf, len, ret_len, ret_type); + + if (!buf || !len) return ERROR_INVALID_PARAMETER; + + if (!(socket = (struct socket *)grab_object( hsocket ))) return ERROR_INVALID_HANDLE; + if (socket->hdr.type != WINHTTP_HANDLE_TYPE_SOCKET) + { + release_object( &socket->hdr ); + return ERROR_WINHTTP_INCORRECT_HANDLE_TYPE; + } + if (socket->state != SOCKET_STATE_OPEN) + { + release_object( &socket->hdr ); + return ERROR_WINHTTP_INCORRECT_HANDLE_STATE; + } + + if (socket->request->connect->hdr.flags & WINHTTP_FLAG_ASYNC) + { + struct socket_receive *r; + + if (!(r = heap_alloc( sizeof(*r) ))) return FALSE; + r->hdr.object = &socket->hdr; + r->hdr.proc = task_socket_receive; + r->buf = buf; + r->len = len; + + addref_object( &socket->hdr ); + ret = queue_task( &socket->hdr, &socket->recv_q, (struct task_header *)r ); + } + else ret = socket_receive( socket, buf, len, ret_len, ret_type, FALSE ); + + release_object( &socket->hdr ); + return ret; } DWORD WINAPI WinHttpWebSocketShutdown( HINTERNET hsocket, USHORT status, void *reason, DWORD len ) diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h index d9e99651ab..9cf9c396cb 100644 --- a/dlls/winhttp/winhttp_private.h +++ b/dlls/winhttp/winhttp_private.h @@ -227,6 +227,9 @@ struct socket struct request *request; enum socket_state state; struct queue send_q; + struct queue recv_q; + WINHTTP_WEB_SOCKET_BUFFER_TYPE buf_type; + DWORD read_size; }; struct task_header @@ -282,6 +285,13 @@ struct socket_send DWORD len; }; +struct socket_receive +{ + struct task_header hdr; + void *buf; + DWORD len; +}; + struct object_header *addref_object( struct object_header * ) DECLSPEC_HIDDEN; struct object_header *grab_object( HINTERNET ) DECLSPEC_HIDDEN; void release_object( struct object_header * ) DECLSPEC_HIDDEN;
1
0
0
0
Hans Leidekker : winhttp: Implement WinHttpWebSocketSend.
by Alexandre Julliard
24 Jun '20
24 Jun '20
Module: wine Branch: master Commit: 68b44e305504c5e0fa8e9917478df96f8a08b62f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=68b44e305504c5e0fa8e9917…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jun 24 10:33:03 2020 +0200 winhttp: Implement WinHttpWebSocketSend. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winhttp/request.c | 184 ++++++++++++++++++++++++++++++++++++++++- dlls/winhttp/winhttp_private.h | 17 ++++ 2 files changed, 199 insertions(+), 2 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 0c038289f8..9ac3c6e89e 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -3061,7 +3061,16 @@ static void socket_destroy( struct object_header *hdr ) TRACE("%p\n", socket); + if (socket->send_q.proc_running) + { + socket->send_q.proc_running = FALSE; + SetEvent( socket->send_q.cancel ); + return; + } release_object( &socket->request->hdr ); + + socket->send_q.cs.DebugInfo->Spare[0] = 0; + DeleteCriticalSection( &socket->send_q.cs ); heap_free( socket ); } @@ -3109,6 +3118,8 @@ HINTERNET WINAPI WinHttpWebSocketCompleteUpgrade( HINTERNET hrequest, DWORD_PTR socket->hdr.callback = request->hdr.callback; socket->hdr.notify_mask = request->hdr.notify_mask; socket->hdr.context = context; + InitializeCriticalSection( &socket->send_q.cs ); + socket->send_q.cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": socket.send_q.cs"); addref_object( &request->hdr ); socket->request = request; @@ -3125,10 +3136,179 @@ HINTERNET WINAPI WinHttpWebSocketCompleteUpgrade( HINTERNET hrequest, DWORD_PTR return hsocket; } +static DWORD send_bytes( struct netconn *netconn, char *bytes, int len ) +{ + int count; + DWORD err; + if ((err = netconn_send( netconn, bytes, len, &count ))) return err; + return (count == len) ? ERROR_SUCCESS : ERROR_INTERNAL_ERROR; +} + +/* rfc6455 */ +enum opcode +{ + OPCODE_CONTINUE = 0x00, + OPCODE_TEXT = 0x01, + OPCODE_BINARY = 0x02, + OPCODE_RESERVED3 = 0x03, + OPCODE_RESERVED4 = 0x04, + OPCODE_RESERVED5 = 0x05, + OPCODE_RESERVED6 = 0x06, + OPCODE_RESERVED7 = 0x07, + OPCODE_CLOSE = 0x08, + OPCODE_PING = 0x09, + OPCODE_PONG = 0x0a, + OPCODE_INVALID = 0xff, +}; + +static enum opcode map_buffer_type( WINHTTP_WEB_SOCKET_BUFFER_TYPE type ) +{ + switch (type) + { + case WINHTTP_WEB_SOCKET_UTF8_MESSAGE_BUFFER_TYPE: return OPCODE_TEXT; + case WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE: return OPCODE_BINARY; + case WINHTTP_WEB_SOCKET_CLOSE_BUFFER_TYPE: return OPCODE_CLOSE; + default: + FIXME("buffer type %u not supported\n", type); + return OPCODE_INVALID; + } +} + +#define FIN_BIT (1 << 7) +#define MASK_BIT (1 << 7) +#define RESERVED_BIT (7 << 4) + +static DWORD send_frame( struct netconn *netconn, WINHTTP_WEB_SOCKET_BUFFER_TYPE type, USHORT status, const char *buf, + DWORD buflen, BOOL final ) +{ + DWORD i = 0, j, ret, offset = 2, len = buflen; + enum opcode opcode = map_buffer_type( type ); + char hdr[14], byte, *mask; + + if (opcode == OPCODE_CLOSE) len += sizeof(status); + + hdr[0] = final ? (char)FIN_BIT : 0; + hdr[0] |= opcode; + hdr[1] = (char)MASK_BIT; + if (len < 126) hdr[1] |= len; + else if (len < 65536) + { + hdr[1] |= 126; + hdr[2] = len >> 8; + hdr[3] = len & 0xff; + offset += 2; + } + else + { + hdr[1] |= 127; + hdr[2] = hdr[3] = hdr[4] = hdr[5] = 0; + hdr[6] = len >> 24; + hdr[7] = (len >> 16) & 0xff; + hdr[8] = (len >> 8) & 0xff; + hdr[9] = len & 0xff; + offset += 8; + } + mask = &hdr[offset]; + RtlGenRandom( mask, 4 ); + if ((ret = send_bytes( netconn, hdr, offset + 4 ))) return ret; + + if (opcode == OPCODE_CLOSE) /* prepend status code */ + { + byte = (status >> 8) ^ mask[i++ % 4]; + if ((ret = send_bytes( netconn, &byte, 1 ))) return ret; + + byte = (status & 0xff) ^ mask[i++ % 4]; + if ((ret = send_bytes( netconn, &byte, 1 ))) return ret; + } + + for (j = 0; j < buflen; j++) + { + byte = buf[j] ^ mask[i++ % 4]; + if ((ret = send_bytes( netconn, &byte, 1 ))) return ret; + } + + return ERROR_SUCCESS; +} + +static DWORD socket_send( struct socket *socket, WINHTTP_WEB_SOCKET_BUFFER_TYPE type, const void *buf, DWORD len, + BOOL async ) +{ + DWORD ret; + + ret = send_frame( socket->request->netconn, type, 0, buf, len, TRUE ); + if (async) + { + if (!ret) + { + WINHTTP_WEB_SOCKET_STATUS status; + status.dwBytesTransferred = len; + status.eBufferType = type; + send_callback( &socket->hdr, WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE, &status, sizeof(status) ); + } + else + { + WINHTTP_WEB_SOCKET_ASYNC_RESULT result; + result.AsyncResult.dwResult = API_WRITE_DATA; + result.AsyncResult.dwError = ret; + result.Operation = WINHTTP_WEB_SOCKET_SEND_OPERATION; + send_callback( &socket->hdr, WINHTTP_CALLBACK_STATUS_REQUEST_ERROR, &result, sizeof(result) ); + } + } + return ret; +} + +static void task_socket_send( struct task_header *task ) +{ + struct socket *socket = (struct socket *)task->object; + struct socket_send *s = (struct socket_send *)task; + + socket_send( socket, s->type, s->buf, s->len, TRUE ); +} + DWORD WINAPI WinHttpWebSocketSend( HINTERNET hsocket, WINHTTP_WEB_SOCKET_BUFFER_TYPE type, void *buf, DWORD len ) { - FIXME("%p, %u, %p, %u\n", hsocket, type, buf, len); - return ERROR_INVALID_PARAMETER; + struct socket *socket; + DWORD ret; + + TRACE("%p, %u, %p, %u\n", hsocket, type, buf, len); + + if (len && !buf) return ERROR_INVALID_PARAMETER; + if (type != WINHTTP_WEB_SOCKET_UTF8_MESSAGE_BUFFER_TYPE && type != WINHTTP_WEB_SOCKET_BINARY_MESSAGE_BUFFER_TYPE) + { + FIXME("buffer type %u not supported\n", type); + return ERROR_NOT_SUPPORTED; + } + + if (!(socket = (struct socket *)grab_object( hsocket ))) return ERROR_INVALID_HANDLE; + if (socket->hdr.type != WINHTTP_HANDLE_TYPE_SOCKET) + { + release_object( &socket->hdr ); + return ERROR_WINHTTP_INCORRECT_HANDLE_TYPE; + } + if (socket->state != SOCKET_STATE_OPEN) + { + release_object( &socket->hdr ); + return ERROR_WINHTTP_INCORRECT_HANDLE_STATE; + } + + if (socket->request->connect->hdr.flags & WINHTTP_FLAG_ASYNC) + { + struct socket_send *s; + + if (!(s = heap_alloc( sizeof(*s) ))) return FALSE; + s->hdr.object = &socket->hdr; + s->hdr.proc = task_socket_send; + s->type = type; + s->buf = buf; + s->len = len; + + addref_object( &socket->hdr ); + ret = queue_task( &socket->hdr, &socket->send_q, (struct task_header *)s ); + } + else ret = socket_send( socket, type, buf, len, FALSE ); + + release_object( &socket->hdr ); + return ret; } DWORD WINAPI WinHttpWebSocketReceive( HINTERNET hsocket, void *buf, DWORD len, DWORD *read, diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h index 207696e674..d9e99651ab 100644 --- a/dlls/winhttp/winhttp_private.h +++ b/dlls/winhttp/winhttp_private.h @@ -214,10 +214,19 @@ struct request } creds[TARGET_MAX][SCHEME_MAX]; }; +enum socket_state +{ + SOCKET_STATE_OPEN = 0, + SOCKET_STATE_SHUTDOWN = 1, + SOCKET_STATE_CLOSED = 2, +}; + struct socket { struct object_header hdr; struct request *request; + enum socket_state state; + struct queue send_q; }; struct task_header @@ -265,6 +274,14 @@ struct write_data DWORD *written; }; +struct socket_send +{ + struct task_header hdr; + WINHTTP_WEB_SOCKET_BUFFER_TYPE type; + const void *buf; + DWORD len; +}; + struct object_header *addref_object( struct object_header * ) DECLSPEC_HIDDEN; struct object_header *grab_object( HINTERNET ) DECLSPEC_HIDDEN; void release_object( struct object_header * ) DECLSPEC_HIDDEN;
1
0
0
0
Rémi Bernon : ntdll: Leave some space around DbgBreakPoint and DbgUserBreakPoint.
by Alexandre Julliard
24 Jun '20
24 Jun '20
Module: wine Branch: master Commit: f5a8ed47a3fb4cdb9066899303f03565001b4cc7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f5a8ed47a3fb4cdb90668993…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Jun 24 10:03:10 2020 +0200 ntdll: Leave some space around DbgBreakPoint and DbgUserBreakPoint. CoD: Black Ops 3 and CoD: WWII modify these (and several others) and expect to have enough space for a few instructions. It then verifies later that the patches are still in place, and terminates if the byte sequence do not match. Having small symbols can make the patches to overlap and the check to fail. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_arm64.c | 8 ++++++-- dlls/ntdll/signal_i386.c | 8 ++++++-- dlls/ntdll/signal_x86_64.c | 8 ++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index 0159888f7a..ddced4e0ba 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -1358,12 +1358,16 @@ USHORT WINAPI RtlCaptureStackBackTrace( ULONG skip, ULONG count, PVOID *buffer, /********************************************************************** * DbgBreakPoint (NTDLL.@) */ -__ASM_STDCALL_FUNC( DbgBreakPoint, 0, "brk #0; ret") +__ASM_STDCALL_FUNC( DbgBreakPoint, 0, "brk #0; ret" + "\n\tnop; nop; nop; nop; nop; nop; nop; nop" + "\n\tnop; nop; nop; nop; nop; nop" ); /********************************************************************** * DbgUserBreakPoint (NTDLL.@) */ -__ASM_STDCALL_FUNC( DbgUserBreakPoint, 0, "brk #0; ret") +__ASM_STDCALL_FUNC( DbgUserBreakPoint, 0, "brk #0; ret" + "\n\tnop; nop; nop; nop; nop; nop; nop; nop" + "\n\tnop; nop; nop; nop; nop; nop" ); /********************************************************************** * NtCurrentTeb (NTDLL.@) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index bda19bf463..d91d19f043 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -555,12 +555,16 @@ USHORT WINAPI RtlCaptureStackBackTrace( ULONG skip, ULONG count, PVOID *buffer, /********************************************************************** * DbgBreakPoint (NTDLL.@) */ -__ASM_STDCALL_FUNC( DbgBreakPoint, 0, "int $3; ret") +__ASM_STDCALL_FUNC( DbgBreakPoint, 0, "int $3; ret" + "\n\tnop; nop; nop; nop; nop; nop; nop; nop" + "\n\tnop; nop; nop; nop; nop; nop" ); /********************************************************************** * DbgUserBreakPoint (NTDLL.@) */ -__ASM_STDCALL_FUNC( DbgUserBreakPoint, 0, "int $3; ret") +__ASM_STDCALL_FUNC( DbgUserBreakPoint, 0, "int $3; ret" + "\n\tnop; nop; nop; nop; nop; nop; nop; nop" + "\n\tnop; nop; nop; nop; nop; nop" ); /********************************************************************** * NtCurrentTeb (NTDLL.@) diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 52f7b73f8b..284522ffae 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -2751,11 +2751,15 @@ USHORT WINAPI RtlCaptureStackBackTrace( ULONG skip, ULONG count, PVOID *buffer, /********************************************************************** * DbgBreakPoint (NTDLL.@) */ -__ASM_STDCALL_FUNC( DbgBreakPoint, 0, "int $3; ret") +__ASM_STDCALL_FUNC( DbgBreakPoint, 0, "int $3; ret" + "\n\tnop; nop; nop; nop; nop; nop; nop; nop" + "\n\tnop; nop; nop; nop; nop; nop" ); /********************************************************************** * DbgUserBreakPoint (NTDLL.@) */ -__ASM_STDCALL_FUNC( DbgUserBreakPoint, 0, "int $3; ret") +__ASM_STDCALL_FUNC( DbgUserBreakPoint, 0, "int $3; ret" + "\n\tnop; nop; nop; nop; nop; nop; nop; nop" + "\n\tnop; nop; nop; nop; nop; nop" ); #endif /* __x86_64__ */
1
0
0
0
Alexandre Julliard : ntdll: Set the Wine paths environment variables from the Unix library.
by Alexandre Julliard
24 Jun '20
24 Jun '20
Module: wine Branch: master Commit: 438abad27c797ca806938188f725fb0e36aa9fb9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=438abad27c797ca806938188…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jun 24 09:21:48 2020 +0200 ntdll: Set the Wine paths environment variables from the Unix library. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/env.c | 163 +++++------------------------------------ dlls/ntdll/ntdll_misc.h | 4 - dlls/ntdll/server.c | 4 - dlls/ntdll/thread.c | 1 - dlls/ntdll/unix/env.c | 82 +++++++++++++++++++++ dlls/ntdll/unix/loader.c | 30 +------- dlls/ntdll/unix/unix_private.h | 2 + dlls/ntdll/unixlib.h | 5 +- 8 files changed, 105 insertions(+), 186 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=438abad27c797ca80693…
1
0
0
0
Alexandre Julliard : ntdll: Store home directory and username at init time in the Unix library.
by Alexandre Julliard
24 Jun '20
24 Jun '20
Module: wine Branch: master Commit: 36e55720b66743d161330183693949e4f8503cc7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=36e55720b66743d161330183…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jun 24 09:20:33 2020 +0200 ntdll: Store home directory and username at init time in the Unix library. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/loader.c | 38 +++++++++++++++++++++++++++++--------- dlls/ntdll/unix/unix_private.h | 2 ++ 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index 73c24eff54..1045870f9b 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -123,9 +123,11 @@ static const char *dll_dir; static const char **dll_paths; static SIZE_T dll_path_maxlen; +const char *home_dir = NULL; const char *data_dir = NULL; const char *build_dir = NULL; const char *config_dir = NULL; +const char *user_name = NULL; HMODULE ntdll_module = NULL; struct file_id @@ -285,6 +287,29 @@ static void set_dll_path(void) } +static void set_home_dir(void) +{ + const char *home = getenv( "HOME" ); + const char *name = getenv( "USER" ); + const char *p; + + if (!home || !name) + { + struct passwd *pwd = getpwuid( getuid() ); + if (pwd) + { + if (!home) home = pwd->pw_dir; + if (!name) name = pwd->pw_name; + } + if (!name) name = "wine"; + } + if ((p = strrchr( name, '/' ))) name = p + 1; + if ((p = strrchr( name, '\\' ))) name = p + 1; + home_dir = strdup( home ); + user_name = strdup( name ); +} + + static void set_config_dir(void) { char *p, *dir; @@ -299,15 +324,9 @@ static void set_config_dir(void) } else { - const char *home = getenv( "HOME" ); - if (!home) - { - struct passwd *pwd = getpwuid( getuid() ); - if (pwd) home = pwd->pw_dir; - } - if (!home) fatal_error( "could not determine your home directory\n" ); - if (home[0] != '/') fatal_error( "your home directory %s is not an absolute path\n", home ); - config_dir = build_path( home, ".wine" ); + if (!home_dir) fatal_error( "could not determine your home directory\n" ); + if (home_dir[0] != '/') fatal_error( "the home directory %s is not an absolute path\n", home_dir ); + config_dir = build_path( home_dir, ".wine" ); } } @@ -334,6 +353,7 @@ static void init_paths( int argc, char *argv[], char *envp[] ) } set_dll_path(); + set_home_dir(); set_config_dir(); } diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index 7dbfde43b3..7942aaf62e 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -124,9 +124,11 @@ extern NTSTATUS CDECL nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_ST extern NTSTATUS CDECL unix_to_nt_file_name( const ANSI_STRING *name, UNICODE_STRING *nt ) DECLSPEC_HIDDEN; extern void CDECL set_show_dot_files( BOOL enable ) DECLSPEC_HIDDEN; +extern const char *home_dir DECLSPEC_HIDDEN; extern const char *data_dir DECLSPEC_HIDDEN; extern const char *build_dir DECLSPEC_HIDDEN; extern const char *config_dir DECLSPEC_HIDDEN; +extern const char *user_name DECLSPEC_HIDDEN; extern HMODULE ntdll_module DECLSPEC_HIDDEN; extern USHORT *uctable DECLSPEC_HIDDEN; extern USHORT *lctable DECLSPEC_HIDDEN;
1
0
0
0
Vijay Kiran Kamuju : include: Add missing device GUIDs and fsfilter GUIDs.
by Alexandre Julliard
24 Jun '20
24 Jun '20
Module: wine Branch: master Commit: 59ff149a299891bc7245ef9c051b9a21155a0050 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=59ff149a299891bc7245ef9c…
Author: Vijay Kiran Kamuju <infyquest(a)gmail.com> Date: Wed Jun 24 01:15:04 2020 +0200 include: Add missing device GUIDs and fsfilter GUIDs. Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/devguid.h | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=59ff149a299891bc7245…
1
0
0
0
Vijay Kiran Kamuju : directmanipulation: Implement IDirectManipulationCompositor2 stub interface.
by Alexandre Julliard
24 Jun '20
24 Jun '20
Module: wine Branch: master Commit: 774bb38fd5d515d81d84d6527cde55138562e280 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=774bb38fd5d515d81d84d652…
Author: Vijay Kiran Kamuju <infyquest(a)gmail.com> Date: Wed Jun 24 00:58:18 2020 +0200 directmanipulation: Implement IDirectManipulationCompositor2 stub interface. Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/directmanipulation/directmanip.idl | 1 + dlls/directmanipulation/directmanipulation.c | 62 ++++++++++++++++------------ include/directmanipulation.idl | 13 ++++++ 3 files changed, 50 insertions(+), 26 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=774bb38fd5d515d81d84…
1
0
0
0
Alistair Leslie-Hughes : directmanipulation: Fake success from IDirectManipulationViewPort2::SetViewPortRect.
by Alexandre Julliard
24 Jun '20
24 Jun '20
Module: wine Branch: master Commit: b228983abdb8de82861f2b94712463c013107119 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b228983abdb8de82861f2b94…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Jun 24 00:50:39 2020 +0200 directmanipulation: Fake success from IDirectManipulationViewPort2::SetViewPortRect. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=44865
Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/directmanipulation/directmanipulation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c index 1460872020..053955ec3a 100644 --- a/dlls/directmanipulation/directmanipulation.c +++ b/dlls/directmanipulation/directmanipulation.c @@ -540,7 +540,7 @@ static HRESULT WINAPI viewport_SetViewportRect(IDirectManipulationViewport2 *ifa { struct directviewport *This = impl_from_IDirectManipulationViewport2(iface); FIXME("%p, %p\n", This, viewport); - return E_NOTIMPL; + return S_OK; } static HRESULT WINAPI viewport_ZoomToRect(IDirectManipulationViewport2 *iface, const float left,
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
95
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
Results per page:
10
25
50
100
200