IAppIntCmd::Invoke

Every Application Integration command gets executed by calling the Invoke method and passing the AppIntSession component on which the command is invoked. The Invoke method returns a newly instantiated response component, which results from executing the command.

IAppIntRsp *pIAppIntRsp = spIAppIntCmd->Invoke(IAppIntSessionPtr pIAppIntSession);
Parameters
pIAppIntSession - [in] Required pointer to an IAppIntSession interface, which specifies the interface to the AppIntSession component on which the command is invoked.
Results
Returns a pointer to an IAppIntRsp interface, which specifies an interface pointer to a newly instantiated command response component, which results from executing the command.
Sample
The following is a fragment from the complete example for the standard IAppIntCmd interface.
   ...
      // Instantiate and Initialize the custom command component here
      // Execute the command and capture the response component
      std::cout << "Executing the command..." << std::endl;
      IAppIntCmdPtr spIAppIntCmd(spICommandNameCmd);

      _bstr_t bstrCommandName = spIAppIntCmd->GetName();
      std::cout << "CommandName=" << ( bstrCommandName.length() ? (LPCSTR) bstrCommandName : _T( "" ) ) << std::endl;
      _bstr_t bstrCommandDescription = spIAppIntCmd->GetDescription();
      std::cout << "CommandDescription=" << ( bstrCommandDescription.length() ? (LPCSTR) bstrCommandDescription : _T( "" ) ) << std::endl;
IAppIntRspPtr spIAppIntRsp = spIAppIntCmd->Invoke(spIAppIntSession);
...