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
22c97cd9
Commit
22c97cd9
authored
Oct 26, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Oct 26, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement a Stop function and use this to properly implement
IOleObject_Close, IAdviseSink_OnClose and the destructor.
parent
5c2a708d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
7 deletions
+41
-7
defaulthandler.c
dlls/ole32/defaulthandler.c
+41
-7
No files found.
dlls/ole32/defaulthandler.c
View file @
22c97cd9
...
@@ -394,6 +394,25 @@ static HRESULT WINAPI DefaultHandler_SetHostNames(
...
@@ -394,6 +394,25 @@ static HRESULT WINAPI DefaultHandler_SetHostNames(
return
S_OK
;
return
S_OK
;
}
}
/* undos the work done by DefaultHandler_Run */
static
void
WINAPI
DefaultHandler_Stop
(
DefaultHandler
*
This
)
{
if
(
!
This
->
pOleDelegate
)
return
;
IOleObject_Unadvise
(
This
->
pOleDelegate
,
This
->
dwAdvConn
);
/* FIXME: call IOleCache_OnStop */
if
(
This
->
pPSDelegate
)
{
IPersistStorage_Release
(
This
->
pPSDelegate
);
This
->
pPSDelegate
=
NULL
;
}
IOleObject_Release
(
This
->
pOleDelegate
);
This
->
pOleDelegate
=
NULL
;
}
/************************************************************************
/************************************************************************
* DefaultHandler_Close (IOleObject)
* DefaultHandler_Close (IOleObject)
*
*
...
@@ -406,8 +425,19 @@ static HRESULT WINAPI DefaultHandler_Close(
...
@@ -406,8 +425,19 @@ static HRESULT WINAPI DefaultHandler_Close(
IOleObject
*
iface
,
IOleObject
*
iface
,
DWORD
dwSaveOption
)
DWORD
dwSaveOption
)
{
{
FIXME
(
"()
\n
"
);
DefaultHandler
*
This
=
impl_from_IOleObject
(
iface
);
HRESULT
hr
;
TRACE
(
"(%ld)
\n
"
,
dwSaveOption
);
if
(
!
This
->
pOleDelegate
)
return
S_OK
;
return
S_OK
;
hr
=
IOleObject_Close
(
This
->
pOleDelegate
,
dwSaveOption
);
DefaultHandler_Stop
(
This
);
return
hr
;
}
}
/************************************************************************
/************************************************************************
...
@@ -1204,7 +1234,7 @@ static HRESULT WINAPI DefaultHandler_Run(
...
@@ -1204,7 +1234,7 @@ static HRESULT WINAPI DefaultHandler_Run(
/* FIXME: do more stuff here:
/* FIXME: do more stuff here:
* - IOleObject_GetMiscStatus
* - IOleObject_GetMiscStatus
* - IOleObject_GetMoniker
* - IOleObject_GetMoniker
* -
advise data cache that we've connected somehow?
* -
IOleCache_OnRun
*/
*/
/* FIXME: if we failed, Close the object */
/* FIXME: if we failed, Close the object */
...
@@ -1321,7 +1351,13 @@ static void WINAPI DefaultHandler_IAdviseSink_OnSave(
...
@@ -1321,7 +1351,13 @@ static void WINAPI DefaultHandler_IAdviseSink_OnSave(
static
void
WINAPI
DefaultHandler_IAdviseSink_OnClose
(
static
void
WINAPI
DefaultHandler_IAdviseSink_OnClose
(
IAdviseSink
*
iface
)
IAdviseSink
*
iface
)
{
{
FIXME
(
": stub
\n
"
);
DefaultHandler
*
This
=
impl_from_IAdviseSink
(
iface
);
TRACE
(
"()
\n
"
);
IOleAdviseHolder_SendOnClose
(
This
->
oleAdviseHolder
);
DefaultHandler_Stop
(
This
);
}
}
/*
/*
...
@@ -1472,10 +1508,8 @@ static DefaultHandler* DefaultHandler_Construct(
...
@@ -1472,10 +1508,8 @@ static DefaultHandler* DefaultHandler_Construct(
static
void
DefaultHandler_Destroy
(
static
void
DefaultHandler_Destroy
(
DefaultHandler
*
This
)
DefaultHandler
*
This
)
{
{
if
(
This
->
pOleDelegate
)
/* release delegates */
IOleObject_Release
(
This
->
pOleDelegate
);
DefaultHandler_Stop
(
This
);
if
(
This
->
pPSDelegate
)
IPersistStorage_Release
(
This
->
pPSDelegate
);
/* Free the strings idenfitying the object */
/* Free the strings idenfitying the object */
HeapFree
(
GetProcessHeap
(),
0
,
This
->
containerApp
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
containerApp
);
...
...
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