winhttp: Implement WinHttpQueryDataAvailable.

This commit is contained in:
Hans Leidekker 2008-08-26 11:04:22 +02:00 committed by Alexandre Julliard
parent b170ac20dd
commit d7f5467652
2 changed files with 28 additions and 11 deletions

View File

@ -94,17 +94,6 @@ BOOL WINAPI WinHttpQueryOption (HINTERNET hInternet, DWORD dwOption, LPVOID lpBu
return FALSE;
}
/***********************************************************************
* WinHttpQueryDataAvailable (winhttp.@)
*/
BOOL WINAPI WinHttpQueryDataAvailable (HINTERNET hInternet, LPDWORD lpdwNumberOfBytesAvailable)
{
FIXME("stub\n");
SetLastError(ERROR_NOT_SUPPORTED);
return FALSE;
}
/***********************************************************************
* WinHttpSetOption (winhttp.@)
*/

View File

@ -948,3 +948,31 @@ BOOL WINAPI WinHttpReceiveResponse( HINTERNET hrequest, LPVOID reserved )
release_object( &request->hdr );
return ret;
}
/***********************************************************************
* WinHttpQueryDataAvailable (winhttp.@)
*/
BOOL WINAPI WinHttpQueryDataAvailable( HINTERNET hrequest, LPDWORD available )
{
BOOL ret;
request_t *request;
TRACE("%p, %p\n", hrequest, available);
if (!(request = (request_t *)grab_object( hrequest )))
{
set_last_error( ERROR_INVALID_HANDLE );
return FALSE;
}
if (request->hdr.type != WINHTTP_HANDLE_TYPE_REQUEST)
{
release_object( &request->hdr );
set_last_error( ERROR_WINHTTP_INCORRECT_HANDLE_TYPE );
return FALSE;
}
ret = netconn_query_data_available( &request->netconn, available );
release_object( &request->hdr );
return ret;
}