The default handler's IDataObject delegates, for the most part, to the data cache. The only two functions that will run the object are GetData and GetDataHere. These functions also connect the cache to the newly running object. The default handler's behavior is described in Table 19-2. As with IOleObject, the default handler will remember calls to DAdvise, DUnadvise, and EnumDAdvise and forward them when the object is run.
Member Function | Action |
DAdvise | Calls CreateDataAdviseHolder if an advise holder has not yet been created. In either case, delegates to IDataAdviseHolder::Advise. |
DUnadvise | Delegates to IDataAdviseHolder::Unadvise. |
EnumDAdvise | Delegates to IDataAdviseHolder::EnumAdvise. |
EnumFormatEtc | Delegates to OleRegEnumFormatEtc. |
GetCanonicalFormatEtc | Returns OLE_E_NOTRUNNING. |
GetData* | If the object is not running, runs it and calls the cache's IOleCacheControl::OnRun to connect the cache to the object. |
GetDataHere* | Same as for GetData. |
QueryGetData | Delegates to the cache. |
SetData | Delegates to the cache. |
* Launches the local server
Table 19-2.
Behavior of the default handler's IDataObject interface for a non-running object.
If the object is running, the default handler still maintains the advisory connections. For calls that it normally delegates to the cache, it will still ask the cache first. If the cache fails, the default handler will delegate to the running object. All other calls are delegated to the running object directly.