Module administration components

Every module implementation shares certain administrative tasks that must be performed during module installation, attach, and detach. As part of module installation, the module developer must register information about the module's services with OCSF. This information is stored in the OCSF registry and may be queried by applications using the CSSM_GetModuleInfo function.

On attach, the module's administrative responsibilities include module registration, and module initialization.

During attach, the module registers its functions with OCSF and performs any initialization operations. The module uses CSSM_RegisterServices to register a function table with OCSF for each subservice that it supports. The function tables consist of pointers to the subservice functions supported by the module. During future function calls from the application, OCSF will use these function pointers to direct calls to the appropriate module subservice. When the module is detached, it performs any necessary cleanup actions.