The IGetPreferencesRsp interface is used to interact with specific GetPreferences response parameters contained in the in-process COM Server GetPreferences response component, which is returned when the GetPreferences command is invoked. This interface provides methods which enable the client application to obtain the XML preferences requested via the GetPreferences command component, as well as locate specific site preferences using XPath syntax.
Client applications may also interact with the GetPreferences response component via the IAppIntRsp interface. For more information about working with command and response components and their COM interfaces, see Command and Response components.
coclass GetPreferencesRsp {
[default] interface IGetPreferencesRsp;
interface IAppIntRsp;
};
DLL | FnAppIntGetPreferencesCmd.dll |
See Also | IGetPreferencesCmd Interface |
The IGetPreferencesRsp interface defines the following methods:
Method | Description |
---|---|
GetPreference |
Returns the value of the site preference specified using XPath syntax. |
GetPreferencesXml |
Returns the XML for the preferences requested in the GetPreferences command component. |
The following is a fragment from the complete example for the GetPreferences command.
...
// Obtain the specific response information contained in the custom GetPreferencesRsp component
IGetPreferencesRspPtr spIGetPreferencesRsp(spIAppIntRsp);
_ASSERTE(spIGetPreferencesRsp != 0);
std::cout << "PreferencesXML=" << (LPCSTR) spIGetPreferencesRsp->GetPreferencesXML() << std::endl;
_bstr_t bstrXPathPreference = (_T("/Document Name"));
_bstr_t bstrPreference = spIGetPreferencesRsp->GetPreference(bstrXPathPreference);
std::cout << "DocumentName=" << (LPCSTR) bstrPreference << std::endl;
...