mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
SHGetMalloc must use MEMCTX_TASK, otherwise CoGetMalloc will
badly fail with E_INVALIDARG in case native OLE32 is used.
This commit is contained in:
parent
3481e8039e
commit
2c5efe31c0
2 changed files with 10 additions and 1 deletions
|
@ -146,7 +146,7 @@ DWORD WINAPI SHCLSIDFromStringAW (LPVOID clsid, CLSID *id)
|
|||
DWORD WINAPI SHGetMalloc(LPMALLOC *lpmal)
|
||||
{
|
||||
TRACE("(%p)\n", lpmal);
|
||||
return CoGetMalloc(0,lpmal);
|
||||
return CoGetMalloc(MEMCTX_TASK, lpmal);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
|
|
@ -701,6 +701,15 @@ ICOM_DEFINE(IMalloc,IUnknown)
|
|||
#define IMalloc_DidAlloc(p,a) ICOM_CALL1(DidAlloc,p,a)
|
||||
#define IMalloc_HeapMinimize(p) ICOM_CALL (HeapMinimize,p)
|
||||
|
||||
/* values passed to CoGetMalloc */
|
||||
#define MEMCTX_TASK 1 /* private task memory */
|
||||
#define MEMCTX_SHARED 2 /* shared memory */
|
||||
#ifdef _MAC
|
||||
#define MEMCTX_MACSYSTEM 3 /* system heap on mac */
|
||||
#endif
|
||||
/* mainly for internal use... */
|
||||
#define MEMCTX_UNKNOWN -1
|
||||
#define MEMCTX_SAME -2
|
||||
|
||||
HRESULT WINAPI CoGetMalloc(DWORD dwMemContext,LPMALLOC* lpMalloc);
|
||||
|
||||
|
|
Loading…
Reference in a new issue