The ICheckoutListRsp interface is used to interact with specific CheckoutList response parameters contained in the in-process COM Server CheckoutList response component, which is returned when the CheckoutList command is invoked. This interface enables the client application to obtain the checked-out item that was selected by the user through the use of the CheckoutList command.
Client applications may also interact with the CheckoutList 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 CheckoutListRsp {
[default] interface ICheckoutListRsp;
interface IAppIntRsp;
};
DLL | FnAppIntCheckoutListCmd.dll |
See Also | ICheckoutListCmd Interface |
The ICheckoutListRsp interface defines one method:
Method | Description |
---|---|
GetObjectStoreItem |
Provides the client application with access to the checked-out item that was selected through the use of the CheckoutList command, including the item type, version ID and version series ID of the item. |
The following is a fragment from the complete example for the CheckoutList command.
... // Determine if the command failed, before accessing response component data hResult = spIAppIntRsp->GetHResult(); if (FAILED(hResult)) { std::cout << "The CheckoutList 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 CheckoutList 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 specific response information contained in the custom CheckoutListRsp component ICheckoutListRspPtr spICheckoutListRsp(spIAppIntRsp);
_ASSERTE(spICheckoutListRsp != 0);
IObjectStoreItemPtr spIObjectStoreItemSelected = spICheckoutListRsp->GetObjectStoreItem();
_ASSERTE(spIObjectStoreItemSelected != 0);
std::cout << "ObjectStoreName=" << (LPCSTR) spIObjectStoreItemSelected->GetObjectStoreName() << std::endl;
std::cout << "ItemType=" << (LPCSTR) CItemTypeConverter::EnumToBSTR(spIObjectStoreItemSelected->GetItemType()) << std::endl;
std::cout << "VersionSeriesID=" << (LPCSTR) spIObjectStoreItemSelected->GetVersionSeriesID() << std::endl;
std::cout << "VersionID=" << (LPCSTR) spIObjectStoreItemSelected->GetVersionID() << std::endl; }...