From: "Erich E. Hoover" Subject: [PATCH 1/5] ws2_32: Add stub for TransmitFile. Message-Id: Date: Sat, 3 Oct 2015 14:37:34 -0600 This patch series is for fixing Bug #5048 (implementing TransmitFile). We have been mulling over several different solutions to implementing this in staging and finally have a version we are happy with. This solution re-uses the existing register_async infrastructure for asynchronous socket operations, making it relatively easy to process large TransmitFile operations in the background. A great deal of thanks go to Sebastian Lackner for reviewing this patchset many, many, ... many times. This particular patch just adds the TransmitFile stub function so that SIO_GET_EXTENSION_FUNCTION_POINTER has something to return to the calling application. From 41e54c06f3c195114c060d996a21e1ec9c069244 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Thu, 16 Jan 2014 17:52:50 -0700 Subject: ws2_32: Add stub for TransmitFile. Signed-off-by: Erich E. Hoover --- dlls/ws2_32/socket.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 5cf3e0f..a5f83aa 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -2725,6 +2725,19 @@ static BOOL WINAPI WS2_AcceptEx(SOCKET listener, SOCKET acceptor, PVOID dest, DW } /*********************************************************************** + * TransmitFile + */ +static BOOL WINAPI WS2_TransmitFile( SOCKET s, HANDLE h, DWORD file_bytes, DWORD bytes_per_send, + LPOVERLAPPED overlapped, LPTRANSMIT_FILE_BUFFERS buffers, + DWORD flags ) +{ + FIXME("(%lx, %p, %d, %d, %p, %p, %d): stub !\n", s, h, file_bytes, bytes_per_send, overlapped, + buffers, flags ); + WSASetLastError( WSAEOPNOTSUPP ); + return FALSE; +} + +/*********************************************************************** * GetAcceptExSockaddrs */ static void WINAPI WS2_GetAcceptExSockaddrs(PVOID buffer, DWORD data_size, DWORD local_size, DWORD remote_size, @@ -4430,7 +4443,8 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID } else if ( IsEqualGUID(&transmitfile_guid, in_buff) ) { - FIXME("SIO_GET_EXTENSION_FUNCTION_POINTER: unimplemented TransmitFile\n"); + *(LPFN_TRANSMITFILE *)out_buff = WS2_TransmitFile; + break; } else if ( IsEqualGUID(&transmitpackets_guid, in_buff) ) { -- 1.9.1