Function
Depending on the command-line arguments passed to the application, this function creates or deletes the Windows 95 and Windows NT system registry entries necessary for the current application to be used as a server for an embeddable OLE object.
register-ole-server class-id prog-id title-string
#key full-name short-name app-name
misc-status verbs => ()
Arguments
This ID can be represented either as a string of 32 hexadecimal digits in the following format
"{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"
That is, where each x is a hexadecimal digit. For example:
"{e90f09e0-43db-11d0-8a04-02070119f639}"
Alternatively, the ID can be an instance of <REFCLSID>, as returned from make-GUID.
<string>. Required.
<string>. Required.
<string>. Default value: the value of short-name.
<string>. Default value: the value of app-name.
<string>. Default value: the value of title-string.
<integer>.
<vector>. Default value: see Description.
None.
OLE-Server
OLE-Server
Creates the Windows 95 and Windows NT system registry entries necessary for the current application to be used as a server for an embeddable OLE object. But if the application was invoked with /UnregServer or -UnregServer, this function will try to delete any registry entries that belong to the application.
The class-id argument must have the same value as passed with the clsid: init-keyword to make on <class-factory>.
The prog-id argument is a unique internal string name for the class. It must begin with a letter. It cannot contain any spaces or punctuation except a period (.) character, and it must not be more than 39 characters long. In order to ensure uniqueness, the recommended format is:
vendor-name.product-name.version-number
For example:
AcmeWidgets.FrobMaster.2
The title-string argument appears in a container's Insert Object dialog box to identify the kind of object this server application provides.
The full-name keyword argument is the full type name of the class. Its default value is the value of the short-name keyword.
The short-name keyword argument is used for popup menus and the Links dialog box. It must be a string of not more than 15 characters in length. Its default value is the value of the app-name keyword.
The app-name keyword argument is the name of the application servicing the class, and is used in the Result text in dialog boxes. Its default value is the value of the required title-string argument.
The misc-status keyword argument specifies the value to be returned by IOleObject::GetMiscStatus. The value is formed by using logior to combine $OLEMISC-... constants. Default value: 0.
The verbs keyword argument specifies the verbs and menu entries that the object supports. The value is a vector, with each element representing the attributes of one verb. Default value:
vector(vector(0, "&Edit", // in-place activation
$MF-ENABLED,
$OLEVERBATTRIB-ONCONTAINERMENU),
vector(1, "&Open", // out-of-place activation
$MF-ENABLED,
$OLEVERBATTRIB-ONCONTAINERMENU))This value produces the following registry entries:
HKEY_CLASSES_ROOT\CLSID\{...}\Verb\0 = &Edit,0,2 HKEY_CLASSES_ROOT\CLSID\{...}\Verb\1 = &Open,0,2Alternatively, you can register a server with:
// check for "/RegServer" or "/UnregServer"
if (~OLE-util-maybe-just-register(class-id,
prog-id,
title-string,
short-name: name))
// now run the application
...
end if; Here, the OLE-util-maybe-just-register function has the same arguments as register-ole-server. It either unregisters the server application and returns #t, or does nothing and returns #f.