NetIDMgr Plugin Callbacks
[NetIDMgr Module Manager]

Detailed Description

See the following related documentation pages for more information about NetIDMgr plugins.

These are prototypes of functions that must be implemented by a NetIDMgr plugin.


#define EXP_INIT_MODULE   "_init_module@4"
#define EXP_EXIT_MODULE   "_exit_module@4"


typedef khm_int32(KHMAPI *) init_module_t (kmm_module)
 Type for init_module().
typedef kmq_callback_t _plugin_proc_t
 Type for init_plugin().
typedef khm_int32(KHMAPI *) exit_module_t (kmm_module)
 Type for exit_module().


KHMEXP_EXP khm_int32 KHMAPI init_module (kmm_module h_module)
 Initialize the module.
KHMEXP_EXP khm_int32 KHMAPI _plugin_proc (khm_int32 msg_type, khm_int32 msg_subtype, khm_ui_4 uparam, void *vparam)
 Plugin procedure.
KHMEXP_EXP khm_int32 KHMAPI exit_module (kmm_module h_module)
 Exit a module.

Function Documentation

KHMEXP_EXP khm_int32 KHMAPI _plugin_proc ( khm_int32  msg_type,
khm_int32  msg_subtype,
khm_ui_4  uparam,
void *  vparam 

Plugin procedure.

This is the message processor for a plugin. See Plug-ins for more information.

Essentially, this is a message subscriber for KMQ messages.

KHMEXP_EXP khm_int32 KHMAPI exit_module ( kmm_module  h_module  ) 

Exit a module.

This is the last callback function that the NetIDMgr module manager calls before unloading the module. When this function is called, all of the plugins for the module have already been stopped. However, any localization libraries that were loaded as a result of init_module() calling kmm_set_locale_info() will still be loaded. These localization libraries will be unloaded immediately after this callback returns.

Use this callback to perform any required cleanup tasks. However, it is advisable that each plugin perform its own cleanup tasks, since each plugin may be stopped independently of others.

The return value of this function is ignored.
This callback is not required.

KHMEXP_EXP khm_int32 KHMAPI init_module ( kmm_module  h_module  ) 

Initialize the module.

This is the first callback function to be called in a module. Perform all the required intialization when this is called. As mentioned in plugins, you should not attempt to call any NetIDMgr API function from DLLMain or other initialization code other than this one.

You should use this call back to register the plugins that will be implemented in this module and to notify the plugin manager of any resource libraries that this module will use.


This function is called in the context of the current user, from the plug-in manager thread. This same thread is used by the plug-in manager to load and initialize all the modules for a session.

The name of the callback must be init_module(). The calling convention is KHMAPI, which is currently __stdcall.

If this function does not register any plugins, the plugin manager will immediately call exit_module() and unload the module even if the init_module() function completes successfully.

Return the following values to indicate whether the module successfully initialized or not.
  • KHM_ERROR_SUCCESS : Succeeded. The module manager will call init_plugin() for each of the registered plugins for the module.
  • any other error code: Signals that the module did not successfully initialize. The plugin manager will immediately call exit_module() and then unload the module.
This callback is required.

Generated on Fri Aug 3 08:27:14 2007 for Network Identity Manager by Doxygen 1.5.2
© 2004-2007 Massachusetts Institute of Technology.
© 2005-2007 Secure Endpoints Inc.