|
IOleCacheControl::OnRun
Notifies the cache that the data source object has now entered its running
state.
HRESULT OnRun(
DATAOBJECT * pDataObject
| //Points to the object that is now running
| );
|
|
Parameter
pDataObject
[in]Points to the object that is entering the running state.
Return Values
S_OK
The cache was notified and pDataObject is valid.
E_OUTOFMEMORY
The cache was not notified because the system ran out of memory.
E_INVALIDARG
One or more invalid arguments.
E_UNEXPECTED
An unexpected error occurred.
Comments
When IOleCacheControl::OnRun is called, the cache sets up advisory connections as necessary with the
source data object so it can receive notifications. The advise sink created between
the running object and the cache is destroyed when IOleCacheControl::OnStop is called.
Some object handlers or in process servers might use the cache in a passive
manner and not call IOleCacheControl::OnRun. These applications will need to call IOleCache2::UpdateCache, IOleCache::InitCache, or IOleCache::SetData to fill the cache when necessary to ensure the cache gets updated.
IOleCacheControl::OnRun does not create a reference count on pDataObject. It is the responsibility of the caller of OleRun to ensure that the lifetime of pDataObject lasts until OnStop is called. As a result, the caller must be holding a pointer to pDataObject.
See Also
IOleCache2::UpdateCache, IOleCacheControl::OnStop
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|