FormatModuleMessage Method

 

Applies To: System Center 2012 Configuration Manager, System Center 2012 Configuration Manager SP1, System Center 2012 R2 Configuration Manager

The FormatModuleMessage method, in Configuration Manager, resolves Configuration Manager status messages in Srvmsgs.dll, Provmsgs.dll, and Climmsgs.dll.

Syntax

[VBScript]
SMSFormatMessageCtl.FormatModuleMessage

Parameters

  • ModuleName
    Data type: string

    Name of the module to load. The name can be Srvmsgs.dll, Provmsgs.dll, or Climmsgs.dll.

  • MessageID
    Data type: int

    Message ID logically ORed with the severity.

  • InsertionStrings
    Data type: object

    Optional insertion strings.

Return Values

A string.

Remarks

FormatModuleMessage loads a string that is specified by MessageID from a message resource in the ModuleName module and inserts the supplied strings.

If insertion strings are not passed in, the message is returned without them. Note that insertion strings are an optional parameter. When retrieving the messages from the Configuration Manager database, you should OR the severity with the MessageID parameter. You should also keep the object alive between calls to FormatModuleMessage because the object caches module handles. Doing this saves an extra call to LoadLibrary.

Requirements

FormatMessageCtl.dll.

Runtime Requirements

For more information, see Configuration Manager Server Runtime Requirements.

Development Requirements

For more information, see Configuration Manager Server Development Requirements.

See Also

SMSFormatMessageCtl Class