Custom download manager Open vs Save



Hi,

I need to force downloads to be saved into a specific hard disk
partition (not C:). Using Group Policy one can hide and prevent
accessing C: drive but the user can still save to Desktop. I thought
that a custom download manager is a perfect solution.

Basically I have an ATL object which implements IDownloadManager
interface. A have entered the CLSID into registry and everything works
fine (Download() function is called before download).

At this point I have a few questions I hope to find answers:

1) Function Download is called whether the user presses Open or Save
Button. How can I distinguish which button is pressed.

2) If I return E_FAIL from Download() Internet Explorer uses its
default open/save dialogs. Because I want to do nothing special when
the users selects opening the file (for example if the file is
filename.pdf let the Acrobat Reader plugin open it) I will return
E_FAIL. Is this the right thing to do?

Thanks in advance

.