return entry;
}
- if (ht->nb_handles >= ht->allocated_handles) /* need to grow the array */
+ if (ht->nb_handles >= ht->allocated_handles) /* Need to grow the array */
{
/**/
int i, iFree = 0, iWindow = 0, iMenu = 0, iCursorIcon = 0,
return NULL;
#if 0
PUSER_HANDLE_ENTRY new_handles;
- /* grow array by 50% (but at minimum 32 entries) */
+ /* Grow array by 50% (but at minimum 32 entries) */
int growth = max( 32, ht->allocated_handles / 2 );
int new_size = min( ht->allocated_handles + growth, (LAST_USER_HANDLE-FIRST_USER_HANDLE+1) >> 1 );
if (new_size <= ht->allocated_handles)
}
-/* get the full handle (32bit) for a possibly truncated (16bit) handle */
+/* Get the full handle (32bit) for a possibly truncated (16bit) handle */
HANDLE get_user_full_handle(PUSER_HANDLE_TABLE ht, HANDLE handle )
{
PUSER_HANDLE_ENTRY entry;
}
-/* same as get_user_object plus set the handle to the full 32-bit value */
+/* Same as get_user_object plus set the handle to the full 32-bit value */
void *get_user_object_handle(PUSER_HANDLE_TABLE ht, HANDLE* handle, USER_OBJECT_TYPE type )
{
PUSER_HANDLE_ENTRY entry;
PVOID mem;
- //FIXME: dont alloc all at once! must be mapped into umode also...
+ // FIXME: Don't alloc all at once! Must be mapped into umode also...
mem = UserHeapAlloc(sizeof(USER_HANDLE_ENTRY) * 1024*2);
if (!mem)
{
return FALSE;
}
- //FIXME: make auto growable
+ // FIXME: Make auto growable
UserInitHandleTable(gHandleTable, mem, sizeof(USER_HANDLE_ENTRY) * 1024*2);
return TRUE;
}
/* Now set default headers. */
((PHEAD)Object)->h = hi;
- ((PHEAD)Object)->cLockObj = 2; // we need this, because we create 2 refs: handle and pointer!
+ ((PHEAD)Object)->cLockObj = 2; // We need this, because we create 2 refs: handle and pointer!
if (h)
*h = hi;
if (!entry)
{
- ERR("warning! Dereference Object without ENTRY! Obj -> 0x%x\n", object);
+ ERR("Warning! Dereference Object without ENTRY! Obj -> 0x%x\n", object);
return FALSE;
}
- TRACE("warning! Dereference to zero! Obj -> 0x%x\n", object);
+ TRACE("Warning! Dereference to zero! Obj -> 0x%x\n", object);
((PHEAD)object)->cLockObj = 0;