Internationalization support
[NetIDMgr Module Manager]


Detailed Description

See Localization for more information about internationalization.


Data Structures

struct  tag_kmm_module_locale
 Locale descriptor record. More...

Convenience Macros

#define kmm_LoadAccelerators(module, lpTableName)   (LoadAccelerators(kmm_get_resource_hmodule(module), lpTableName))
 Convenience macro for using calling LoadAccelerators using a module handle.
#define kmm_LoadBitmap(module, lpBitmapName)   (LoadBitmap(kmm_get_resource_hmodule(module), lpBitmapName))
 Convenience macro for using calling LoadBitmap using a module handle.
#define kmm_LoadImage(module, lpszName, uType, cxDesired, cyDesired, fuLoad)   (LoadImage(kmm_get_resource_hmodule(module), lpszName, uType, cxDesired, cyDesired, fuLoad))
 Convenience macro for using calling LoadImage using a module handle.
#define kmm_LoadCursor(module, lpCursorName)   (LoadCursor(kmm_get_resource_hmodule(module), lpCursorName))
 Convenience macro for using calling LoadCursor using a module handle.
#define kmm_LoadIcon(module, lpIconName)   (LoadIcon(kmm_get_resource_hmodule(module), lpIconName))
 Convenience macro for using calling LoadIcon using a module handle.
#define kmm_LoadMenu(module, lpMenuName)   (LoadMenu(kmm_get_resource_hmodule(module), lpMenuName))
 Convenience macro for using calling LoadMenu using a module handle.
#define kmm_LoadString(module, uID, lpBuffer, nBufferMax)   (LoadString(kmm_get_resource_hmodule(module), uID, lpBuffer, nBufferMax))
 Convenience macro for using calling LoadString using a module handle.

Defines

#define LOCALE_DEF(language_id, filename, flags)   {language_id, filename, flags}
#define KMM_MLOC_FLAG_DEFAULT   1
 Default (fallback) locale.

Typedefs

typedef tag_kmm_module_locale kmm_module_locale
 Locale descriptor record.

Functions

KHMEXP khm_int32 KHMAPI kmm_set_locale_info (kmm_module module, kmm_module_locale *locales, khm_int32 n_locales)
 Sets the locale for a loaded module.
KHMEXP HMODULE KHMAPI kmm_get_resource_hmodule (kmm_module m)
 Return the Windows module handle of the resource library of a NetIDMgr module.


Define Documentation

#define kmm_LoadAccelerators ( module,
lpTableName   )     (LoadAccelerators(kmm_get_resource_hmodule(module), lpTableName))

Convenience macro for using calling LoadAccelerators using a module handle.

Parameters:
[in] module A handle to a loaded module. The corresponding resource module will be located through a call to kmm_get_resource_hmodule()

#define kmm_LoadBitmap ( module,
lpBitmapName   )     (LoadBitmap(kmm_get_resource_hmodule(module), lpBitmapName))

Convenience macro for using calling LoadBitmap using a module handle.

Parameters:
[in] module A handle to a loaded module. The corresponding resource module will be located through a call to kmm_get_resource_hmodule()

#define kmm_LoadCursor ( module,
lpCursorName   )     (LoadCursor(kmm_get_resource_hmodule(module), lpCursorName))

Convenience macro for using calling LoadCursor using a module handle.

Parameters:
[in] module A handle to a loaded module. The corresponding resource module will be located through a call to kmm_get_resource_hmodule()

#define kmm_LoadIcon ( module,
lpIconName   )     (LoadIcon(kmm_get_resource_hmodule(module), lpIconName))

Convenience macro for using calling LoadIcon using a module handle.

Parameters:
[in] module A handle to a loaded module. The corresponding resource module will be located through a call to kmm_get_resource_hmodule()

#define kmm_LoadImage ( module,
lpszName,
uType,
cxDesired,
cyDesired,
fuLoad   )     (LoadImage(kmm_get_resource_hmodule(module), lpszName, uType, cxDesired, cyDesired, fuLoad))

Convenience macro for using calling LoadImage using a module handle.

Parameters:
[in] module A handle to a loaded module. The corresponding resource module will be located through a call to kmm_get_resource_hmodule()

#define kmm_LoadMenu ( module,
lpMenuName   )     (LoadMenu(kmm_get_resource_hmodule(module), lpMenuName))

Convenience macro for using calling LoadMenu using a module handle.

Parameters:
[in] module A handle to a loaded module. The corresponding resource module will be located through a call to kmm_get_resource_hmodule()

#define kmm_LoadString ( module,
uID,
lpBuffer,
nBufferMax   )     (LoadString(kmm_get_resource_hmodule(module), uID, lpBuffer, nBufferMax))

Convenience macro for using calling LoadString using a module handle.

Parameters:
[in] module A handle to a loaded module. The corresponding resource module will be located through a call to kmm_get_resource_hmodule()


Typedef Documentation

typedef struct tag_kmm_module_locale kmm_module_locale

Locale descriptor record.

See kmm_set_locale()


Function Documentation

KHMEXP HMODULE KHMAPI kmm_get_resource_hmodule ( kmm_module  m  ) 

Return the Windows module handle of the resource library of a NetIDMgr module.

NetIDMgr allows the specification of an alternate resource library that will be used to load localized resources from. This function returns a handle to this library.

While you can use the convenience macros to access resources in a localization library using the module handle, it is recommended, for performance reasons, to use this function to obtain the handle to the resource library and then use that handle in calls to LoadString, LoadImage etc. directly.

KHMEXP khm_int32 KHMAPI kmm_set_locale_info ( kmm_module  module,
kmm_module_locale locales,
khm_int32  n_locales 
)

Sets the locale for a loaded module.

The given locale records are searched in the given order until a locale that matches the current user locale is found. If no locales match, then the first locale with the KMM_MLOC_FLAG_DEFAULT flag set will be loaded. If no locales have that flag set, then the first locale is loaded.

You can obtain a handle to the loaded library using kmm_get_resource_hmodule(). This function does not return until a matched library is loaded.

Note that the kmm_module_locale structure only specifies a module name for the resource module. This resource module must exist in the same directory as the module.

Parameters:
[in] module The module handle
[in] locales An array of kmm_module_locale objects
[in] n_locales The number of objects in the array pointed to by locales
Return values:
KHM_ERROR_SUCCESS Succeeded.
KHM_ERROR_NOT_FOUND A matching locale resource library was not found.
KHM_ERROR_INVALID_OPERATION The function was called on a module which is currently not being initalized.
See also:
Localization

kmm_get_resource_hmodule()

Note:
This can only be called when handing init_module()


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.
Contact khimaira@mit.edu