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

Last reviewed: May 17, 1995
Article ID: Q111614
The information in this article applies to:
  • Microsoft OLE Libraries for Windows and Win32s, version 2.01
  • Microsoft OLE Libraries, included with:

        - Microsoft Windows NT, versions 3.5 and 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. We are researching this problem and will post new information here as it becomes available.


Additional reference words: 2.01 3.50 4.00
KBCategory: kbole kbbuglist
KBSubcategory: LeTwoPrs


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 17, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.