Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Felix Münchhalfen
wine
Commits
e4828b6b
Commit
e4828b6b
authored
26 years ago
by
Francis Beaudet
Committed by
Alexandre Julliard
26 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Implementation of the ReleaseStgMedium method.
parent
026d9db8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ole/ole2.c
+99
-0
99 additions, 0 deletions
ole/ole2.c
relay32/ole32.spec
+1
-1
1 addition, 1 deletion
relay32/ole32.spec
with
100 additions
and
1 deletion
ole/ole2.c
+
99
−
0
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()
*
...
...
This diff is collapsed.
Click to expand it.
relay32/ole32.spec
+
1
−
1
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment