diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c index 92dba6f4367..e69256a91f1 100644 --- a/dlls/wininet/ftp.c +++ b/dlls/wininet/ftp.c @@ -499,6 +499,17 @@ BOOL WINAPI FtpCreateDirectoryA(HINTERNET hConnect, LPCSTR lpszDirectory) * FALSE on failure * */ +static void AsyncFtpCreateDirectoryProc(WORKREQUEST *workRequest) +{ + struct WORKREQ_FTPCREATEDIRECTORYW const *req = &workRequest->u.FtpCreateDirectoryW; + LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest->hdr; + + TRACE(" %p\n", lpwfs); + + FTP_FtpCreateDirectoryW(lpwfs, req->lpszDirectory); + HeapFree(GetProcessHeap(), 0, req->lpszDirectory); +} + BOOL WINAPI FtpCreateDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory) { LPWININETFTPSESSIONW lpwfs; @@ -518,8 +529,9 @@ BOOL WINAPI FtpCreateDirectoryW(HINTERNET hConnect, LPCWSTR lpszDirectory) WORKREQUEST workRequest; struct WORKREQ_FTPCREATEDIRECTORYW *req; - workRequest.asyncall = FTPCREATEDIRECTORYW; - workRequest.hdr = WININET_AddRef( &lpwfs->hdr ); + workRequest.asyncall = CALLASYNCPROC; + workRequest.asyncproc = AsyncFtpCreateDirectoryProc; + workRequest.hdr = WININET_AddRef( &lpwfs->hdr ); req = &workRequest.u.FtpCreateDirectoryW; req->lpszDirectory = WININET_strdupW(lpszDirectory); diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 0e57aef94bd..0ff59e3a520 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -3243,19 +3243,6 @@ static VOID INTERNET_ExecuteWork(void) workRequest.asyncproc(&workRequest); break; - case FTPCREATEDIRECTORYW: - { - struct WORKREQ_FTPCREATEDIRECTORYW *req; - LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) workRequest.hdr; - - TRACE("FTPCREATEDIRECTORYW %p\n", lpwfs); - - req = &workRequest.u.FtpCreateDirectoryW; - FTP_FtpCreateDirectoryW(lpwfs, req->lpszDirectory); - HeapFree(GetProcessHeap(), 0, req->lpszDirectory); - } - break; - case FTPFINDFIRSTFILEW: { struct WORKREQ_FTPFINDFIRSTFILEW *req; diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index 1a7b2b65a6d..85373b08361 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -250,7 +250,6 @@ typedef struct typedef enum { CALLASYNCPROC, - FTPCREATEDIRECTORYW, FTPFINDFIRSTFILEW, FTPGETCURRENTDIRECTORYW, FTPOPENFILEW,