Microsoft KB Archive/83018

= OLE Methods and Callbacks Must Not Call OLE Functions =

Article ID: 83018

Article Last Modified on 10/27/1999

-

APPLIES TO


 * Microsoft OLE 1.0

-



This article was previously published under Q83018



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: kbprogramming KB83018

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.