ole32: The type of the size of IMalloc'ed blocks is SIZE_T.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d1841f496b
commit
bf5dca1976
|
@ -2821,7 +2821,7 @@ static ULONG WINAPI MimeAlloc_Release(
|
|||
|
||||
static LPVOID WINAPI MimeAlloc_Alloc(
|
||||
IMimeAllocator* iface,
|
||||
ULONG cb)
|
||||
SIZE_T cb)
|
||||
{
|
||||
return CoTaskMemAlloc(cb);
|
||||
}
|
||||
|
@ -2829,7 +2829,7 @@ static LPVOID WINAPI MimeAlloc_Alloc(
|
|||
static LPVOID WINAPI MimeAlloc_Realloc(
|
||||
IMimeAllocator* iface,
|
||||
LPVOID pv,
|
||||
ULONG cb)
|
||||
SIZE_T cb)
|
||||
{
|
||||
return CoTaskMemRealloc(pv, cb);
|
||||
}
|
||||
|
@ -2841,7 +2841,7 @@ static void WINAPI MimeAlloc_Free(
|
|||
CoTaskMemFree(pv);
|
||||
}
|
||||
|
||||
static ULONG WINAPI MimeAlloc_GetSize(
|
||||
static SIZE_T WINAPI MimeAlloc_GetSize(
|
||||
IMimeAllocator* iface,
|
||||
LPVOID pv)
|
||||
{
|
||||
|
|
|
@ -112,9 +112,9 @@ static ULONG WINAPI IMAPIMalloc_fnRelease(LPMALLOC iface)
|
|||
/**************************************************************************
|
||||
* IMAPIMalloc_Alloc
|
||||
*/
|
||||
static LPVOID WINAPI IMAPIMalloc_fnAlloc(LPMALLOC iface, DWORD cb)
|
||||
static LPVOID WINAPI IMAPIMalloc_fnAlloc(LPMALLOC iface, SIZE_T cb)
|
||||
{
|
||||
TRACE("(%p)->(%d)\n", iface, cb);
|
||||
TRACE("(%p)->(%ld)\n", iface, cb);
|
||||
|
||||
return LocalAlloc(LMEM_FIXED, cb);
|
||||
}
|
||||
|
@ -122,9 +122,9 @@ static LPVOID WINAPI IMAPIMalloc_fnAlloc(LPMALLOC iface, DWORD cb)
|
|||
/**************************************************************************
|
||||
* IMAPIMalloc_Realloc
|
||||
*/
|
||||
static LPVOID WINAPI IMAPIMalloc_fnRealloc(LPMALLOC iface, LPVOID pv, DWORD cb)
|
||||
static LPVOID WINAPI IMAPIMalloc_fnRealloc(LPMALLOC iface, LPVOID pv, SIZE_T cb)
|
||||
{
|
||||
TRACE("(%p)->(%p, %d)\n", iface, pv, cb);
|
||||
TRACE("(%p)->(%p, %ld)\n", iface, pv, cb);
|
||||
|
||||
if (!pv)
|
||||
return LocalAlloc(LMEM_FIXED, cb);
|
||||
|
@ -148,7 +148,7 @@ static void WINAPI IMAPIMalloc_fnFree(LPMALLOC iface, LPVOID pv)
|
|||
/**************************************************************************
|
||||
* IMAPIMalloc_GetSize
|
||||
*/
|
||||
static DWORD WINAPI IMAPIMalloc_fnGetSize(LPMALLOC iface, LPVOID pv)
|
||||
static SIZE_T WINAPI IMAPIMalloc_fnGetSize(LPMALLOC iface, LPVOID pv)
|
||||
{
|
||||
TRACE("(%p)->(%p)\n", iface, pv);
|
||||
return LocalSize(pv);
|
||||
|
|
|
@ -143,8 +143,8 @@ static BOOL RemoveMemoryLocation(LPCVOID pMem)
|
|||
/******************************************************************************
|
||||
* IMalloc32_QueryInterface [VTABLE]
|
||||
*/
|
||||
static HRESULT WINAPI IMalloc_fnQueryInterface(LPMALLOC iface,REFIID refiid,LPVOID *obj) {
|
||||
|
||||
static HRESULT WINAPI IMalloc_fnQueryInterface(IMalloc *iface, REFIID refiid, void **obj)
|
||||
{
|
||||
TRACE("(%s,%p)\n",debugstr_guid(refiid),obj);
|
||||
|
||||
if (IsEqualIID(&IID_IUnknown,refiid) || IsEqualIID(&IID_IMalloc,refiid)) {
|
||||
|
@ -157,21 +157,22 @@ static HRESULT WINAPI IMalloc_fnQueryInterface(LPMALLOC iface,REFIID refiid,LPVO
|
|||
/******************************************************************************
|
||||
* IMalloc32_AddRefRelease [VTABLE]
|
||||
*/
|
||||
static ULONG WINAPI IMalloc_fnAddRefRelease (LPMALLOC iface) {
|
||||
static ULONG WINAPI IMalloc_fnAddRefRelease(IMalloc *iface)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* IMalloc32_Alloc [VTABLE]
|
||||
*/
|
||||
static LPVOID WINAPI IMalloc_fnAlloc(LPMALLOC iface, DWORD cb) {
|
||||
static void * WINAPI IMalloc_fnAlloc(IMalloc *iface, SIZE_T cb)
|
||||
{
|
||||
void *addr;
|
||||
|
||||
LPVOID addr;
|
||||
|
||||
TRACE("(%d)\n",cb);
|
||||
TRACE("(%ld)\n",cb);
|
||||
|
||||
if(Malloc32.pSpy) {
|
||||
DWORD preAllocResult;
|
||||
SIZE_T preAllocResult;
|
||||
|
||||
EnterCriticalSection(&IMalloc32_SpyCS);
|
||||
preAllocResult = IMallocSpy_PreAlloc(Malloc32.pSpy, cb);
|
||||
|
@ -198,14 +199,14 @@ static LPVOID WINAPI IMalloc_fnAlloc(LPMALLOC iface, DWORD cb) {
|
|||
/******************************************************************************
|
||||
* IMalloc32_Realloc [VTABLE]
|
||||
*/
|
||||
static LPVOID WINAPI IMalloc_fnRealloc(LPMALLOC iface,LPVOID pv,DWORD cb) {
|
||||
static void * WINAPI IMalloc_fnRealloc(IMalloc *iface, void *pv, SIZE_T cb)
|
||||
{
|
||||
void *pNewMemory;
|
||||
|
||||
LPVOID pNewMemory;
|
||||
|
||||
TRACE("(%p,%d)\n",pv,cb);
|
||||
TRACE("(%p,%ld)\n",pv,cb);
|
||||
|
||||
if(Malloc32.pSpy) {
|
||||
LPVOID pRealMemory;
|
||||
void *pRealMemory;
|
||||
BOOL fSpyed;
|
||||
|
||||
EnterCriticalSection(&IMalloc32_SpyCS);
|
||||
|
@ -250,8 +251,8 @@ static LPVOID WINAPI IMalloc_fnRealloc(LPMALLOC iface,LPVOID pv,DWORD cb) {
|
|||
/******************************************************************************
|
||||
* IMalloc32_Free [VTABLE]
|
||||
*/
|
||||
static VOID WINAPI IMalloc_fnFree(LPMALLOC iface,LPVOID pv) {
|
||||
|
||||
static void WINAPI IMalloc_fnFree(IMalloc *iface, void *pv)
|
||||
{
|
||||
BOOL fSpyed = FALSE;
|
||||
|
||||
TRACE("(%p)\n",pv);
|
||||
|
@ -286,9 +287,9 @@ static VOID WINAPI IMalloc_fnFree(LPMALLOC iface,LPVOID pv) {
|
|||
* win95: size allocated (4 byte boundarys)
|
||||
* win2k: size originally requested !!! (allocated on 8 byte boundarys)
|
||||
*/
|
||||
static DWORD WINAPI IMalloc_fnGetSize(LPMALLOC iface,LPVOID pv) {
|
||||
|
||||
DWORD cb;
|
||||
static SIZE_T WINAPI IMalloc_fnGetSize(IMalloc *iface, void *pv)
|
||||
{
|
||||
SIZE_T cb;
|
||||
BOOL fSpyed = FALSE;
|
||||
|
||||
TRACE("(%p)\n",pv);
|
||||
|
@ -311,8 +312,8 @@ static DWORD WINAPI IMalloc_fnGetSize(LPMALLOC iface,LPVOID pv) {
|
|||
/******************************************************************************
|
||||
* IMalloc32_DidAlloc [VTABLE]
|
||||
*/
|
||||
static INT WINAPI IMalloc_fnDidAlloc(LPMALLOC iface,LPVOID pv) {
|
||||
|
||||
static INT WINAPI IMalloc_fnDidAlloc(IMalloc *iface, void *pv)
|
||||
{
|
||||
BOOL fSpyed = FALSE;
|
||||
int didAlloc;
|
||||
|
||||
|
@ -335,7 +336,8 @@ static INT WINAPI IMalloc_fnDidAlloc(LPMALLOC iface,LPVOID pv) {
|
|||
/******************************************************************************
|
||||
* IMalloc32_HeapMinimize [VTABLE]
|
||||
*/
|
||||
static VOID WINAPI IMalloc_fnHeapMinimize(LPMALLOC iface) {
|
||||
static void WINAPI IMalloc_fnHeapMinimize(IMalloc *iface)
|
||||
{
|
||||
TRACE("()\n");
|
||||
|
||||
if(Malloc32.pSpy) {
|
||||
|
@ -398,7 +400,7 @@ HRESULT WINAPI CoGetMalloc(DWORD context, IMalloc **imalloc)
|
|||
* Success: Pointer to newly allocated memory block.
|
||||
* Failure: NULL.
|
||||
*/
|
||||
LPVOID WINAPI CoTaskMemAlloc(ULONG size)
|
||||
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
|
||||
{
|
||||
return IMalloc_Alloc(&Malloc32.IMalloc_iface,size);
|
||||
}
|
||||
|
@ -432,7 +434,7 @@ VOID WINAPI CoTaskMemFree(LPVOID ptr)
|
|||
* Success: Pointer to newly allocated memory block.
|
||||
* Failure: NULL.
|
||||
*/
|
||||
LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, ULONG size)
|
||||
LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, SIZE_T size)
|
||||
{
|
||||
return IMalloc_Realloc(&Malloc32.IMalloc_iface, pvOld, size);
|
||||
}
|
||||
|
|
|
@ -304,9 +304,9 @@ HRESULT WINAPI CoGetInstanceFromFile(COSERVERINFO* pServerInfo, CLSID* pClsid, I
|
|||
HRESULT WINAPI CoGetInstanceFromIStorage(COSERVERINFO* pServerInfo, CLSID* pClsid, IUnknown* punkOuter, DWORD dwClsCtx, IStorage* pstg, DWORD dwCount, MULTI_QI* pResults);
|
||||
|
||||
HRESULT WINAPI CoGetMalloc(DWORD dwMemContext, LPMALLOC* lpMalloc);
|
||||
LPVOID WINAPI CoTaskMemAlloc(ULONG size) __WINE_ALLOC_SIZE(1);
|
||||
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size) __WINE_ALLOC_SIZE(1);
|
||||
void WINAPI CoTaskMemFree(LPVOID ptr);
|
||||
LPVOID WINAPI CoTaskMemRealloc(LPVOID ptr, ULONG size);
|
||||
LPVOID WINAPI CoTaskMemRealloc(LPVOID ptr, SIZE_T size);
|
||||
|
||||
HRESULT WINAPI CoRegisterMallocSpy(LPMALLOCSPY pMallocSpy);
|
||||
HRESULT WINAPI CoRevokeMallocSpy(void);
|
||||
|
|
|
@ -162,16 +162,16 @@ interface IMalloc : IUnknown
|
|||
typedef [unique] IMalloc *LPMALLOC;
|
||||
|
||||
LPVOID Alloc(
|
||||
[in] ULONG cb);
|
||||
[in] SIZE_T cb);
|
||||
|
||||
LPVOID Realloc(
|
||||
[in] LPVOID pv,
|
||||
[in] ULONG cb);
|
||||
[in] SIZE_T cb);
|
||||
|
||||
void Free(
|
||||
[in] LPVOID pv);
|
||||
|
||||
ULONG GetSize(
|
||||
SIZE_T GetSize(
|
||||
[in] LPVOID pv);
|
||||
|
||||
int DidAlloc(LPVOID pv);
|
||||
|
@ -188,8 +188,8 @@ interface IMallocSpy : IUnknown
|
|||
{
|
||||
typedef [unique] IMallocSpy *LPMALLOCSPY;
|
||||
|
||||
ULONG PreAlloc(
|
||||
[in] ULONG cbRequest);
|
||||
SIZE_T PreAlloc(
|
||||
[in] SIZE_T cbRequest);
|
||||
|
||||
LPVOID PostAlloc(
|
||||
[in] LPVOID pActual);
|
||||
|
@ -201,9 +201,9 @@ interface IMallocSpy : IUnknown
|
|||
void PostFree(
|
||||
[in] BOOL fSpyed);
|
||||
|
||||
ULONG PreRealloc(
|
||||
SIZE_T PreRealloc(
|
||||
[in] LPVOID pRequest,
|
||||
[in] ULONG cbRequest,
|
||||
[in] SIZE_T cbRequest,
|
||||
[out] LPVOID *ppNewRequest,
|
||||
[in] BOOL fSpyed);
|
||||
|
||||
|
@ -215,8 +215,8 @@ interface IMallocSpy : IUnknown
|
|||
[in] LPVOID pRequest,
|
||||
[in] BOOL fSpyed);
|
||||
|
||||
ULONG PostGetSize(
|
||||
[in] ULONG cbActual,
|
||||
SIZE_T PostGetSize(
|
||||
[in] SIZE_T cbActual,
|
||||
[in] BOOL fSpyed);
|
||||
|
||||
LPVOID PreDidAlloc(
|
||||
|
|
Loading…
Reference in New Issue