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
8355eeaa
Commit
8355eeaa
authored
Nov 24, 2008
by
Huw Davies
Committed by
Alexandre Julliard
Nov 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Defer releasing the delegate interfaces until after we return from an OnClose notification.
parent
8730bf66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
defaulthandler.c
dlls/ole32/defaulthandler.c
+19
-2
No files found.
dlls/ole32/defaulthandler.c
View file @
8355eeaa
...
...
@@ -71,6 +71,12 @@ enum storage_state
storage_state_loaded
};
enum
object_state
{
object_state_not_running
,
object_state_running
};
/****************************************************************************
* DefaultHandler
*
...
...
@@ -123,6 +129,7 @@ struct DefaultHandler
IPersistStorage
*
pPSDelegate
;
/* IDataObject delegate */
IDataObject
*
pDataDelegate
;
enum
object_state
object_state
;
/* connection cookie for the advise on the delegate OLE object */
DWORD
dwAdvConn
;
...
...
@@ -452,7 +459,7 @@ static void DefaultHandler_Stop(DefaultHandler *This)
if
(
This
->
dataAdviseHolder
)
DataAdviseHolder_OnDisconnect
(
This
->
dataAdviseHolder
);
release_delegates
(
This
)
;
This
->
object_state
=
object_state_not_running
;
}
/************************************************************************
...
...
@@ -478,6 +485,7 @@ static HRESULT WINAPI DefaultHandler_Close(
hr
=
IOleObject_Close
(
This
->
pOleDelegate
,
dwSaveOption
);
DefaultHandler_Stop
(
This
);
release_delegates
(
This
);
return
hr
;
}
...
...
@@ -1305,11 +1313,15 @@ static HRESULT WINAPI DefaultHandler_Run(
if
(
object_is_running
(
This
))
return
S_OK
;
release_delegates
(
This
);
hr
=
CoCreateInstance
(
&
This
->
clsid
,
NULL
,
CLSCTX_LOCAL_SERVER
,
&
IID_IOleObject
,
(
void
**
)
&
This
->
pOleDelegate
);
if
(
FAILED
(
hr
))
return
hr
;
This
->
object_state
=
object_state_running
;
hr
=
IOleObject_Advise
(
This
->
pOleDelegate
,
(
IAdviseSink
*
)
&
This
->
lpvtblIAdviseSink
,
&
This
->
dwAdvConn
);
...
...
@@ -1348,7 +1360,10 @@ static HRESULT WINAPI DefaultHandler_Run(
hr
=
DataAdviseHolder_OnConnect
(
This
->
dataAdviseHolder
,
This
->
pDataDelegate
);
if
(
FAILED
(
hr
))
{
DefaultHandler_Stop
(
This
);
release_delegates
(
This
);
}
return
hr
;
}
...
...
@@ -1365,7 +1380,7 @@ static BOOL WINAPI DefaultHandler_IsRunning(
TRACE
(
"()
\n
"
);
if
(
This
->
pOleDelegate
)
if
(
This
->
object_state
==
object_state_running
)
return
TRUE
;
else
return
FALSE
;
...
...
@@ -1943,6 +1958,7 @@ static DefaultHandler* DefaultHandler_Construct(
This
->
pOleDelegate
=
NULL
;
This
->
pPSDelegate
=
NULL
;
This
->
pDataDelegate
=
NULL
;
This
->
object_state
=
object_state_not_running
;
This
->
dwAdvConn
=
0
;
This
->
storage
=
NULL
;
...
...
@@ -1956,6 +1972,7 @@ static void DefaultHandler_Destroy(
{
/* release delegates */
DefaultHandler_Stop
(
This
);
release_delegates
(
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
containerApp
);
This
->
containerApp
=
NULL
;
...
...
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