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

set-register-server-error-reporter Function

Summary

Allows control over the reporting, logging or debugging of failures from register-server and unregister-server.

Package

com

Signature

set-register-server-error-reporter func => func

Arguments
func
A function or a fbound symbol.
Values
func
A function or a fbound symbol.
Description

The function set-register-server-error-reporter sets up a function func that is called to report when calls and automatic calls to register-server or unregister-server via the system-defined entry points of a DLL fail.

func should be a function of two arguments.

The automatic calls happen when registering/unregistering a LispWorks DLL that was saved or delivered with the keyword :com in its :dll-exports (see 1.2.4 Making a COM DLL with LispWorks). If such a call fails, func is invoked with the name of the function that failed (currently either register-server or unregister-server) and the condition. func should report the failure in a useful way, which would normally mean logging it in a place where you can inspect it later.

Notes
  1. After func returns or throws out, the automatic call returns with an appropriate failure code, and the code that tries to register (that is, the program that called DllRegisterServer or DllUnregisterServer) should normally print an error too. For example, regsvr32 would raise a dialog by default. However, this dialog will not contain any information about what failed inside Lisp.
  2. By default (that is, if you do not call set-register-server-error-reporter) any such error is simply printed to standard output.
  3. func can force entering the debugger using cl:invoke-debugger, which may sometimes be useful during development.
See also

register-server
unregister-server


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