The ISelectPropertiesRsp interface is used to interact with specific SelectProperties response parameters contained in the in-process COM Server SelectProperties response component, which is returned when the SelectProperties command is invoked. This interface provides methods which enable the client application to extract the properties and property values selected by the user.
Client applications may also interact with the SelectProperties 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 SelectPropertiesRsp {
[default] interface ISelectPropertiesRsp;
interface IAppIntRsp;
};
DLL | FnAppIntSelectPropertiesCmd.dll |
See Also | ISelectPropertiesCmd Interface |
The ISelectPropertiesRsp interface defines the following methods:
Method | Description |
---|---|
GetPropertiesXml |
Returns the properties which were selected by the user in their native XML format. |
GetProperty |
Extracts and returns the value of the specified property from the XML results. |
The following is a fragment from the complete example for the SelectProperties command.
...
typedef std::vector< _bstr_t > PropertyList; ... // Obtain the response name and description from the standard response component _bstr_t bstrResponseDescription = spIAppIntRsp->GetDescription(); std::cout << "ResponseDescription=" << ( bstrResponseDescription.length() ? (LPCSTR) bstrResponseDescription : _T( "" ) ) << std::endl; _bstr_t bstrResponseName = spIAppIntRsp->GetName(); std::cout << "ResponseName=" << ( bstrResponseName.length() ? (LPCSTR) bstrResponseName : _T( "" ) ) << std::endl; // Obtain the information contained in the custom SelectPropertiesRsp component ISelectPropertiesRspPtr spISelectPropertiesRsp(spIAppIntRsp);
_ASSERTE(spISelectPropertiesRsp != 0); std::cout << "Details for the properties selected by the user:<< std::endl; PropertyList selectedProperties;
selectedProperties.push_back(_bstr_t(_T("/response/objectset/document/properties/property[symname = \"DocumentTitle\"]/value")));
selectedProperties.push_back(_bstr_t(_T("/response/objectset/document/properties/property[symname = \"Name\"]/value")));
for (unsigned int i = 0; i < selectedProperties.size(); i++) {
_bstr_t bstrPropertyName = selectedProperties[i];
_bstr_t bstrProperty = spISelectPropertiesRsp->GetProperty(bstrPropertyName);
std::cout << "property=" << (bstrPropertyName.length() ? (LPCSTR) bstrPropertyName : _T("")) << std::endl;
std::cout << "value=" << (bstrProperty.length() ? (LPCSTR) bstrProperty : _T("")) << std::endl;
}
_bstr_t bstrPropertiesXml = spISelectPropertiesRsp->GetPropertiesXml();
std::cout << "Properties XML=" << (bstrPropertiesXml.length() ? (LPCSTR) bstrPropertiesXml : _T("")) << std::endl;... ...