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
*
*/
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,
LPDWORD lpdwCurrentDirectory)
{
@ -858,8 +868,9 @@ BOOL WINAPI FtpGetCurrentDirectoryW(HINTERNET hFtpSession, LPWSTR lpszCurrentDir
WORKREQUEST workRequest;
struct WORKREQ_FTPGETCURRENTDIRECTORYW *req;
workRequest.asyncall = FTPGETCURRENTDIRECTORYW;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
workRequest.asyncall = CALLASYNCPROC;
workRequest.asyncproc = AsyncFtpGetCurrentDirectoryProc;
workRequest.hdr = WININET_AddRef( &lpwfs->hdr );
req = &workRequest.u.FtpGetCurrentDirectoryW;
req->lpszDirectory = lpszCurrentDirectory;
req->lpdwDirectory = lpdwCurrentDirectory;

View File

@ -3243,19 +3243,6 @@ static VOID INTERNET_ExecuteWork(void)
workRequest.asyncproc(&workRequest);
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:
{
struct WORKREQ_FTPOPENFILEW *req = &workRequest.u.FtpOpenFileW;

View File

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