wininet: Use proc instead of enum in FTPGETCURRENTDIRECTORYW request.

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

View File

@ -836,6 +836,16 @@ BOOL WINAPI FtpGetCurrentDirectoryA(HINTERNET hFtpSession, LPSTR lpszCurrentDire
* FALSE on failure * FALSE on failure
* *
*/ */
static void AsyncFtpGetCurrentDirectoryProc(WORKREQUEST *workRequest)
{
struct WORKREQ_FTPGETCURRENTDIRECTORYW const *req = &workRequest->u.FtpGetCurrentDirectoryW;
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest->hdr;
TRACE("%p\n", lpwfs);
FTP_FtpGetCurrentDirectoryW(lpwfs, req->lpszDirectory, req->lpdwDirectory);
}
BOOL WINAPI FtpGetCurrentDirectoryW(HINTERNET hFtpSession, LPWSTR lpszCurrentDirectory, BOOL WINAPI FtpGetCurrentDirectoryW(HINTERNET hFtpSession, LPWSTR lpszCurrentDirectory,
LPDWORD lpdwCurrentDirectory) LPDWORD lpdwCurrentDirectory)
{ {
@ -858,7 +868,8 @@ BOOL WINAPI FtpGetCurrentDirectoryW(HINTERNET hFtpSession, LPWSTR lpszCurrentDir
WORKREQUEST workRequest; WORKREQUEST workRequest;
struct WORKREQ_FTPGETCURRENTDIRECTORYW *req; struct WORKREQ_FTPGETCURRENTDIRECTORYW *req;
workRequest.asyncall = FTPGETCURRENTDIRECTORYW; workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpGetCurrentDirectoryProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr ); workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpGetCurrentDirectoryW; req = &workRequest.u.FtpGetCurrentDirectoryW;
req->lpszDirectory = lpszCurrentDirectory; req->lpszDirectory = lpszCurrentDirectory;

View File

@ -3243,19 +3243,6 @@ static VOID INTERNET_ExecuteWork(void)
workRequest.asyncproc(&workRequest); workRequest.asyncproc(&workRequest);
break; break;
case FTPGETCURRENTDIRECTORYW:
{
struct WORKREQ_FTPGETCURRENTDIRECTORYW *req;
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest.hdr;
TRACE("FTPGETCURRENTDIRECTORYW %p\n", lpwfs);
req = &workRequest.u.FtpGetCurrentDirectoryW;
FTP_FtpGetCurrentDirectoryW(lpwfs,
req->lpszDirectory, req->lpdwDirectory);
}
break;
case FTPOPENFILEW: case FTPOPENFILEW:
{ {
struct WORKREQ_FTPOPENFILEW *req = &workRequest.u.FtpOpenFileW; struct WORKREQ_FTPOPENFILEW *req = &workRequest.u.FtpOpenFileW;

View File

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