Developer Documentation Library > Data Model > Extending the UNICOM Intelligence Data Model > Adding function libraries > Function library registration
 
Function library registration
Function libraries should be self-registering co‑classes. Additional to COM registration, the component should create a new key under:
HKEY_LOCAL_MACHINE\Software\SPSS\MR Function Library
Add the new key value as:
Key Name
The name of the function library; for example, mrFuncLib.
Default Value
The description of the component.
Add the value under this key:
Value Name
Server.
Value
The full path and name of the file that contains the type library. For Visual Basic .NET projects, the type library file specified here should have a .tlb extension.
A type library is a binary file that contains all of the type information needed to use .dll procedures or classes. If the Function Library is implemented with Visual Basic or Visual C#, the Value is typically <File Name>.tlb. If the Function Library is implemented with Visual C++, the Value is typically <File Name>.dll.
Script only functions
Function libraries might contain functions that are intended for scripting but not intended for use in Data Model queries. To ensure that these functions are not called by Data Model expressions, which might compromise security, the ScriptOnlyFunctions registration setting specifies which functions are available only to mrScriptBasic and not to the Data Model. Any function that is marked as ‘script-only’ is not loaded for the Data Model, so it cannot be called by a Data Model expressions. If a Data Model expression that contains a script-only function is executed, an error, “Function '%1!s!' is not defined”, is returned.
See also
Adding function libraries
Functions with hidden parameters
Functions with optional or variable parameters
Name resolution and function precedence
Custom function example