Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bf5dca19
Commit
bf5dca19
authored
Jan 19, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Jan 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
>
parent
d1841f49
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
42 deletions
+44
-42
mimeole.c
dlls/inetcomm/mimeole.c
+3
-3
imalloc.c
dlls/mapi32/imalloc.c
+5
-5
ifs.c
dlls/ole32/ifs.c
+25
-23
objbase.h
include/objbase.h
+2
-2
objidl.idl
include/objidl.idl
+9
-9
No files found.
dlls/inetcomm/mimeole.c
View file @
bf5dca19
...
@@ -2821,7 +2821,7 @@ static ULONG WINAPI MimeAlloc_Release(
...
@@ -2821,7 +2821,7 @@ static ULONG WINAPI MimeAlloc_Release(
static
LPVOID
WINAPI
MimeAlloc_Alloc
(
static
LPVOID
WINAPI
MimeAlloc_Alloc
(
IMimeAllocator
*
iface
,
IMimeAllocator
*
iface
,
ULONG
cb
)
SIZE_T
cb
)
{
{
return
CoTaskMemAlloc
(
cb
);
return
CoTaskMemAlloc
(
cb
);
}
}
...
@@ -2829,7 +2829,7 @@ static LPVOID WINAPI MimeAlloc_Alloc(
...
@@ -2829,7 +2829,7 @@ static LPVOID WINAPI MimeAlloc_Alloc(
static
LPVOID
WINAPI
MimeAlloc_Realloc
(
static
LPVOID
WINAPI
MimeAlloc_Realloc
(
IMimeAllocator
*
iface
,
IMimeAllocator
*
iface
,
LPVOID
pv
,
LPVOID
pv
,
ULONG
cb
)
SIZE_T
cb
)
{
{
return
CoTaskMemRealloc
(
pv
,
cb
);
return
CoTaskMemRealloc
(
pv
,
cb
);
}
}
...
@@ -2841,7 +2841,7 @@ static void WINAPI MimeAlloc_Free(
...
@@ -2841,7 +2841,7 @@ static void WINAPI MimeAlloc_Free(
CoTaskMemFree
(
pv
);
CoTaskMemFree
(
pv
);
}
}
static
ULONG
WINAPI
MimeAlloc_GetSize
(
static
SIZE_T
WINAPI
MimeAlloc_GetSize
(
IMimeAllocator
*
iface
,
IMimeAllocator
*
iface
,
LPVOID
pv
)
LPVOID
pv
)
{
{
...
...
dlls/mapi32/imalloc.c
View file @
bf5dca19
...
@@ -112,9 +112,9 @@ static ULONG WINAPI IMAPIMalloc_fnRelease(LPMALLOC iface)
...
@@ -112,9 +112,9 @@ static ULONG WINAPI IMAPIMalloc_fnRelease(LPMALLOC iface)
/**************************************************************************
/**************************************************************************
* IMAPIMalloc_Alloc
* 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)->(%
l
d)
\n
"
,
iface
,
cb
);
return
LocalAlloc
(
LMEM_FIXED
,
cb
);
return
LocalAlloc
(
LMEM_FIXED
,
cb
);
}
}
...
@@ -122,9 +122,9 @@ static LPVOID WINAPI IMAPIMalloc_fnAlloc(LPMALLOC iface, DWORD cb)
...
@@ -122,9 +122,9 @@ static LPVOID WINAPI IMAPIMalloc_fnAlloc(LPMALLOC iface, DWORD cb)
/**************************************************************************
/**************************************************************************
* IMAPIMalloc_Realloc
* 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, %
l
d)
\n
"
,
iface
,
pv
,
cb
);
if
(
!
pv
)
if
(
!
pv
)
return
LocalAlloc
(
LMEM_FIXED
,
cb
);
return
LocalAlloc
(
LMEM_FIXED
,
cb
);
...
@@ -148,7 +148,7 @@ static void WINAPI IMAPIMalloc_fnFree(LPMALLOC iface, LPVOID pv)
...
@@ -148,7 +148,7 @@ static void WINAPI IMAPIMalloc_fnFree(LPMALLOC iface, LPVOID pv)
/**************************************************************************
/**************************************************************************
* IMAPIMalloc_GetSize
* 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
);
TRACE
(
"(%p)->(%p)
\n
"
,
iface
,
pv
);
return
LocalSize
(
pv
);
return
LocalSize
(
pv
);
...
...
dlls/ole32/ifs.c
View file @
bf5dca19
...
@@ -143,8 +143,8 @@ static BOOL RemoveMemoryLocation(LPCVOID pMem)
...
@@ -143,8 +143,8 @@ static BOOL RemoveMemoryLocation(LPCVOID pMem)
/******************************************************************************
/******************************************************************************
* IMalloc32_QueryInterface [VTABLE]
* 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
);
TRACE
(
"(%s,%p)
\n
"
,
debugstr_guid
(
refiid
),
obj
);
if
(
IsEqualIID
(
&
IID_IUnknown
,
refiid
)
||
IsEqualIID
(
&
IID_IMalloc
,
refiid
))
{
if
(
IsEqualIID
(
&
IID_IUnknown
,
refiid
)
||
IsEqualIID
(
&
IID_IMalloc
,
refiid
))
{
...
@@ -157,21 +157,22 @@ static HRESULT WINAPI IMalloc_fnQueryInterface(LPMALLOC iface,REFIID refiid,LPVO
...
@@ -157,21 +157,22 @@ static HRESULT WINAPI IMalloc_fnQueryInterface(LPMALLOC iface,REFIID refiid,LPVO
/******************************************************************************
/******************************************************************************
* IMalloc32_AddRefRelease [VTABLE]
* IMalloc32_AddRefRelease [VTABLE]
*/
*/
static
ULONG
WINAPI
IMalloc_fnAddRefRelease
(
LPMALLOC
iface
)
{
static
ULONG
WINAPI
IMalloc_fnAddRefRelease
(
IMalloc
*
iface
)
{
return
1
;
return
1
;
}
}
/******************************************************************************
/******************************************************************************
* IMalloc32_Alloc [VTABLE]
* IMalloc32_Alloc [VTABLE]
*/
*/
static
LPVOID
WINAPI
IMalloc_fnAlloc
(
LPMALLOC
iface
,
DWORD
cb
)
{
static
void
*
WINAPI
IMalloc_fnAlloc
(
IMalloc
*
iface
,
SIZE_T
cb
)
{
LPVOID
addr
;
void
*
addr
;
TRACE
(
"(%d)
\n
"
,
cb
);
TRACE
(
"(%
l
d)
\n
"
,
cb
);
if
(
Malloc32
.
pSpy
)
{
if
(
Malloc32
.
pSpy
)
{
DWORD
preAllocResult
;
SIZE_T
preAllocResult
;
EnterCriticalSection
(
&
IMalloc32_SpyCS
);
EnterCriticalSection
(
&
IMalloc32_SpyCS
);
preAllocResult
=
IMallocSpy_PreAlloc
(
Malloc32
.
pSpy
,
cb
);
preAllocResult
=
IMallocSpy_PreAlloc
(
Malloc32
.
pSpy
,
cb
);
...
@@ -198,14 +199,14 @@ static LPVOID WINAPI IMalloc_fnAlloc(LPMALLOC iface, DWORD cb) {
...
@@ -198,14 +199,14 @@ static LPVOID WINAPI IMalloc_fnAlloc(LPMALLOC iface, DWORD cb) {
/******************************************************************************
/******************************************************************************
* IMalloc32_Realloc [VTABLE]
* 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
)
{
LPVOID
pNewMemory
;
void
*
pNewMemory
;
TRACE
(
"(%p,%d)
\n
"
,
pv
,
cb
);
TRACE
(
"(%p,%
l
d)
\n
"
,
pv
,
cb
);
if
(
Malloc32
.
pSpy
)
{
if
(
Malloc32
.
pSpy
)
{
LPVOID
pRealMemory
;
void
*
pRealMemory
;
BOOL
fSpyed
;
BOOL
fSpyed
;
EnterCriticalSection
(
&
IMalloc32_SpyCS
);
EnterCriticalSection
(
&
IMalloc32_SpyCS
);
...
@@ -250,8 +251,8 @@ static LPVOID WINAPI IMalloc_fnRealloc(LPMALLOC iface,LPVOID pv,DWORD cb) {
...
@@ -250,8 +251,8 @@ static LPVOID WINAPI IMalloc_fnRealloc(LPMALLOC iface,LPVOID pv,DWORD cb) {
/******************************************************************************
/******************************************************************************
* IMalloc32_Free [VTABLE]
* IMalloc32_Free [VTABLE]
*/
*/
static
VOID
WINAPI
IMalloc_fnFree
(
LPMALLOC
iface
,
LPVOID
pv
)
{
static
void
WINAPI
IMalloc_fnFree
(
IMalloc
*
iface
,
void
*
pv
)
{
BOOL
fSpyed
=
FALSE
;
BOOL
fSpyed
=
FALSE
;
TRACE
(
"(%p)
\n
"
,
pv
);
TRACE
(
"(%p)
\n
"
,
pv
);
...
@@ -286,9 +287,9 @@ static VOID WINAPI IMalloc_fnFree(LPMALLOC iface,LPVOID pv) {
...
@@ -286,9 +287,9 @@ static VOID WINAPI IMalloc_fnFree(LPMALLOC iface,LPVOID pv) {
* win95: size allocated (4 byte boundarys)
* win95: size allocated (4 byte boundarys)
* win2k: size originally requested !!! (allocated on 8 byte boundarys)
* win2k: size originally requested !!! (allocated on 8 byte boundarys)
*/
*/
static
DWORD
WINAPI
IMalloc_fnGetSize
(
LPMALLOC
iface
,
LPVOID
pv
)
{
static
SIZE_T
WINAPI
IMalloc_fnGetSize
(
IMalloc
*
iface
,
void
*
pv
)
{
DWORD
cb
;
SIZE_T
cb
;
BOOL
fSpyed
=
FALSE
;
BOOL
fSpyed
=
FALSE
;
TRACE
(
"(%p)
\n
"
,
pv
);
TRACE
(
"(%p)
\n
"
,
pv
);
...
@@ -311,8 +312,8 @@ static DWORD WINAPI IMalloc_fnGetSize(LPMALLOC iface,LPVOID pv) {
...
@@ -311,8 +312,8 @@ static DWORD WINAPI IMalloc_fnGetSize(LPMALLOC iface,LPVOID pv) {
/******************************************************************************
/******************************************************************************
* IMalloc32_DidAlloc [VTABLE]
* IMalloc32_DidAlloc [VTABLE]
*/
*/
static
INT
WINAPI
IMalloc_fnDidAlloc
(
LPMALLOC
iface
,
LPVOID
pv
)
{
static
INT
WINAPI
IMalloc_fnDidAlloc
(
IMalloc
*
iface
,
void
*
pv
)
{
BOOL
fSpyed
=
FALSE
;
BOOL
fSpyed
=
FALSE
;
int
didAlloc
;
int
didAlloc
;
...
@@ -335,7 +336,8 @@ static INT WINAPI IMalloc_fnDidAlloc(LPMALLOC iface,LPVOID pv) {
...
@@ -335,7 +336,8 @@ static INT WINAPI IMalloc_fnDidAlloc(LPMALLOC iface,LPVOID pv) {
/******************************************************************************
/******************************************************************************
* IMalloc32_HeapMinimize [VTABLE]
* IMalloc32_HeapMinimize [VTABLE]
*/
*/
static
VOID
WINAPI
IMalloc_fnHeapMinimize
(
LPMALLOC
iface
)
{
static
void
WINAPI
IMalloc_fnHeapMinimize
(
IMalloc
*
iface
)
{
TRACE
(
"()
\n
"
);
TRACE
(
"()
\n
"
);
if
(
Malloc32
.
pSpy
)
{
if
(
Malloc32
.
pSpy
)
{
...
@@ -398,7 +400,7 @@ HRESULT WINAPI CoGetMalloc(DWORD context, IMalloc **imalloc)
...
@@ -398,7 +400,7 @@ HRESULT WINAPI CoGetMalloc(DWORD context, IMalloc **imalloc)
* Success: Pointer to newly allocated memory block.
* Success: Pointer to newly allocated memory block.
* Failure: NULL.
* Failure: NULL.
*/
*/
LPVOID
WINAPI
CoTaskMemAlloc
(
ULONG
size
)
LPVOID
WINAPI
CoTaskMemAlloc
(
SIZE_T
size
)
{
{
return
IMalloc_Alloc
(
&
Malloc32
.
IMalloc_iface
,
size
);
return
IMalloc_Alloc
(
&
Malloc32
.
IMalloc_iface
,
size
);
}
}
...
@@ -432,7 +434,7 @@ VOID WINAPI CoTaskMemFree(LPVOID ptr)
...
@@ -432,7 +434,7 @@ VOID WINAPI CoTaskMemFree(LPVOID ptr)
* Success: Pointer to newly allocated memory block.
* Success: Pointer to newly allocated memory block.
* Failure: NULL.
* 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
);
return
IMalloc_Realloc
(
&
Malloc32
.
IMalloc_iface
,
pvOld
,
size
);
}
}
...
...
include/objbase.h
View file @
bf5dca19
...
@@ -304,9 +304,9 @@ HRESULT WINAPI CoGetInstanceFromFile(COSERVERINFO* pServerInfo, CLSID* pClsid, I
...
@@ -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
CoGetInstanceFromIStorage
(
COSERVERINFO
*
pServerInfo
,
CLSID
*
pClsid
,
IUnknown
*
punkOuter
,
DWORD
dwClsCtx
,
IStorage
*
pstg
,
DWORD
dwCount
,
MULTI_QI
*
pResults
);
HRESULT
WINAPI
CoGetMalloc
(
DWORD
dwMemContext
,
LPMALLOC
*
lpMalloc
);
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
);
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
CoRegisterMallocSpy
(
LPMALLOCSPY
pMallocSpy
);
HRESULT
WINAPI
CoRevokeMallocSpy
(
void
);
HRESULT
WINAPI
CoRevokeMallocSpy
(
void
);
...
...
include/objidl.idl
View file @
bf5dca19
...
@@ -162,16 +162,16 @@ interface IMalloc : IUnknown
...
@@ -162,16 +162,16 @@ interface IMalloc : IUnknown
typedef
[
unique
]
IMalloc
*
LPMALLOC
;
typedef
[
unique
]
IMalloc
*
LPMALLOC
;
LPVOID
Alloc
(
LPVOID
Alloc
(
[
in
]
ULONG
cb
)
;
[
in
]
SIZE_T
cb
)
;
LPVOID
Realloc
(
LPVOID
Realloc
(
[
in
]
LPVOID
pv
,
[
in
]
LPVOID
pv
,
[
in
]
ULONG
cb
)
;
[
in
]
SIZE_T
cb
)
;
void
Free
(
void
Free
(
[
in
]
LPVOID
pv
)
;
[
in
]
LPVOID
pv
)
;
ULONG
GetSize
(
SIZE_T
GetSize
(
[
in
]
LPVOID
pv
)
;
[
in
]
LPVOID
pv
)
;
int
DidAlloc
(
LPVOID
pv
)
;
int
DidAlloc
(
LPVOID
pv
)
;
...
@@ -188,8 +188,8 @@ interface IMallocSpy : IUnknown
...
@@ -188,8 +188,8 @@ interface IMallocSpy : IUnknown
{
{
typedef
[
unique
]
IMallocSpy
*
LPMALLOCSPY
;
typedef
[
unique
]
IMallocSpy
*
LPMALLOCSPY
;
ULONG
PreAlloc
(
SIZE_T
PreAlloc
(
[
in
]
ULONG
cbRequest
)
;
[
in
]
SIZE_T
cbRequest
)
;
LPVOID
PostAlloc
(
LPVOID
PostAlloc
(
[
in
]
LPVOID
pActual
)
;
[
in
]
LPVOID
pActual
)
;
...
@@ -201,9 +201,9 @@ interface IMallocSpy : IUnknown
...
@@ -201,9 +201,9 @@ interface IMallocSpy : IUnknown
void
PostFree
(
void
PostFree
(
[
in
]
BOOL
fSpyed
)
;
[
in
]
BOOL
fSpyed
)
;
ULONG
PreRealloc
(
SIZE_T
PreRealloc
(
[
in
]
LPVOID
pRequest
,
[
in
]
LPVOID
pRequest
,
[
in
]
ULONG
cbRequest
,
[
in
]
SIZE_T
cbRequest
,
[
out
]
LPVOID
*
ppNewRequest
,
[
out
]
LPVOID
*
ppNewRequest
,
[
in
]
BOOL
fSpyed
)
;
[
in
]
BOOL
fSpyed
)
;
...
@@ -215,8 +215,8 @@ interface IMallocSpy : IUnknown
...
@@ -215,8 +215,8 @@ interface IMallocSpy : IUnknown
[
in
]
LPVOID
pRequest
,
[
in
]
LPVOID
pRequest
,
[
in
]
BOOL
fSpyed
)
;
[
in
]
BOOL
fSpyed
)
;
ULONG
PostGetSize
(
SIZE_T
PostGetSize
(
[
in
]
ULONG
cbActual
,
[
in
]
SIZE_T
cbActual
,
[
in
]
BOOL
fSpyed
)
;
[
in
]
BOOL
fSpyed
)
;
LPVOID
PreDidAlloc
(
LPVOID
PreDidAlloc
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment