An MFC OLE server can use COleTemplateServer::UpdateRegistry to register the application as an OLE server.
The following AppWizard-provided code, in Scribble.cpp, is optional.
// When a server application is launched stand-alone, it is a good
// idea to update the system registry in case it has been damaged.
m_server.UpdateRegistry(OAT_INPLACE_SERVER);
This code enables the user to run the application once to register it as an OLE server. The preferred method of registering your application with Windows is to use one of the methods described earlier, in Registering an OLE Server Application with Windows.
-or-