When my implementation of IDownloadManager.Download method is been
Invoked, I receive following parameters ..
<C++ declaration>
IMoniker *pmk,
IBindCtx *pbc,
DWORD dwBindVerb,
LONG grfBINDF,
BINDINFO *pBindInfo,
LPCOLESTR pszHeaders,
LPCOLESTR pszRedir,
UINT uiCP
<Object pascal declaration>
pmk: IMoniker;
pbc: IBindCtx;
dwBindVerb: DWORD;
grfBINDF: DWORD;
pBindInfo: PBindInfo;
pszHeaders,
pszRedir: PWidechar;
uiCP: UINT
I can use pmk->GetDisplayName to retrive the URL address being
downloaded , then pass the URL to related URLMoniker function to
perform the download operation . But what should I do when the
incoming file is posted back through a CGI program (using
httpRequest.BinaryWrite or similar method) but not a regular
Hyper-link ?
For example , if I download a file from
http://www.somecompany.com/somefile.exe , pmk->GetDisplayName will
return a string equal to "http://www.somecompany.com/somefile.exe" ,
then I can pass the string to UrlDownloadToFile function to perform
download operation . But if I download a file from
http://www.somecompany.com/someasp.asp which will return somefile.exe
, the above operation will download the .asp file instead of the .exe
file .
A complete example is prefered , but any useful information is
acceptable also .
Johnny |