Ignore:
Timestamp:
Apr 23, 2003, 8:01:01 PM (22 years ago)
Author:
sandervl
Message:

KSO: Properties allocated from shared memory & Fake window updates & SW_SHOWDEFAULT update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32wbaseprop.cpp

    r3493 r10031  
    1 /* $Id: win32wbaseprop.cpp,v 1.1 2000-05-05 11:32:38 sandervl Exp $ */
     1/* $Id: win32wbaseprop.cpp,v 1.2 2003-04-23 18:01:00 sandervl Exp $ */
    22/*
    33 * Window properties
     
    9292    {
    9393        /* We need to create it */
    94         if (!(prop = (PROPERTY *)HeapAlloc(GetProcessHeap(), 0, sizeof(*prop) )))
     94        if (!(prop = (PROPERTY *)_smalloc(sizeof(*prop) )))
    9595        {
    9696             dprintf(("setProp: malloc failed!!"));
     
    9999        if(HIWORD(str))
    100100        {
    101              if (!(prop->string = HEAP_strdupA(GetProcessHeap(), 0, str)))
     101             unsigned cch = strlen(str) + 1;
     102             if (!(prop->string = (LPSTR)_smalloc(cch)))
    102103             {
    103                 HeapFree( GetProcessHeap(), 0, prop );
     104                _sfree(prop);
    104105                return FALSE;
    105106             }
     107             memcpy(prop->string, str, cch);
    106108        }
    107109        else prop->string = (char *)str;  //atom
     
    158160    *pprop = prop->next;
    159161    if(HIWORD(prop->string))
    160         HeapFree(GetProcessHeap(), 0, prop->string);
    161     HeapFree( GetProcessHeap(), 0, prop );
     162        _sfree(prop->string);
     163    _sfree(prop);
    162164    return handle;
    163165}
     
    176178        next = prop->next;
    177179        if(HIWORD(prop->string))
    178             HeapFree(GetProcessHeap(), 0, prop->string);
    179         HeapFree(GetProcessHeap(), 0, prop);
     180            _sfree(prop->string);
     181        _sfree(prop);
    180182    }
    181183    propertyList = NULL;
Note: See TracChangeset for help on using the changeset viewer.