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);
VT_EMPTY
should
be specified.... // 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);...