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
);
pIAppIntSession
- [in] Required pointer to
an IAppIntSession interface, which specifies
the interface to the AppIntSession
component on which the command is invoked.... // 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);...