|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
Used for OLE visual editing servers, automation servers, and link containers (applications that support links to embeddings).
This class is derived from the class COleObjectFactory; usually, you can use COleTemplateServer directly rather than deriving your own class. COleTemplateServer uses a CDocTemplate object to manage the server documents. Use COleTemplateServer when implementing a full server, that is, a server that can be run as a standalone application. Full servers are typically multiple document interface (MDI) applications, although single document interface (SDI) applications are supported. One COleTemplateServer object is needed for each type of server document an application supports; that is, if your server application supports both worksheets and charts, you must have two COleTemplateServer objects.
COleTemplateServer overrides the OnCreateInstance member function defined by COleObjectFactory. This member function is called by the framework to create a C++ object of the proper type.
For more information about servers, see the article Servers: Implementing a Server..