wininet: Use proc instead of enum in FTPOPENFILEW request.

This commit is contained in:
Jacek Caban 2006-12-25 21:35:36 +01:00 committed by Alexandre Julliard
parent 3b77ff24c2
commit 3c90016f2f
3 changed files with 15 additions and 16 deletions

View File

@ -1003,6 +1003,18 @@ HINTERNET WINAPI FtpOpenFileA(HINTERNET hFtpSession,
* NULL on failure
*
*/
static void AsyncFtpOpenFileProc(WORKREQUEST *workRequest)
{
struct WORKREQ_FTPOPENFILEW const *req = &workRequest->u.FtpOpenFileW;
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest->hdr;
TRACE("%p\n", lpwfs);
FTP_FtpOpenFileW(lpwfs, req->lpszFilename,
req->dwAccess, req->dwFlags, req->dwContext);
HeapFree(GetProcessHeap(), 0, req->lpszFilename);
}
HINTERNET WINAPI FtpOpenFileW(HINTERNET hFtpSession,
LPCWSTR lpszFileName, DWORD fdwAccess, DWORD dwFlags,
DWORD dwContext)
@ -1031,8 +1043,9 @@ HINTERNET WINAPI FtpOpenFileW(HINTERNET hFtpSession,
WORKREQUEST workRequest;
struct WORKREQ_FTPOPENFILEW *req;
workRequest.asyncall = FTPOPENFILEW;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpOpenFileProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpOpenFileW;
req->lpszFilename = WININET_strdupW(lpszFileName);
req->dwAccess = fdwAccess;

View File

@ -3243,19 +3243,6 @@ static VOID INTERNET_ExecuteWork(void)
workRequest.asyncproc(&workRequest);
break;
case FTPOPENFILEW:
{
struct WORKREQ_FTPOPENFILEW *req = &workRequest.u.FtpOpenFileW;
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest.hdr;
TRACE("FTPOPENFILEW %p\n", lpwfs);
FTP_FtpOpenFileW(lpwfs, req->lpszFilename,
req->dwAccess, req->dwFlags, req->dwContext);
HeapFree(GetProcessHeap(), 0, req->lpszFilename);
}
break;
case FTPGETFILEW:
{
struct WORKREQ_FTPGETFILEW *req = &workRequest.u.FtpGetFileW;

View File

@ -250,7 +250,6 @@ typedef struct
typedef enum
{
CALLASYNCPROC,
FTPOPENFILEW,
FTPGETFILEW,
FTPDELETEFILEW,
FTPREMOVEDIRECTORYW,