7.1.1 VTBLS and Functions for Server Applications

The members of the three VTBLs created by the server application—OLESERVERVTBL, OLESERVERDOCVTBL, and OLEOBJECTVTBL—contain the far pointers to callback functions for the server, server documents, and objects. You will need to code these functions so that OLESVR.DLL can make meaningful calls into your application.

The folllowing table lists each of the VTBLs and the callback functions pointed to by them:

VTBL/Function Purpose

OLESERVERVTBL  

  Open Opens an existing file and prepares to edit the contents.
  Create Makes a new object that will be embedded in the client application.
  CreateFromTemplate Creates a new document that is initialized with the data in a specified file.
  Edit Creates a document.
  Exit Instructs the server application to close documents and terminate.
  Release Notifies a server application that all connections to it have closed and that it is safe to terminate.
  Execute Specifies DDE execute strings.

OLESERVERDOCVTBL

  Save Instructs the server application to save the document.
  Close Instructs the server application to unconditionally close the document.
  SetHostNames Sets the names that should be used for window titles.
  SetDocDimensions Gives the server application the rectangle on the target device for which the object should be formatted.
  GetObject Requests the server application to create an OLEOBJECT structure.
  Release Notifies the server application when a revoked document has terminated. (Conversations may be destroyed.)
  SetColorScheme Specifies the color selection preferred by the client application.
  Execute Specifies DDE execute strings.

OLEOBJECTVTBL

  QueryProtocol Indicate which protocols the server application supports.
  Release Frees the resources associated with the specified OLEOBJECT structure.
  Show Causes the server application to show an object.
  DoVerb Specifies what kind of action the server application should take when a user opens an object.
  GetData Retrieves data from an object in a specified format.
  SetData Stores data in an object in a specified format.
  SetTargetDevice Communicates information about the client application's target device for the object.
  SetBounds Provided for compatibility only.
  EnumFormats Enumerates the data formats that the object can render.
  SetColorScheme Specifies the palette to be used when the server application edits the specified object.