All Manuals > COM/Automation User Guide and Reference Manual > 2 COM Reference Entries

register-server Function

Summary

Externally registers all class factories known to Lisp.

Package

com

Signature

register-server &key clsctx

Arguments
clsctx
A value from the CLSCTX enumeration.
Description

The function register-server updates the Windows registry to contain the appropriate keys for all the class factories registered in the current Lisp image. For Automation components, the type libraries are registered as well. During development, the type library will be found wherever the system definition specified, but after using LispWorks delivery it must be located in the directory containing the application's executable or DLL.

register-server should be called when an application is installed, usually by detecting the /RegServer command line argument.

clsctx indicates the execution contexts in which class factories should be used. It defaults to CLSCTX_INPROC_SERVER.

When running on 64-bit Windows, 32-bit LispWorks updates the 32-bit registry view and 64-bit LispWorks updates the 64-bit registry view. LispWorks does not change the registry reflection settings.

Examples
(defun start-up-function ()
  (cond ((member "/RegServer"
                 system:*line-arguments-list*
                 :test 'equalp)
         (register-server))
        ((member "/UnRegServer"
                 system:*line-arguments-list*
                 :test 'equalp)
         (unregister-server))
        (t
         (co-initialize)
         (start-factories)
         (start-application-main-loop)))
  (quit))
See also

unregister-server
register-class-factory-entry
start-factories
stop-factories
set-register-server-error-reporter


COM/Automation User Guide and Reference Manual - 01 Dec 2021 19:38:38