Chapter 7 Callback Functions and Data Structures

This chapter describes the OLE data strucutures and callback functions that are used to communicate with the client and server applications.

OLE uses data structures that are Virtual Tables (VTBLs) to store pointers to OLE functions and OLE application callback functions. The first part of this chapter outlines the various data structures that OLE uses, and is divided into structures that are used by server applications and VTBLs that are used by client applications.

Server data structures include:

OLESERVER OLESERVERVTBL
OLESERVERDOC OLESEVERDOCVTBL
OLEOBJECT OLEOBJECTVTBL

Client data structures include:

OLESTREAM OLESTREAMVTBL
OLECLIENT OLECLIENTVTBL

Note The OLE data structures work in pairs; the first structure contains a pointer to the second ( for example, OLESERVER points to OLESERVERVTBL). The second structure (StructureNameVTBL) contains pointers to member functions.

The second part of this chapter is a listing of all the OLE callback functions and situations that cause a callback function to be called. The sequence of callback functions is given, since callbacks take place in a definite order that you must understand to code OLE applications efficiently.