wininet: Use proc instead of enum in INTERNETREADFILEEXA request.

This commit is contained in:
Jacek Caban 2006-12-25 21:33:56 +01:00 committed by Alexandre Julliard
parent 8c3ca8d817
commit 662c885a0b
2 changed files with 13 additions and 14 deletions

View File

@ -1810,6 +1810,17 @@ BOOL WINAPI InternetReadFile(HINTERNET hFile, LPVOID lpBuffer,
* SEE * SEE
* InternetOpenUrlA(), HttpOpenRequestA() * InternetOpenUrlA(), HttpOpenRequestA()
*/ */
void AsyncInternetReadFileExProc(WORKREQUEST *workRequest)
{
struct WORKREQ_INTERNETREADFILEEXA const *req = &workRequest->u.InternetReadFileExA;
TRACE("INTERNETREADFILEEXA %p\n", workRequest->hdr);
INTERNET_ReadFile(workRequest->hdr, req->lpBuffersOut->lpvBuffer,
req->lpBuffersOut->dwBufferLength,
&req->lpBuffersOut->dwBufferLength, TRUE, TRUE);
}
BOOL WINAPI InternetReadFileExA(HINTERNET hFile, LPINTERNET_BUFFERSA lpBuffersOut, BOOL WINAPI InternetReadFileExA(HINTERNET hFile, LPINTERNET_BUFFERSA lpBuffersOut,
DWORD dwFlags, DWORD dwContext) DWORD dwFlags, DWORD dwContext)
{ {
@ -1844,7 +1855,8 @@ BOOL WINAPI InternetReadFileExA(HINTERNET hFile, LPINTERNET_BUFFERSA lpBuffersOu
WORKREQUEST workRequest; WORKREQUEST workRequest;
struct WORKREQ_INTERNETREADFILEEXA *req; struct WORKREQ_INTERNETREADFILEEXA *req;
workRequest.asyncall = INTERNETREADFILEEXA; workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncInternetReadFileExProc;
workRequest.hdr = WININET_AddRef( lpwh ); workRequest.hdr = WININET_AddRef( lpwh );
req = &workRequest.u.InternetReadFileExA; req = &workRequest.u.InternetReadFileExA;
req->lpBuffersOut = lpBuffersOut; req->lpBuffersOut = lpBuffersOut;
@ -3376,18 +3388,6 @@ static VOID INTERNET_ExecuteWork(void)
FTP_FindNextFileW(lpwh, req->lpFindFileData); FTP_FindNextFileW(lpwh, req->lpFindFileData);
} }
break; break;
case INTERNETREADFILEEXA:
{
struct WORKREQ_INTERNETREADFILEEXA *req = &workRequest.u.InternetReadFileExA;
TRACE("INTERNETREADFILEEXA %p\n", workRequest.hdr);
INTERNET_ReadFile(workRequest.hdr, req->lpBuffersOut->lpvBuffer,
req->lpBuffersOut->dwBufferLength,
&req->lpBuffersOut->dwBufferLength, TRUE, TRUE);
}
break;
} }
WININET_Release( workRequest.hdr ); WININET_Release( workRequest.hdr );
} }

View File

@ -261,7 +261,6 @@ typedef enum
FTPREMOVEDIRECTORYW, FTPREMOVEDIRECTORYW,
FTPRENAMEFILEW, FTPRENAMEFILEW,
FTPFINDNEXTW, FTPFINDNEXTW,
INTERNETREADFILEEXA,
} ASYNC_FUNC; } ASYNC_FUNC;
struct WORKREQ_FTPPUTFILEW struct WORKREQ_FTPPUTFILEW