ICheckoutListCmd::Initialize

The Initialize method customizes the Checkout List Java™Server Pages (JSP) page in preparation for use by the CheckoutList operation, by allowing the client application to filter the list of checked-out items that are presented to the user (based on MIME type), and to specify the page title.

void spICheckoutListCmd->Initialize(_bstr_t bstrPageTitle,
                                    VARIANT vMimeTypes);
Parameters
bstrPageTitle - [in] Required _bstr_t, which specifies the label to display in the title bar of the Checkout List JSP page when the CheckoutList command is invoked. By using this parameter, client applications can customize the title that appears at the top of the JSP page to correspond with their application requirements.
vMimeTypes - [in] Required pointer to a VARIANT, which specifies a SAFEARRAY of the possible MIME types for which to generate the list of checked-out items. When all MIME types are allowed, a value of VT_EMPTY should be specified.
Results
This method always returns an HRESULT value of S_OK if successful.
Sample
The following is a fragment from the complete example for the CheckoutList command.
   ...
   // Instantiate the custom CheckoutList command component
   ICheckoutListCmdPtr spICheckoutListCmd;
hResult = spICheckoutListCmd.CreateInstance(__uuidof(CheckoutListCmd));
if (FAILED(hResult)) {
std::cout << "Could not create the CheckoutList command component.\n"; _ASSERTE(0);
} // Create the list of allowable MIME types const DWORD cNumElements = 4; long lCount = 0; COleSafeArray saMIMETypes(VT_BSTR, cNumElements); {
long lIndex = 0;
_bstr_t bstrWordMimeType(_T("application/msword"));
saMIMETypes.PutElement(&lCount, bstrWordMimeType.copy()); lIndex++;
_bstr_t bstrExcelMimeType(_T("application/vnd.ms-excel"));
saMIMETypes.PutElement(&lCount, bstrExcelMimeType.copy()); lIndex++;
_bstr_t bstrPPTMimeType(_T("application/vnd.ms-powerpoint"));
saMIMETypes.PutElement(&lCount, bstrPPTMimeType.copy()); lIndex++;
_bstr_t bstrTextMimeType(_T("text/plain"));
saMIMETypes.PutElement(&lCount, bstrTextMimeType.copy());
} _variant_t vMIMETypes((LPCVARIANT) saMIMETypes); // Initialize the custom CheckoutList command component _bstr_t bstrPageTitle = (_T("Customized Checkout List Operation")); std::cout << "Initializing the CheckoutList command component..." << std::endl; spICheckoutListCmd->Initialize(bstrPageTitle, vMIMETypes); // Execute the CheckoutList command and capture the response component std::cout << "Executing the CheckoutList command..." << std::endl; IAppIntCmdPtr spIAppIntCmd(spICheckoutListCmd);
IAppIntRspPtr spIAppIntRsp = spIAppIntCmd->Invoke(spIAppIntSession);
...