Allows monitoring of a loading operation to begin. When the operation is complete, the application must call ILayoutStorage::EndMonitor.
HRESULT BeginMonitor(void);
This function supports the standard return values E_OUTOFMEMORY, E_UNEXPECTED, E_INVALIDARG, and E_FAIL, as well as the following:
Normally an application calls BeginMonitor before the actual loading begins. Once this method has been called, the compound file implementation regards any operation performed on the files storages and streams as part of the desired access pattern. The result is a layout script like that created explicitly by calling ILayoutStorage::LayoutScript.
Applications will usually use monitoring to obtain the access pattern of embedded objects. Monitoring also makes possible generic layout tools, such as the Docfile Layout Tool (dflayout.exe) included in the Win32 SDK, that launch existing applications and monitor their access patterns.
A call to ILayoutStorage::EndMonitor ends monitoring. Multiple calls to BeginMonitor/EndMonitor are permitted. Monitoring can also be mixed with calls to ILayoutStorage::LayoutScript.
Windows NT: Use version 4.0 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in objidl.h.
ILayoutStorage::EndMonitor, ILayoutStorage::LayoutScript