winhttp: Implement WinHttpQueryDataAvailable.
This commit is contained in:
parent
b170ac20dd
commit
d7f5467652
|
@ -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.@)
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue