reactos/dll/win32/mswsock/extensions.c
Amine Khaldi c424146e2c Create a branch for cmake bringup.
svn path=/branches/cmake-bringup/; revision=48236
2010-07-24 18:52:44 +00:00

54 lines
1.4 KiB
C

/* $Id: stubs.c 12852 2005-01-06 13:58:04Z mf $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS WinSock DLL
* FILE: stubs.c
* PURPOSE: WSAIoctl wrappers for Microsoft extensions to Winsock
* PROGRAMMERS: KJK::Hyperion <hackbunny@reactos.com>
* REVISIONS:
*/
#include <windows.h>
#include <winsock2.h>
#include <mswsock.h>
/*
* @implemented
*/
BOOL
WINAPI
TransmitFile(SOCKET Socket,
HANDLE File,
DWORD NumberOfBytesToWrite,
DWORD NumberOfBytesPerSend,
LPOVERLAPPED Overlapped,
LPTRANSMIT_FILE_BUFFERS TransmitBuffers,
DWORD Flags)
{
static GUID TransmitFileGUID = WSAID_TRANSMITFILE;
LPFN_TRANSMITFILE pfnTransmitFile;
DWORD cbBytesReturned;
if (WSAIoctl(Socket,
SIO_GET_EXTENSION_FUNCTION_POINTER,
&TransmitFileGUID,
sizeof(TransmitFileGUID),
&pfnTransmitFile,
sizeof(pfnTransmitFile),
&cbBytesReturned,
NULL,
NULL) == SOCKET_ERROR)
{
return FALSE;
}
return pfnTransmitFile(Socket,
File,
NumberOfBytesToWrite,
NumberOfBytesPerSend,
Overlapped,
TransmitBuffers,
Flags);
}
/* EOF */