ISelectEntryTemplateRsp Interface

The ISelectEntryTemplateRsp interface is used to interact with specific SelectEntryTemplate response parameters contained in the in-process COM Server SelectEntryTemplate response component, which is returned when the SelectEntryTemplate command is invoked. This interface enables the client application to obtain the entry template that was selected by the user through the use of the SelectEntryTemplate command.

Client applications may also interact with the SelectEntryTemplate 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.

COM Class ID

coclass SelectEntryTemplateRsp {
[default] interface ISelectEntryTemplateRsp;
interface IAppIntRsp;
};

Reference

DLL FnAppIntSelectEntryTemplateCmd.dll
See Also ISelectEntryTemplateCmd Interface

Methods

The ISelectEntryTemplateRsp interface defines one method:

Method Description
GetObjectStoreItem

Provides the client application with access to the entry template that was selected through the use of the SelectEntryTemplate command, including the item type, version ID and version series ID specified in the template.

Example

The following is a fragment from the complete example for the SelectEntryTemplate command.

   ...
   // Determine if the command failed, before accessing response component data
   hResult = spIAppIntRsp->GetHResult();
   if (FAILED(hResult)) {
      std::cout << "The SelectEntryTemplate command failed to execute." << std::endl;

      // Examine the error information provided in the standard response component
      _bstr_t bstrErrorName = spIAppIntRsp->GetErrorName();
      std::cout << "ErrorName=" << ( bstrErrorName.length() ? (LPCSTR) bstrErrorName : _T( "" ) ) << std::endl;
      _bstr_t bstrErrorMsg = spIAppIntRsp->GetErrorMsg();
      std::cout << "ErrorMsg=" << ( bstrErrorMsg.length() ? (LPCSTR) bstrErrorMsg : _T( "" ) ) << std::endl;
      _bstr_t bstrErrorDetails = spIAppIntRsp->GetErrorDetails();
      std::cout << "ErrorDetails=" << ( bstrErrorDetails.length() ? (LPCSTR) bstrErrorDetails : _T( "" ) ) << std::endl;
      _ASSERTE(0);

   } else {
      std::cout << "The SelectEntryTemplate command succeeded." << std::endl;

      // 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 entry template contained in the custom SelectEntryTemplateRsp component
      ISelectEntryTemplateRspPtr spISelectEntryTemplateRsp(spIAppIntRsp);
_ASSERTE(spISelectEntryTemplateRsp != 0);
IObjectStoreItemPtr spIObjectStoreItemEntryTemplate = spISelectEntryTemplateRsp->GetObjectStoreItem();
_ASSERTE(spIObjectStoreItemEntryTemplate != 0); std::cout << "Details for the entry template selected by the user:<< std::endl;
std::cout << "ObjectStoreName=" << (LPCSTR) spIObjectStoreItemEntryTemplate->GetObjectStoreName() << std::endl;
std::cout << "ItemType=" << (LPCSTR) CItemTypeConverter::EnumToBSTR(spIObjectStoreItemEntryTemplate->GetItemType()) << std::endl;
std::cout << "VersionSeriesID=" << (LPCSTR) spIObjectStoreItemEntryTemplate->GetVersionSeriesID() << std::endl;
std::cout << "VersionID=" << (LPCSTR) spIObjectStoreItemEntryTemplate->GetVersionID() << std::endl;
} ...