ITasksCmd::Initialize

The Initialize method customizes the Tasks Java™Server Pages (JSP) page in preparation for use by the Tasks operation, including identifying the Tasks queue to open and which tasks in the queue to display, and specifying a title for the page.

void spITasksCmd->Initialize(_bstr_t bstrPageTitle,
                             QueueNames enQueueName,
                             QueueTypes enQueueType);
Parameters
bstrPageTitle - [in] Required _bstr_t, which specifies the label to display in the title bar of the Tasks JSP page when the Tasks 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.
enQueueName - [in] Required QueueName enumeration, that specifies the name of the Tasks queue that should be opened, which can be set to the following:
- eQueueNameInbox, to list the contents of the Inbox Tasks queue.
enQueueType - [in] Required QueueType enumeration, that specifies the which tasks from the queue should be displayed, which can be set to the following:
- eQueueTypeUser, to only display tasks for the current user.
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 Tasks command.
   ...
   // Instantiate the custom Tasks command component
   ITasksCmdPtr spITasksCmd;
hResult = spITasksCmd.CreateInstance(__uuidof(TasksCmd));
if (FAILED(hResult)) {
std::cout << "Could not create the Tasks command component.\n"; _ASSERTE(0);
} // Initialize the custom Tasks command component with the // page title, queue name and queue type. _bstr_t bstrPageTitle = (_T("Customized Tasks Operation")); QueueNames enQueueName = eQueueNameInbox; QueueTypes enQueueType = eQueueTypeUser; std::cout << "Initializing the Tasks command component..." << std::endl; spITasksCmd->Initialize(bstrPageTitle, enQueueName, enQueueType);
...