Commit 44d633a9 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Rename WININETHANDLEHEADER to object_header_t.

wininet struct names are very unreadable and I hope that patches renaming them will be accepted.
parent cf2e8619
......@@ -72,7 +72,7 @@ typedef struct _WININETFTPSESSIONW WININETFTPSESSIONW;
typedef struct
{
WININETHANDLEHEADER hdr;
object_header_t hdr;
WININETFTPSESSIONW *lpFtpSession;
BOOL session_deleted;
int nDataSocket;
......@@ -80,7 +80,7 @@ typedef struct
typedef struct _WININETFTPSESSIONW
{
WININETHANDLEHEADER hdr;
object_header_t hdr;
WININETAPPINFOW *lpAppInfo;
int sndSocket;
int lstnSocket;
......@@ -103,7 +103,7 @@ typedef struct
typedef struct
{
WININETHANDLEHEADER hdr;
object_header_t hdr;
WININETFTPSESSIONW *lpFtpSession;
DWORD index;
DWORD size;
......@@ -172,7 +172,7 @@ static const CHAR szMonths[] = "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";
static const WCHAR szNoAccount[] = {'n','o','a','c','c','o','u','n','t','\0'};
static BOOL FTP_SendCommand(INT nSocket, FTP_COMMAND ftpCmd, LPCWSTR lpszParam,
INTERNET_STATUS_CALLBACK lpfnStatusCB, LPWININETHANDLEHEADER hdr, DWORD_PTR dwContext);
INTERNET_STATUS_CALLBACK lpfnStatusCB, object_header_t *hdr, DWORD_PTR dwContext);
static BOOL FTP_SendStore(LPWININETFTPSESSIONW lpwfs, LPCWSTR lpszRemoteFile, DWORD dwType);
static BOOL FTP_GetDataSocket(LPWININETFTPSESSIONW lpwfs, LPINT nDataSocket);
static BOOL FTP_SendData(LPWININETFTPSESSIONW lpwfs, INT nDataSocket, HANDLE hFile);
......@@ -1084,7 +1084,7 @@ lend:
* the 'transfer complete' message (this is a bit of a hack though :-/ )
*
*/
static void FTPFILE_Destroy(WININETHANDLEHEADER *hdr)
static void FTPFILE_Destroy(object_header_t *hdr)
{
LPWININETFTPFILE lpwh = (LPWININETFTPFILE) hdr;
LPWININETFTPSESSIONW lpwfs = lpwh->lpFtpSession;
......@@ -1106,7 +1106,7 @@ static void FTPFILE_Destroy(WININETHANDLEHEADER *hdr)
HeapFree(GetProcessHeap(), 0, lpwh);
}
static DWORD FTPFILE_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)
static DWORD FTPFILE_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)
{
switch(option) {
case INTERNET_OPTION_HANDLE_TYPE:
......@@ -1123,7 +1123,7 @@ static DWORD FTPFILE_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b
return INET_QueryOption(option, buffer, size, unicode);
}
static DWORD FTPFILE_ReadFile(WININETHANDLEHEADER *hdr, void *buffer, DWORD size, DWORD *read)
static DWORD FTPFILE_ReadFile(object_header_t *hdr, void *buffer, DWORD size, DWORD *read)
{
WININETFTPFILE *file = (WININETFTPFILE*)hdr;
int res;
......@@ -1138,19 +1138,19 @@ static DWORD FTPFILE_ReadFile(WININETHANDLEHEADER *hdr, void *buffer, DWORD size
return res>=0 ? ERROR_SUCCESS : INTERNET_ERROR_BASE; /* FIXME*/
}
static DWORD FTPFILE_ReadFileExA(WININETHANDLEHEADER *hdr, INTERNET_BUFFERSA *buffers,
static DWORD FTPFILE_ReadFileExA(object_header_t *hdr, INTERNET_BUFFERSA *buffers,
DWORD flags, DWORD_PTR context)
{
return FTPFILE_ReadFile(hdr, buffers->lpvBuffer, buffers->dwBufferLength, &buffers->dwBufferLength);
}
static DWORD FTPFILE_ReadFileExW(WININETHANDLEHEADER *hdr, INTERNET_BUFFERSW *buffers,
static DWORD FTPFILE_ReadFileExW(object_header_t *hdr, INTERNET_BUFFERSW *buffers,
DWORD flags, DWORD_PTR context)
{
return FTPFILE_ReadFile(hdr, buffers->lpvBuffer, buffers->dwBufferLength, &buffers->dwBufferLength);
}
static BOOL FTPFILE_WriteFile(WININETHANDLEHEADER *hdr, const void *buffer, DWORD size, DWORD *written)
static BOOL FTPFILE_WriteFile(object_header_t *hdr, const void *buffer, DWORD size, DWORD *written)
{
LPWININETFTPFILE lpwh = (LPWININETFTPFILE) hdr;
int res;
......@@ -1190,7 +1190,7 @@ static void FTPFILE_AsyncQueryDataAvailableProc(WORKREQUEST *workRequest)
FTP_ReceiveRequestData(file, FALSE);
}
static DWORD FTPFILE_QueryDataAvailable(WININETHANDLEHEADER *hdr, DWORD *available, DWORD flags, DWORD_PTR ctx)
static DWORD FTPFILE_QueryDataAvailable(object_header_t *hdr, DWORD *available, DWORD flags, DWORD_PTR ctx)
{
LPWININETFTPFILE file = (LPWININETFTPFILE) hdr;
int retval, unread = 0;
......@@ -1230,7 +1230,7 @@ static DWORD FTPFILE_QueryDataAvailable(WININETHANDLEHEADER *hdr, DWORD *availab
}
static const HANDLEHEADERVtbl FTPFILEVtbl = {
static const object_vtbl_t FTPFILEVtbl = {
FTPFILE_Destroy,
NULL,
FTPFILE_QueryOption,
......@@ -2234,7 +2234,7 @@ lend:
*
* Deallocate session handle
*/
static void FTPSESSION_Destroy(WININETHANDLEHEADER *hdr)
static void FTPSESSION_Destroy(object_header_t *hdr)
{
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) hdr;
......@@ -2247,7 +2247,7 @@ static void FTPSESSION_Destroy(WININETHANDLEHEADER *hdr)
HeapFree(GetProcessHeap(), 0, lpwfs);
}
static void FTPSESSION_CloseConnection(WININETHANDLEHEADER *hdr)
static void FTPSESSION_CloseConnection(object_header_t *hdr)
{
LPWININETFTPSESSIONW lpwfs = (LPWININETFTPSESSIONW) hdr;
......@@ -2272,7 +2272,7 @@ static void FTPSESSION_CloseConnection(WININETHANDLEHEADER *hdr)
INTERNET_STATUS_CONNECTION_CLOSED, 0, 0);
}
static DWORD FTPSESSION_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)
static DWORD FTPSESSION_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)
{
switch(option) {
case INTERNET_OPTION_HANDLE_TYPE:
......@@ -2289,7 +2289,7 @@ static DWORD FTPSESSION_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void
return INET_QueryOption(option, buffer, size, unicode);
}
static const HANDLEHEADERVtbl FTPSESSIONVtbl = {
static const object_vtbl_t FTPSESSIONVtbl = {
FTPSESSION_Destroy,
FTPSESSION_CloseConnection,
FTPSESSION_QueryOption,
......@@ -2548,7 +2548,7 @@ lend:
*
*/
static BOOL FTP_SendCommandA(INT nSocket, FTP_COMMAND ftpCmd, LPCSTR lpszParam,
INTERNET_STATUS_CALLBACK lpfnStatusCB, LPWININETHANDLEHEADER hdr, DWORD_PTR dwContext)
INTERNET_STATUS_CALLBACK lpfnStatusCB, object_header_t *hdr, DWORD_PTR dwContext)
{
DWORD len;
CHAR *buf;
......@@ -2603,7 +2603,7 @@ static BOOL FTP_SendCommandA(INT nSocket, FTP_COMMAND ftpCmd, LPCSTR lpszParam,
*
*/
static BOOL FTP_SendCommand(INT nSocket, FTP_COMMAND ftpCmd, LPCWSTR lpszParam,
INTERNET_STATUS_CALLBACK lpfnStatusCB, LPWININETHANDLEHEADER hdr, DWORD_PTR dwContext)
INTERNET_STATUS_CALLBACK lpfnStatusCB, object_header_t *hdr, DWORD_PTR dwContext)
{
BOOL ret;
LPSTR lpszParamA = lpszParam?WININET_strdup_WtoA(lpszParam):NULL;
......@@ -3285,7 +3285,7 @@ recv_end:
*
* Deallocate session handle
*/
static void FTPFINDNEXT_Destroy(WININETHANDLEHEADER *hdr)
static void FTPFINDNEXT_Destroy(object_header_t *hdr)
{
LPWININETFTPFINDNEXTW lpwfn = (LPWININETFTPFINDNEXTW) hdr;
DWORD i;
......@@ -3343,7 +3343,7 @@ static void FTPFINDNEXT_AsyncFindNextFileProc(WORKREQUEST *workRequest)
FTPFINDNEXT_FindNextFileProc((WININETFTPFINDNEXTW*)workRequest->hdr, req->lpFindFileData);
}
static DWORD FTPFINDNEXT_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)
static DWORD FTPFINDNEXT_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)
{
switch(option) {
case INTERNET_OPTION_HANDLE_TYPE:
......@@ -3360,7 +3360,7 @@ static DWORD FTPFINDNEXT_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, voi
return INET_QueryOption(option, buffer, size, unicode);
}
static DWORD FTPFINDNEXT_FindNextFileW(WININETHANDLEHEADER *hdr, void *data)
static DWORD FTPFINDNEXT_FindNextFileW(object_header_t *hdr, void *data)
{
WININETFTPFINDNEXTW *find = (WININETFTPFINDNEXTW*)hdr;
......@@ -3382,7 +3382,7 @@ static DWORD FTPFINDNEXT_FindNextFileW(WININETHANDLEHEADER *hdr, void *data)
return FTPFINDNEXT_FindNextFileProc(find, data);
}
static const HANDLEHEADERVtbl FTPFINDNEXTVtbl = {
static const object_vtbl_t FTPFINDNEXTVtbl = {
FTPFINDNEXT_Destroy,
NULL,
FTPFINDNEXT_QueryOption,
......
......@@ -1482,7 +1482,7 @@ static BOOL HTTP_ResolveName(LPWININETHTTPREQW lpwhr)
* Deallocate request handle
*
*/
static void HTTPREQ_Destroy(WININETHANDLEHEADER *hdr)
static void HTTPREQ_Destroy(object_header_t *hdr)
{
LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW) hdr;
DWORD i;
......@@ -1539,7 +1539,7 @@ static void HTTPREQ_Destroy(WININETHANDLEHEADER *hdr)
HeapFree(GetProcessHeap(), 0, lpwhr);
}
static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr)
static void HTTPREQ_CloseConnection(object_header_t *hdr)
{
LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW) hdr;
......@@ -1579,7 +1579,7 @@ static BOOL HTTP_GetRequestURL(WININETHTTPREQW *req, LPWSTR buf)
return TRUE;
}
static DWORD HTTPREQ_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)
static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)
{
WININETHTTPREQW *req = (WININETHTTPREQW*)hdr;
......@@ -1778,7 +1778,7 @@ static DWORD HTTPREQ_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b
return INET_QueryOption(option, buffer, size, unicode);
}
static DWORD HTTPREQ_SetOption(WININETHANDLEHEADER *hdr, DWORD option, void *buffer, DWORD size)
static DWORD HTTPREQ_SetOption(object_header_t *hdr, DWORD option, void *buffer, DWORD size)
{
WININETHTTPREQW *req = (WININETHTTPREQW*)hdr;
......@@ -2130,7 +2130,7 @@ done:
}
static DWORD HTTPREQ_ReadFile(WININETHANDLEHEADER *hdr, void *buffer, DWORD size, DWORD *read)
static DWORD HTTPREQ_ReadFile(object_header_t *hdr, void *buffer, DWORD size, DWORD *read)
{
WININETHTTPREQW *req = (WININETHTTPREQW*)hdr;
return HTTPREQ_Read(req, buffer, size, read, TRUE);
......@@ -2156,7 +2156,7 @@ static void HTTPREQ_AsyncReadFileExAProc(WORKREQUEST *workRequest)
sizeof(INTERNET_ASYNC_RESULT));
}
static DWORD HTTPREQ_ReadFileExA(WININETHANDLEHEADER *hdr, INTERNET_BUFFERSA *buffers,
static DWORD HTTPREQ_ReadFileExA(object_header_t *hdr, INTERNET_BUFFERSA *buffers,
DWORD flags, DWORD_PTR context)
{
......@@ -2229,7 +2229,7 @@ static void HTTPREQ_AsyncReadFileExWProc(WORKREQUEST *workRequest)
sizeof(INTERNET_ASYNC_RESULT));
}
static DWORD HTTPREQ_ReadFileExW(WININETHANDLEHEADER *hdr, INTERNET_BUFFERSW *buffers,
static DWORD HTTPREQ_ReadFileExW(object_header_t *hdr, INTERNET_BUFFERSW *buffers,
DWORD flags, DWORD_PTR context)
{
......@@ -2282,7 +2282,7 @@ done:
return res;
}
static BOOL HTTPREQ_WriteFile(WININETHANDLEHEADER *hdr, const void *buffer, DWORD size, DWORD *written)
static BOOL HTTPREQ_WriteFile(object_header_t *hdr, const void *buffer, DWORD size, DWORD *written)
{
BOOL ret;
LPWININETHTTPREQW lpwhr = (LPWININETHTTPREQW)hdr;
......@@ -2304,7 +2304,7 @@ static void HTTPREQ_AsyncQueryDataAvailableProc(WORKREQUEST *workRequest)
HTTP_ReceiveRequestData(req, FALSE);
}
static DWORD HTTPREQ_QueryDataAvailable(WININETHANDLEHEADER *hdr, DWORD *available, DWORD flags, DWORD_PTR ctx)
static DWORD HTTPREQ_QueryDataAvailable(object_header_t *hdr, DWORD *available, DWORD flags, DWORD_PTR ctx)
{
WININETHTTPREQW *req = (WININETHTTPREQW*)hdr;
......@@ -2351,7 +2351,7 @@ done:
return ERROR_SUCCESS;
}
static const HANDLEHEADERVtbl HTTPREQVtbl = {
static const object_vtbl_t HTTPREQVtbl = {
HTTPREQ_Destroy,
HTTPREQ_CloseConnection,
HTTPREQ_QueryOption,
......@@ -3924,7 +3924,7 @@ lend:
* Deallocate session handle
*
*/
static void HTTPSESSION_Destroy(WININETHANDLEHEADER *hdr)
static void HTTPSESSION_Destroy(object_header_t *hdr)
{
LPWININETHTTPSESSIONW lpwhs = (LPWININETHTTPSESSIONW) hdr;
......@@ -3939,7 +3939,7 @@ static void HTTPSESSION_Destroy(WININETHANDLEHEADER *hdr)
HeapFree(GetProcessHeap(), 0, lpwhs);
}
static DWORD HTTPSESSION_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)
static DWORD HTTPSESSION_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)
{
switch(option) {
case INTERNET_OPTION_HANDLE_TYPE:
......@@ -3956,7 +3956,7 @@ static DWORD HTTPSESSION_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, voi
return INET_QueryOption(option, buffer, size, unicode);
}
static DWORD HTTPSESSION_SetOption(WININETHANDLEHEADER *hdr, DWORD option, void *buffer, DWORD size)
static DWORD HTTPSESSION_SetOption(object_header_t *hdr, DWORD option, void *buffer, DWORD size)
{
WININETHTTPSESSIONW *ses = (WININETHTTPSESSIONW*)hdr;
......@@ -3979,7 +3979,7 @@ static DWORD HTTPSESSION_SetOption(WININETHANDLEHEADER *hdr, DWORD option, void
return ERROR_INTERNET_INVALID_OPTION;
}
static const HANDLEHEADERVtbl HTTPSESSIONVtbl = {
static const object_vtbl_t HTTPSESSIONVtbl = {
HTTPSESSION_Destroy,
NULL,
HTTPSESSION_QueryOption,
......
......@@ -101,13 +101,13 @@ static CRITICAL_SECTION_DEBUG WININET_cs_debug =
};
static CRITICAL_SECTION WININET_cs = { &WININET_cs_debug, -1, 0, 0, 0, 0 };
static LPWININETHANDLEHEADER *WININET_Handles;
static object_header_t **WININET_Handles;
static UINT WININET_dwNextHandle;
static UINT WININET_dwMaxHandles;
HINTERNET WININET_AllocHandle( LPWININETHANDLEHEADER info )
HINTERNET WININET_AllocHandle( object_header_t *info )
{
LPWININETHANDLEHEADER *p;
object_header_t **p;
UINT handle = 0, num;
list_init( &info->children );
......@@ -149,16 +149,16 @@ end:
return info->hInternet = (HINTERNET) (handle+1);
}
LPWININETHANDLEHEADER WININET_AddRef( LPWININETHANDLEHEADER info )
object_header_t *WININET_AddRef( object_header_t *info )
{
ULONG refs = InterlockedIncrement(&info->refs);
TRACE("%p -> refcount = %d\n", info, refs );
return info;
}
LPWININETHANDLEHEADER WININET_GetObject( HINTERNET hinternet )
object_header_t *WININET_GetObject( HINTERNET hinternet )
{
LPWININETHANDLEHEADER info = NULL;
object_header_t *info = NULL;
UINT handle = (UINT) hinternet;
EnterCriticalSection( &WININET_cs );
......@@ -174,7 +174,7 @@ LPWININETHANDLEHEADER WININET_GetObject( HINTERNET hinternet )
return info;
}
BOOL WININET_Release( LPWININETHANDLEHEADER info )
BOOL WININET_Release( object_header_t *info )
{
ULONG refs = InterlockedDecrement(&info->refs);
TRACE( "object %p refcount = %d\n", info, refs );
......@@ -205,7 +205,7 @@ BOOL WININET_FreeHandle( HINTERNET hinternet )
{
BOOL ret = FALSE;
UINT handle = (UINT) hinternet;
LPWININETHANDLEHEADER info = NULL, child, next;
object_header_t *info = NULL, *child, *next;
EnterCriticalSection( &WININET_cs );
......@@ -229,7 +229,7 @@ BOOL WININET_FreeHandle( HINTERNET hinternet )
if( info )
{
/* Free all children as native does */
LIST_FOR_EACH_ENTRY_SAFE( child, next, &info->children, WININETHANDLEHEADER, entry )
LIST_FOR_EACH_ENTRY_SAFE( child, next, &info->children, object_header_t, entry )
{
TRACE( "freeing child handle %d for parent handle %d\n",
(UINT)child->hInternet, handle+1);
......@@ -487,7 +487,7 @@ static void dump_INTERNET_FLAGS(DWORD dwFlags)
* Close internet handle
*
*/
static VOID APPINFO_Destroy(WININETHANDLEHEADER *hdr)
static VOID APPINFO_Destroy(object_header_t *hdr)
{
LPWININETAPPINFOW lpwai = (LPWININETAPPINFOW) hdr;
......@@ -501,7 +501,7 @@ static VOID APPINFO_Destroy(WININETHANDLEHEADER *hdr)
HeapFree(GetProcessHeap(), 0, lpwai);
}
static DWORD APPINFO_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)
static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode)
{
LPWININETAPPINFOW ai = (LPWININETAPPINFOW)hdr;
......@@ -613,7 +613,7 @@ static DWORD APPINFO_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b
return INET_QueryOption(option, buffer, size, unicode);
}
static const HANDLEHEADERVtbl APPINFOVtbl = {
static const object_vtbl_t APPINFOVtbl = {
APPINFO_Destroy,
NULL,
APPINFO_QueryOption,
......@@ -1093,7 +1093,7 @@ BOOL WINAPI InternetFindNextFileA(HINTERNET hFind, LPVOID lpvFindData)
*/
BOOL WINAPI InternetFindNextFileW(HINTERNET hFind, LPVOID lpvFindData)
{
WININETHANDLEHEADER *hdr;
object_header_t *hdr;
DWORD res;
TRACE("\n");
......@@ -1131,7 +1131,7 @@ BOOL WINAPI InternetFindNextFileW(HINTERNET hFind, LPVOID lpvFindData)
*/
BOOL WINAPI InternetCloseHandle(HINTERNET hInternet)
{
LPWININETHANDLEHEADER lpwh;
object_header_t *lpwh;
TRACE("%p\n",hInternet);
......@@ -1795,7 +1795,7 @@ BOOL WINAPI InternetCanonicalizeUrlW(LPCWSTR lpszUrl, LPWSTR lpszBuffer,
/* #################################################### */
static INTERNET_STATUS_CALLBACK set_status_callback(
LPWININETHANDLEHEADER lpwh, INTERNET_STATUS_CALLBACK callback, BOOL unicode)
object_header_t *lpwh, INTERNET_STATUS_CALLBACK callback, BOOL unicode)
{
INTERNET_STATUS_CALLBACK ret;
......@@ -1823,7 +1823,7 @@ INTERNET_STATUS_CALLBACK WINAPI InternetSetStatusCallbackA(
HINTERNET hInternet ,INTERNET_STATUS_CALLBACK lpfnIntCB)
{
INTERNET_STATUS_CALLBACK retVal;
LPWININETHANDLEHEADER lpwh;
object_header_t *lpwh;
TRACE("%p\n", hInternet);
......@@ -1851,7 +1851,7 @@ INTERNET_STATUS_CALLBACK WINAPI InternetSetStatusCallbackW(
HINTERNET hInternet ,INTERNET_STATUS_CALLBACK lpfnIntCB)
{
INTERNET_STATUS_CALLBACK retVal;
LPWININETHANDLEHEADER lpwh;
object_header_t *lpwh;
TRACE("%p\n", hInternet);
......@@ -1887,7 +1887,7 @@ DWORD WINAPI InternetSetFilePointer(HINTERNET hFile, LONG lDistanceToMove,
BOOL WINAPI InternetWriteFile(HINTERNET hFile, LPCVOID lpBuffer,
DWORD dwNumOfBytesToWrite, LPDWORD lpdwNumOfBytesWritten)
{
LPWININETHANDLEHEADER lpwh;
object_header_t *lpwh;
BOOL retval = FALSE;
TRACE("(%p %p %d %p)\n", hFile, lpBuffer, dwNumOfBytesToWrite, lpdwNumOfBytesWritten);
......@@ -1926,7 +1926,7 @@ BOOL WINAPI InternetWriteFile(HINTERNET hFile, LPCVOID lpBuffer,
BOOL WINAPI InternetReadFile(HINTERNET hFile, LPVOID lpBuffer,
DWORD dwNumOfBytesToRead, LPDWORD pdwNumOfBytesRead)
{
LPWININETHANDLEHEADER hdr;
object_header_t *hdr;
DWORD res = ERROR_INTERNET_INCORRECT_HANDLE_TYPE;
TRACE("%p %p %d %p\n", hFile, lpBuffer, dwNumOfBytesToRead, pdwNumOfBytesRead);
......@@ -1980,7 +1980,7 @@ BOOL WINAPI InternetReadFile(HINTERNET hFile, LPVOID lpBuffer,
BOOL WINAPI InternetReadFileExA(HINTERNET hFile, LPINTERNET_BUFFERSA lpBuffersOut,
DWORD dwFlags, DWORD_PTR dwContext)
{
LPWININETHANDLEHEADER hdr;
object_header_t *hdr;
DWORD res = ERROR_INTERNET_INCORRECT_HANDLE_TYPE;
TRACE("(%p %p 0x%x 0x%lx)\n", hFile, lpBuffersOut, dwFlags, dwContext);
......@@ -2012,7 +2012,7 @@ BOOL WINAPI InternetReadFileExA(HINTERNET hFile, LPINTERNET_BUFFERSA lpBuffersOu
BOOL WINAPI InternetReadFileExW(HINTERNET hFile, LPINTERNET_BUFFERSW lpBuffer,
DWORD dwFlags, DWORD_PTR dwContext)
{
LPWININETHANDLEHEADER hdr;
object_header_t *hdr;
DWORD res = ERROR_INTERNET_INCORRECT_HANDLE_TYPE;
TRACE("(%p %p 0x%x 0x%lx)\n", hFile, lpBuffer, dwFlags, dwContext);
......@@ -2186,7 +2186,7 @@ DWORD INET_QueryOption(DWORD option, void *buffer, DWORD *size, BOOL unicode)
BOOL WINAPI InternetQueryOptionW(HINTERNET hInternet, DWORD dwOption,
LPVOID lpBuffer, LPDWORD lpdwBufferLength)
{
LPWININETHANDLEHEADER hdr;
object_header_t *hdr;
DWORD res = ERROR_INVALID_HANDLE;
TRACE("%p %d %p %p\n", hInternet, dwOption, lpBuffer, lpdwBufferLength);
......@@ -2219,7 +2219,7 @@ BOOL WINAPI InternetQueryOptionW(HINTERNET hInternet, DWORD dwOption,
BOOL WINAPI InternetQueryOptionA(HINTERNET hInternet, DWORD dwOption,
LPVOID lpBuffer, LPDWORD lpdwBufferLength)
{
LPWININETHANDLEHEADER hdr;
object_header_t *hdr;
DWORD res = ERROR_INVALID_HANDLE;
TRACE("%p %d %p %p\n", hInternet, dwOption, lpBuffer, lpdwBufferLength);
......@@ -2253,12 +2253,12 @@ BOOL WINAPI InternetQueryOptionA(HINTERNET hInternet, DWORD dwOption,
BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption,
LPVOID lpBuffer, DWORD dwBufferLength)
{
LPWININETHANDLEHEADER lpwhh;
object_header_t *lpwhh;
BOOL ret = TRUE;
TRACE("(%p %d %p %d)\n", hInternet, dwOption, lpBuffer, dwBufferLength);
lpwhh = (LPWININETHANDLEHEADER) WININET_GetObject( hInternet );
lpwhh = (object_header_t*) WININET_GetObject( hInternet );
if(lpwhh && lpwhh->vtbl->SetOption) {
DWORD res;
......@@ -2433,7 +2433,7 @@ BOOL WINAPI InternetSetOptionA(HINTERNET hInternet, DWORD dwOption,
{
case INTERNET_OPTION_CALLBACK:
{
LPWININETHANDLEHEADER lpwh;
object_header_t *lpwh;
if (!(lpwh = WININET_GetObject(hInternet)))
{
......@@ -3267,7 +3267,7 @@ BOOL WINAPI InternetQueryDataAvailable( HINTERNET hFile,
LPDWORD lpdwNumberOfBytesAvailble,
DWORD dwFlags, DWORD_PTR dwContext)
{
WININETHANDLEHEADER *hdr;
object_header_t *hdr;
DWORD res;
TRACE("(%p %p %x %lx)\n", hFile, lpdwNumberOfBytesAvailble, dwFlags, dwContext);
......
......@@ -112,25 +112,25 @@ typedef enum
#define INET_OPENURL 0x0001
#define INET_CALLBACKW 0x0002
typedef struct _WININETHANDLEHEADER WININETHANDLEHEADER, *LPWININETHANDLEHEADER;
typedef struct _object_header_t object_header_t;
typedef struct {
void (*Destroy)(WININETHANDLEHEADER*);
void (*CloseConnection)(WININETHANDLEHEADER*);
DWORD (*QueryOption)(WININETHANDLEHEADER*,DWORD,void*,DWORD*,BOOL);
DWORD (*SetOption)(WININETHANDLEHEADER*,DWORD,void*,DWORD);
DWORD (*ReadFile)(WININETHANDLEHEADER*,void*,DWORD,DWORD*);
DWORD (*ReadFileExA)(WININETHANDLEHEADER*,INTERNET_BUFFERSA*,DWORD,DWORD_PTR);
DWORD (*ReadFileExW)(WININETHANDLEHEADER*,INTERNET_BUFFERSW*,DWORD,DWORD_PTR);
BOOL (*WriteFile)(WININETHANDLEHEADER*,const void*,DWORD,DWORD*);
DWORD (*QueryDataAvailable)(WININETHANDLEHEADER*,DWORD*,DWORD,DWORD_PTR);
DWORD (*FindNextFileW)(WININETHANDLEHEADER*,void*);
} HANDLEHEADERVtbl;
struct _WININETHANDLEHEADER
void (*Destroy)(object_header_t*);
void (*CloseConnection)(object_header_t*);
DWORD (*QueryOption)(object_header_t*,DWORD,void*,DWORD*,BOOL);
DWORD (*SetOption)(object_header_t*,DWORD,void*,DWORD);
DWORD (*ReadFile)(object_header_t*,void*,DWORD,DWORD*);
DWORD (*ReadFileExA)(object_header_t*,INTERNET_BUFFERSA*,DWORD,DWORD_PTR);
DWORD (*ReadFileExW)(object_header_t*,INTERNET_BUFFERSW*,DWORD,DWORD_PTR);
BOOL (*WriteFile)(object_header_t*,const void*,DWORD,DWORD*);
DWORD (*QueryDataAvailable)(object_header_t*,DWORD*,DWORD,DWORD_PTR);
DWORD (*FindNextFileW)(object_header_t*,void*);
} object_vtbl_t;
struct _object_header_t
{
WH_TYPE htype;
const HANDLEHEADERVtbl *vtbl;
const object_vtbl_t *vtbl;
HINTERNET hInternet;
DWORD dwFlags;
DWORD_PTR dwContext;
......@@ -145,7 +145,7 @@ struct _WININETHANDLEHEADER
typedef struct
{
WININETHANDLEHEADER hdr;
object_header_t hdr;
LPWSTR lpszAgent;
LPWSTR lpszProxy;
LPWSTR lpszProxyBypass;
......@@ -157,7 +157,7 @@ typedef struct
typedef struct
{
WININETHANDLEHEADER hdr;
object_header_t hdr;
WININETAPPINFOW *lpAppInfo;
LPWSTR lpszHostName; /* the final destination of the request */
LPWSTR lpszServerName; /* the name of the server we directly connect to */
......@@ -187,7 +187,7 @@ typedef struct gzip_stream_t gzip_stream_t;
typedef struct
{
WININETHANDLEHEADER hdr;
object_header_t hdr;
WININETHTTPSESSIONW *lpHttpSession;
LPWSTR lpszPath;
LPWSTR lpszVerb;
......@@ -336,7 +336,7 @@ struct WORKREQ_INTERNETREADFILEEXW
typedef struct WORKREQ
{
void (*asyncproc)(struct WORKREQ*);
WININETHANDLEHEADER *hdr;
object_header_t *hdr;
union {
struct WORKREQ_FTPPUTFILEW FtpPutFileW;
......@@ -360,10 +360,10 @@ typedef struct WORKREQ
} WORKREQUEST, *LPWORKREQUEST;
HINTERNET WININET_AllocHandle( LPWININETHANDLEHEADER info );
LPWININETHANDLEHEADER WININET_GetObject( HINTERNET hinternet );
LPWININETHANDLEHEADER WININET_AddRef( LPWININETHANDLEHEADER info );
BOOL WININET_Release( LPWININETHANDLEHEADER info );
HINTERNET WININET_AllocHandle( object_header_t *info );
object_header_t *WININET_GetObject( HINTERNET hinternet );
object_header_t *WININET_AddRef( object_header_t *info );
BOOL WININET_Release( object_header_t *info );
BOOL WININET_FreeHandle( HINTERNET hinternet );
DWORD INET_QueryOption(DWORD,void*,DWORD*,BOOL);
......@@ -397,11 +397,11 @@ INTERNETAPI HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
LPCWSTR lpszReferrer , LPCWSTR *lpszAcceptTypes,
DWORD dwFlags, DWORD_PTR dwContext);
VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD_PTR dwContext,
VOID SendAsyncCallback(object_header_t *hdr, DWORD_PTR dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
DWORD dwStatusInfoLength);
VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD_PTR dwContext,
VOID INTERNET_SendCallback(object_header_t *hdr, DWORD_PTR dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
DWORD dwStatusInfoLength);
......
......@@ -255,7 +255,7 @@ static const char *get_callback_name(DWORD dwInternetStatus) {
return "Unknown";
}
VOID INTERNET_SendCallback(LPWININETHANDLEHEADER hdr, DWORD_PTR dwContext,
VOID INTERNET_SendCallback(object_header_t *hdr, DWORD_PTR dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
DWORD dwStatusInfoLength)
{
......@@ -325,7 +325,7 @@ static void SendAsyncCallbackProc(WORKREQUEST *workRequest)
HeapFree(GetProcessHeap(), 0, req->lpvStatusInfo);
}
VOID SendAsyncCallback(LPWININETHANDLEHEADER hdr, DWORD_PTR dwContext,
void SendAsyncCallback(object_header_t *hdr, DWORD_PTR dwContext,
DWORD dwInternetStatus, LPVOID lpvStatusInfo,
DWORD dwStatusInfoLength)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment