Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
07478c2e
Commit
07478c2e
authored
Feb 28, 1999
by
Francis Beaudet
Committed by
Alexandre Julliard
Feb 28, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented the CoTaskMemRealloc API. Also clean-up around that API
call.
parent
b67b8e7a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
5 deletions
+26
-5
compobj.c
ole/compobj.c
+25
-4
ole32.spec
relay32/ole32.spec
+1
-1
No files found.
ole/compobj.c
View file @
07478c2e
...
...
@@ -1407,9 +1407,10 @@ LPVOID WINAPI CoTaskMemAlloc(
LPMALLOC
lpmalloc
;
HRESULT
ret
=
CoGetMalloc
(
0
,
&
lpmalloc
);
if
(
ret
)
if
(
FAILED
(
ret
)
)
return
NULL
;
return
lpmalloc
->
lpvtbl
->
fnAlloc
(
lpmalloc
,
size
);
return
IMalloc_Alloc
(
lpmalloc
,
size
);
}
/***********************************************************************
...
...
@@ -1421,8 +1422,28 @@ VOID WINAPI CoTaskMemFree(
LPMALLOC
lpmalloc
;
HRESULT
ret
=
CoGetMalloc
(
0
,
&
lpmalloc
);
if
(
ret
)
return
;
lpmalloc
->
lpvtbl
->
fnFree
(
lpmalloc
,
ptr
);
if
(
FAILED
(
ret
))
return
;
IMalloc_Free
(
lpmalloc
,
ptr
);
}
/***********************************************************************
* CoTaskMemRealloc (OLE32.45)
* RETURNS
* pointer to newly allocated block
*/
LPVOID
WINAPI
CoTaskMemRealloc
(
LPVOID
pvOld
,
ULONG
size
)
/* [in] size of memoryblock to be allocated */
{
LPMALLOC
lpmalloc
;
HRESULT
ret
=
CoGetMalloc
(
0
,
&
lpmalloc
);
if
(
FAILED
(
ret
))
return
NULL
;
return
IMalloc_Realloc
(
lpmalloc
,
pvOld
,
size
);
}
/***********************************************************************
...
...
relay32/ole32.spec
View file @
07478c2e
...
...
@@ -45,7 +45,7 @@ type win32
42 stdcall CoSetState(ptr) CoSetState
43 stdcall CoTaskMemAlloc(long) CoTaskMemAlloc
44 stdcall CoTaskMemFree(ptr) CoTaskMemFree
45 st
ub CoTaskMemRealloc # stdcall (ptr long) return 0,ERR_NOTIMPLEMENTED
45 st
dcall CoTaskMemRealloc(ptr long) CoTaskMemRealloc
46 stub CoTreatAsClass # stdcall (ptr ptr) return 0,ERR_NOTIMPLEMENTED
47 stdcall CoUninitialize() CoUninitialize
48 stub CoUnloadingWOW
...
...
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