The overall structure of an OLE server program should look something like the skeleton application below.
define frame <foo-frame> (<embeddable-frame>) ... end;
define constant $foo-class-ID = make-GUID(...);
define method save-frame-to-storage ... end;
define method load-frame-from-storage ... end;
define variable $foo-ole-server
= make(<foo-frame>,
title: "Foo Works",
class-id: $foo-class-ID,
prog-id: "DUIMSVR.TEST.1",
object-title: "FooSoft FOO");
start-frame($foo-ole-server)
Here we have a server application that implements "foo" objects that can be embedded in a compound document. The title: init-keyword names the server application window, and the object-title: init-keyword is the name that appears in the container's Insert Object dialog. The class-id: is the GUID that will be entered into the registry for identifying the COM object that the server implements, and the prog-id: is the name associated with the server in the registry.