IMSCSMessageManager_3_0::GetMessage
Use this method to return the text of the specified message.
Definition
HRESULT IMSCSMessageManager_3_0::GetMessage(BSTRbstrName,VARIANTvtLanguage,BSTR*Message);
Parameters
bstrName
[in] A BSTR that contains the message constant name of the message to return. This is the name associated with this message when it was added to the MessageManager object through a call to the AddMessage method.
vtLanguage
[in] A VARIANT that specifies the name of the message set to which the message text belongs. This string specifies a message set that was added to the MessageManager object through a previous call to the AddLanguage method. If this parameter is not specified, or is NULL, the message is returned for the message set identified by the DefaultLanguage property of the MessageManager object.
Message
[out, retval] A pointer to a BSTR used to return the text of the specified message.
Return Values
This method returns an HRESULT indicating whether or not it completed successfully. See the Error Values section for more details.
Error Values
This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.
Remarks
The Message parameter points to valid data only if the method returns successfully.
The GetMessage method is seldom called from within a site. Instead, it is used by pipeline components to retrieve messages that describe errors that have occurred.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
See Also
IMSCSMessageManager_3_0::AddLanguage