FormatModuleMessage Method

Applies To: System Center Configuration Manager 2007, System Center Configuration Manager 2007 R2, System Center Configuration Manager 2007 R3, System Center Configuration Manager 2007 SP1, System Center Configuration Manager 2007 SP2

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

[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

Concepts

SMSFormatMessageCtl Class