RaiseInformationalStatusMsg Method in Class SMS_StatusMessage
The RaiseInformationalStatusMsg WMI class method creates an informational status message. The informational message provides flow-of-activity status that illustrates the activities of a component during a normal, successful operation.
The following syntax is simplified from MOF code and is intended to show you the definition of the method.
uint32 RaiseInformationalStatusMsg(
[in] string MessageText,
[in] uint32 MessageType,
[in, optional] uint32 Win32Error,
[in, optional] uint32 ProcessID,
[in, optional] uint32 ThreadID,
[in, optional] datetime Time,
[in, optional] uint32 AttrIDs[],
[in, optional] string AttrValues[],
[in, optional] string TopLevelSiteCode
);
Parameters
MessageText
Data type: string
Qualifiers: InText of the status message. This property can contain up to 255 characters. It cannot include new-line or tab characters.
MessageType
Data type: uint32
Qualifiers: InThis parameter can contain the following values.
Message type value Description 256 Use the Milestone message type at the end of an operation to indicate the operation's success or failure. If the operation was successful, you would use the Milestone type in an informational message. If the operation failed, you would use a Milestone message typein a warning or error message. 512 : Use the Detail message type to illustrate the steps in a complex operation. Often, detail messages are meaningful only within the context of the sequence of status messages representing a complex operation. 768 Use the audit message type for informational messages that provides a trail of actions taken by the SMS Administrator. An audit message also depicts an operation that results in objects being added, modified, or deleted. You need not create audit messages; the provider automatically generates these messages for you. 1024 : This value is not used. Win32Error
Data type: uint32
Qualifiers: In, OptionalWin32 error code associated with the status message, from a call of the GetLastError function. The Status Message Viewer gets the text associated with the error code and concatenates it to your message text.
ProcessID
Data type: uint32
Qualifiers: In, OptionalIdentifier of the process which created the message. It defaults to zero.
ThreadID
Data type: uint32
Qualifiers: In, OptionalIdentifier of the thread which created the message. It defaults to zero.
Time
Data type: datetimeQualifiers: In, OptionalDate and time (Greenwich mean time) when the status message was created. It defaults to the current time.
AttrIDs
Data type: uint32[]
Qualifiers: In, OptionalIdentifies the type of attributes contained in the AttrValues parameter. Each value in the AttrIDs array must correspond with a value in the AttrValues array.
Value Meaning 400 AttrValues contains a PackageID. 401 AttrValues contains an AdvertisementID. 402 AttrValues contains a CollectionID. 403 AttrValues contains a UserName. 404 AttrValues contains a DistributionPoint. AttrValues
Data type: string[]
Qualifiers: In, OptionalAttributes to associate with the status message. Each value in the AttrValues array must correspond with a value in the AttrIDs array.
TopLevelSiteCode
Data type: string
Qualifiers: In, OptionalBy specifying a site code for this parameter, you are overriding the status message filter rules. This site code instructs the status manager not to propagate the message any higher in the hierarchy than the specified site. This is useful if higher-level sites have no knowledge of the objects being referred to in the status message.
Return Values
The RaiseInformationalStatusMsg method returns an uint32 which is always zero (0).
Example Code
For an example that shows you how to raise an informational message, see Reporting Informational, Warning, and Error Status Messages.
Remarks
When you call this method, you must set the context qualifiers, ApplicationName and MachineName, to their respective names, which are then used by this method to set the values of properties Component and MachineName respectively in the SMS_StatusMessage class.
See Also
RaiseErrorStatusMSg, RaiseRawStatusMSg, RaiseWarningStatusMSg, Reporting Informational, Warning, and Error Status Messages, SMS_StatusMessage, Using Status Messages