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
92202fef
Commit
92202fef
authored
Oct 23, 2008
by
Huw Davies
Committed by
Alexandre Julliard
Oct 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Call the appropriate storage function when we run the object.
parent
c9b8a285
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
1 deletion
+50
-1
defaulthandler.c
dlls/ole32/defaulthandler.c
+50
-1
No files found.
dlls/ole32/defaulthandler.c
View file @
92202fef
...
...
@@ -64,6 +64,13 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
enum
storage_state
{
storage_state_uninitialised
,
storage_state_initialised
,
storage_state_loaded
};
/****************************************************************************
* DefaultHandler
*
...
...
@@ -119,6 +126,10 @@ struct DefaultHandler
/* connection cookie for the advise on the delegate OLE object */
DWORD
dwAdvConn
;
/* storage passed to Load or InitNew */
IStorage
*
storage
;
enum
storage_state
storage_state
;
};
typedef
struct
DefaultHandler
DefaultHandler
;
...
...
@@ -1302,7 +1313,12 @@ static HRESULT WINAPI DefaultHandler_Run(
IOleObject_QueryInterface
(
This
->
pOleDelegate
,
&
IID_IPersistStorage
,
(
void
**
)
&
This
->
pPSDelegate
);
if
(
This
->
pPSDelegate
)
hr
=
IPersistStorage_InitNew
(
This
->
pPSDelegate
,
NULL
);
{
if
(
This
->
storage_state
==
storage_state_initialised
)
hr
=
IPersistStorage_InitNew
(
This
->
pPSDelegate
,
This
->
storage
);
else
if
(
This
->
storage_state
==
storage_state_loaded
)
hr
=
IPersistStorage_Load
(
This
->
pPSDelegate
,
This
->
storage
);
}
}
if
(
SUCCEEDED
(
hr
)
&&
This
->
containerApp
)
...
...
@@ -1548,6 +1564,13 @@ static HRESULT WINAPI DefaultHandler_IPersistStorage_InitNew(
if
(
SUCCEEDED
(
hr
)
&&
object_is_running
(
This
))
hr
=
IPersistStorage_InitNew
(
This
->
pPSDelegate
,
pStg
);
if
(
SUCCEEDED
(
hr
))
{
IStorage_AddRef
(
pStg
);
This
->
storage
=
pStg
;
This
->
storage_state
=
storage_state_initialised
;
}
return
hr
;
}
...
...
@@ -1570,6 +1593,12 @@ static HRESULT WINAPI DefaultHandler_IPersistStorage_Load(
if
(
SUCCEEDED
(
hr
)
&&
object_is_running
(
This
))
hr
=
IPersistStorage_Load
(
This
->
pPSDelegate
,
pStg
);
if
(
SUCCEEDED
(
hr
))
{
IStorage_AddRef
(
pStg
);
This
->
storage
=
pStg
;
This
->
storage_state
=
storage_state_loaded
;
}
return
hr
;
}
...
...
@@ -1614,6 +1643,14 @@ static HRESULT WINAPI DefaultHandler_IPersistStorage_SaveCompleted(
if
(
SUCCEEDED
(
hr
)
&&
object_is_running
(
This
))
hr
=
IPersistStorage_SaveCompleted
(
This
->
pPSDelegate
,
pStgNew
);
if
(
pStgNew
)
{
IStorage_AddRef
(
pStgNew
);
if
(
This
->
storage
)
IStorage_Release
(
This
->
storage
);
This
->
storage
=
pStgNew
;
This
->
storage_state
=
storage_state_loaded
;
}
return
hr
;
}
...
...
@@ -1635,6 +1672,10 @@ static HRESULT WINAPI DefaultHandler_IPersistStorage_HandsOffStorage(
if
(
SUCCEEDED
(
hr
)
&&
object_is_running
(
This
))
hr
=
IPersistStorage_HandsOffStorage
(
This
->
pPSDelegate
);
if
(
This
->
storage
)
IStorage_Release
(
This
->
storage
);
This
->
storage
=
NULL
;
This
->
storage_state
=
storage_state_uninitialised
;
return
hr
;
}
...
...
@@ -1795,6 +1836,8 @@ static DefaultHandler* DefaultHandler_Construct(
This
->
pDataDelegate
=
NULL
;
This
->
dwAdvConn
=
0
;
This
->
storage
=
NULL
;
This
->
storage_state
=
storage_state_uninitialised
;
return
This
;
}
...
...
@@ -1836,6 +1879,12 @@ static void DefaultHandler_Destroy(
This
->
dataAdviseHolder
=
NULL
;
}
if
(
This
->
storage
)
{
IStorage_Release
(
This
->
storage
);
This
->
storage
=
NULL
;
}
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
...
...
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