static CRITICAL_SECTION WININET_cs = { &WININET_cs_debug, -1, 0, 0, 0, 0 };
static object_header_t **WININET_Handles;
-static UINT WININET_dwNextHandle;
-static UINT WININET_dwMaxHandles;
+static UINT_PTR WININET_dwNextHandle;
+static UINT_PTR WININET_dwMaxHandles;
typedef struct
{
HINTERNET WININET_AllocHandle( object_header_t *info )
{
object_header_t **p;
- UINT handle = 0, num;
+ UINT_PTR handle = 0, num;
list_init( &info->children );
object_header_t *WININET_GetObject( HINTERNET hinternet )
{
object_header_t *info = NULL;
- UINT handle = (UINT) hinternet;
+ UINT_PTR handle = (UINT_PTR) hinternet;
EnterCriticalSection( &WININET_cs );
LeaveCriticalSection( &WININET_cs );
- TRACE("handle %d -> %p\n", handle, info);
+ TRACE("handle %ld -> %p\n", handle, info);
return info;
}
BOOL WININET_FreeHandle( HINTERNET hinternet )
{
BOOL ret = FALSE;
- UINT handle = (UINT) hinternet;
+ UINT_PTR handle = (UINT_PTR) hinternet;
object_header_t *info = NULL, *child, *next;
EnterCriticalSection( &WININET_cs );
if( WININET_Handles[handle] )
{
info = WININET_Handles[handle];
- TRACE( "destroying handle %d for object %p\n", handle+1, info);
+ TRACE( "destroying handle %ld for object %p\n", handle+1, info);
WININET_Handles[handle] = NULL;
ret = TRUE;
}
/* Free all children as native does */
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);
+ TRACE( "freeing child handle %ld for parent handle %ld\n",
+ (UINT_PTR)child->hInternet, handle+1);
WININET_FreeHandle( child->hInternet );
}
WININET_Release( info );