Sweden-Number/dlls/winhttp/winhttp_private.h

69 lines
1.9 KiB
C
Raw Normal View History

/*
* Copyright 2008 Hans Leidekker for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _WINE_WINHTTP_PRIVATE_H_
#define _WINE_WINHTTP_PRIVATE_H_
#include "wine/list.h"
typedef struct _object_header_t object_header_t;
typedef struct
{
void (*destroy)( object_header_t * );
BOOL (*query_option)( object_header_t *, DWORD, void *, DWORD *, BOOL );
BOOL (*set_option)( object_header_t *, DWORD, void *, DWORD );
} object_vtbl_t;
struct _object_header_t
{
DWORD type;
HINTERNET handle;
const object_vtbl_t *vtbl;
DWORD flags;
DWORD error;
DWORD_PTR context;
LONG refs;
WINHTTP_STATUS_CALLBACK callback;
DWORD notify_mask;
struct list entry;
struct list children;
};
static inline void *heap_alloc( SIZE_T size )
{
return HeapAlloc( GetProcessHeap(), 0, size );
}
static inline void *heap_alloc_zero( SIZE_T size )
{
return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size );
}
static inline void *heap_realloc_zero( LPVOID mem, SIZE_T size )
{
return HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, mem, size );
}
static inline BOOL heap_free( LPVOID mem )
{
return HeapFree( GetProcessHeap(), 0, mem );
}
#endif /* _WINE_WINHTTP_PRIVATE_H_ */