BUG: IOleCache::Cache(), ADVF_DATAONSTOP, and OLE 1.0 Objects

ID: Q111614


The information in this article applies to:
  • Microsoft OLE Libraries for Windows and Win32s, version 2.01
  • Microsoft OLE Libraries, used with:
    • Microsoft Windows NT, versions 3.5, 3.51
    • Microsoft Windows 95


SYMPTOMS

An OLE 2.0 container application document contains an embedded OLE 1.0 object. The container calls IOleCache::Cache() to control the cached presentation data for the object, and specifies ADVF_DATAONSTOP as the advise flag to Cache(). The user makes some changes to the object in the OLE 1.0 server, then attempts to update the object's presentation in the server by choosing the Update command from the File menu. Finally, the user closes the object server.

In this specific scenario, the object's presentation in the server is not updated. The object's native data, however, is correct.


CAUSE

When the user selects Update, the presentation for the object does not go across to the cache or the container, because the container specified ADVF_DATAONSTOP as the cache option. As part of the update operation, the server internally marks the object as "not dirty". Because the object is not dirty, when the server is subsequently closed, it does not send any data to the container or the cache.


RESOLUTION

Container applications should not specify the ADVF_DATAONSTOP flag when calling IOleCache::Cache(). Instead, they should specify ADVFCACHE_ONSAVE. When ADVFCACHE_ONSAVE is used, the OLE 1.0 object's cached presentation data will be updated correctly.


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

Additional query words: 2.01 3.50 4.00 kbbuglist

Keywords : kbole kbNTOS350bug kbNTOS351bug kbOLE200bug kbWinOS95bug kbGrpCom kbDSupport
Version : WINDOWS:2.01,95; :
Platform : WINDOWS
Issue type :


Last Reviewed: October 26, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.