Ignore:
Timestamp:
Nov 14, 2001, 1:49:06 PM (24 years ago)
Author:
phaller
Message:

replaced heap alloc by stack alloc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ole32/compobj.c

    r6711 r7335  
    539539        CLSID *id               /* [out] GUID represented by above string */
    540540) {
     541#ifdef __WIN32OS2__
     542    HRESULT    ret;
     543    LPOLESTR16 xid;
     544    STACK_strdupWtoA(idstr, xid)
     545    ret = CLSIDFromString16( (LPOLESTR16)xid,id);
     546    if(ret != S_OK) { /* It appears a ProgID is also valid */
     547        ret = CLSIDFromProgID(idstr, id);
     548    }
     549    return ret;
     550#else
    541551    LPOLESTR16      xid = HEAP_strdupWtoA(GetProcessHeap(),0,idstr);
    542552    HRESULT       ret = CLSIDFromString16(xid,id);
    543 
    544553    HeapFree(GetProcessHeap(),0,xid);
    545554    if(ret != S_OK) { /* It appears a ProgID is also valid */
     
    547556    }
    548557    return ret;
     558#endif
    549559}
    550560
     
    779789        LPCLSID riid            /* [out] associated CLSID */
    780790) {
     791#ifdef __WIN32OS2__
     792        LPOLESTR16 pid;
     793        STACK_strdupWtoA(progid, pid)
     794        return CLSIDFromProgID16((LPOLESTR16)pid,riid);
     795#else
    781796        LPOLESTR16 pid = HEAP_strdupWtoA(GetProcessHeap(),0,progid);
    782797        HRESULT       ret = CLSIDFromProgID16(pid,riid);
     
    784799        HeapFree(GetProcessHeap(),0,pid);
    785800        return ret;
     801#endif
    786802}
    787803
Note: See TracChangeset for help on using the changeset viewer.