OLE Methods and Callbacks Must Not Call OLE Functions

ID: Q83018


The information in this article applies to:
  • Microsoft OLE, version 1.0


SUMMARY

In an application developed using the object linking and embedding (OLE) libraries, any callback function (also known as a method) must not call any OLE library function. An application can call an OLE function only outside the context of the callback functions, which include all functions referred to in the OLECLIENTVTBL, OLESTREAMVTBL, OLEOBJECTVTBL, OLESERVERVTBL, and OLESERVERDOCVTBL structures defined in the OLE.H header file.

Windows calls a callback function while the OLE libraries are performing an asynchronous operation. Any object affected during the operation is marked as busy; therefore, calling any OLE function that may affect that object is forbidden.

Most OLE functions return an error code when used from a callback function. The one exception to this rule is during processing of the OLESERVERDOC Close method. When this method is called, the server application must call OleRevokeServerDoc. If this call generates an OLE_WAIT_FOR_RELEASE return code, the server ignores the returned value. The OLE server library calls the Close method to close a document unconditionally.

Additional query words: 1.00

Keywords : kbole kbprg kbGrpCom kbDSupport
Version : :1.0
Platform :
Issue type :


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