The IDownloadCmd interface is used to initialize the data contained in the Download command component, which silently downloads a specific version of an object store item and saves it to a specified file on the local machine. Using this interface, the client application indicates which item to download and may also identify which content element to download using the index value.
NOTE When initializing with the IDownloadCmd interface, the full pathname of the destination file must be supplied. However, if you prefer to only specify the destination directory for the file, use the IDownloadCmd2 interface instead. The IDownloadCmd2 interface will extract the filename from the HTTP response headers attachment name.
After the Download command has been executed by calling IAppIntCmd::Invoke, a Download response component is returned. The response component contains specific Download command data that is accessible through the IDownloadRsp interface.
coclass DownloadCmd {
[default] interface IDownloadCmd; interface IDownloadCmd2;
interface IAppIntCmd;
};
DLL | FnAppIntDownloadCmd.dll |
See Also | IDownloadCmd2 and IDownloadRsp Interfaces |
The IDownloadCmd interface defines one method:
Method | Description |
---|---|
Initialize |
Initializes the Download command by specifying an object store item to download and providing a name and location for the saved file on the local machine. |
The following is a fragment from the complete example for the Download command.
...
// Instantiate the custom Download command component
IDownloadCmdPtr spIDownloadCmd;
hResult = spIDownloadCmd.CreateInstance(__uuidof(DownloadCmd));
if (FAILED(hResult)) {
std::cout << "Could not create the Download command component.\n";
_ASSERTE(0);
}
...