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
e4828b6b
Commit
e4828b6b
authored
Mar 10, 1999
by
Francis Beaudet
Committed by
Alexandre Julliard
Mar 10, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementation of the ReleaseStgMedium method.
parent
026d9db8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
100 additions
and
1 deletion
+100
-1
ole2.c
ole/ole2.c
+99
-0
ole32.spec
relay32/ole32.spec
+1
-1
No files found.
ole/ole2.c
View file @
e4828b6b
...
...
@@ -500,6 +500,105 @@ HRESULT WINAPI OleSetMenuDescriptor(
return
E_FAIL
;
}
/***********************************************************************
* ReleaseStgMedium [OLE32.140]
*/
void
WINAPI
ReleaseStgMedium
(
STGMEDIUM
*
pmedium
)
{
switch
(
pmedium
->
tymed
)
{
case
TYMED_HGLOBAL
:
{
if
(
(
pmedium
->
pUnkForRelease
==
0
)
&&
(
pmedium
->
u
.
hGlobal
!=
0
)
)
GlobalFree
(
pmedium
->
u
.
hGlobal
);
pmedium
->
u
.
hGlobal
=
0
;
break
;
}
case
TYMED_FILE
:
{
if
(
pmedium
->
u
.
lpszFileName
!=
0
)
{
if
(
pmedium
->
pUnkForRelease
==
0
)
{
DeleteFileW
(
pmedium
->
u
.
lpszFileName
);
}
CoTaskMemFree
(
pmedium
->
u
.
lpszFileName
);
}
pmedium
->
u
.
lpszFileName
=
0
;
break
;
}
case
TYMED_ISTREAM
:
{
if
(
pmedium
->
u
.
pstm
!=
0
)
{
IStream_Release
(
pmedium
->
u
.
pstm
);
}
pmedium
->
u
.
pstm
=
0
;
break
;
}
case
TYMED_ISTORAGE
:
{
if
(
pmedium
->
u
.
pstg
!=
0
)
{
IStorage_Release
(
pmedium
->
u
.
pstg
);
}
pmedium
->
u
.
pstg
=
0
;
break
;
}
case
TYMED_GDI
:
{
if
(
(
pmedium
->
pUnkForRelease
==
0
)
&&
(
pmedium
->
u
.
hGlobal
!=
0
)
)
DeleteObject
(
pmedium
->
u
.
hGlobal
);
pmedium
->
u
.
hGlobal
=
0
;
break
;
}
case
TYMED_MFPICT
:
{
if
(
(
pmedium
->
pUnkForRelease
==
0
)
&&
(
pmedium
->
u
.
hMetaFilePict
!=
0
)
)
{
DeleteMetaFile
(
pmedium
->
u
.
hMetaFilePict
);
GlobalFree
(
pmedium
->
u
.
hMetaFilePict
);
}
pmedium
->
u
.
hMetaFilePict
=
0
;
break
;
}
case
TYMED_ENHMF
:
{
if
(
(
pmedium
->
pUnkForRelease
==
0
)
&&
(
pmedium
->
u
.
hEnhMetaFile
!=
0
)
)
{
DeleteEnhMetaFile
(
pmedium
->
u
.
hEnhMetaFile
);
}
pmedium
->
u
.
hEnhMetaFile
=
0
;
break
;
}
case
TYMED_NULL
:
default:
break
;
}
/*
* After cleaning up, the unknown is released
*/
if
(
pmedium
->
pUnkForRelease
!=
0
)
{
IUnknown_Release
(
pmedium
->
pUnkForRelease
);
pmedium
->
pUnkForRelease
=
0
;
}
}
/***
* OLEDD_Initialize()
*
...
...
relay32/ole32.spec
View file @
e4828b6b
...
...
@@ -140,7 +140,7 @@ type win32
137 stub ReadOleStg
138 stub ReadStringStream
139 stdcall RegisterDragDrop(long ptr) RegisterDragDrop
140 st
ub
ReleaseStgMedium
140 st
dcall ReleaseStgMedium(ptr)
ReleaseStgMedium
141 stdcall RevokeDragDrop(long) RevokeDragDrop
142 stub SetConvertStg
143 stub SetDocumentBitStg
...
...
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