Download Control
Hosts can control certain aspects of downloading—frames, images, Java, and so on—by implementing both IOleClientSite and an ambient property defined as DISPID_AMBIENT_DLCONTROL. When the host's IDispatch::Invoke method is called with dispidMember set to DISPID_AMBIENT_DLCONTROL, it should place zero or a combination of the following values in pvarResult.DLCTL_BGSOUNDS The browsing component will play background sounds associated with the document. 
DLCTL_DLIMAGES The browsing component will download images from the server. 
DLCTL_DOWNLOADONLY The browsing component will download the page but not display it. 
DLCTL_FORCEOFFLINE The browsing component will always operate in offline mode. This causes the BINDF_OFFLINEOPERATION flag to be set even if the computer is connected to the Internet when making requests through URLMON. 
DLCTL_NO_BEHAVIORS The browsing component will not execute any behaviors. 
DLCTL_NO_CLIENTPULL The browsing component will not perform any client pull operations. 
DLCTL_NO_DLACTIVEXCTLS The browsing component will not download any ActiveX Controls in the document. 
DLCTL_NO_FRAMEDOWNLOAD The browsing component will not download frames but will download and parse the frameset page. The browsing component will also ignore the frameset, and will render no frame tags. 
DLCTL_NO_JAVA The browsing component will not execute any Java applets. 
DLCTL_NO_METACHARSET The browsing component will suppress HTML Character Sets reflected by meta elements in the document. 
DLCTL_NO_RUNACTIVEXCTLS The browsing component will not execute any ActiveX Controls in the document. 
DLCTL_NO_SCRIPTS The browsing component will not execute any scripts. 
DLCTL_OFFLINE Same as DLCTL_OFFLINEIFNOTCONNECTED. 
DLCTL_OFFLINEIFNOTCONNECTED The browsing component will operate in offline mode if not connected to the Internet. This causes the BINDF_GETFROMCACHE_IF_NET_FAIL flag to be set if the computer is connected to the Internet when making requests through URLMON. 
DLCTL_PRAGMA_NO_CACHE The browsing component will force the request through to the server and ignore the proxy, even if the proxy indicates that the data is up to date. This causes the BINDF_PRAGMA_NO_CACHE flag to be set when making requests through URLMON. 
DLCTL_RESYNCHRONIZE The browsing component will ignore what is in the cache and ask the server for updated information. The cached information will be used if the server indicates that the cached information is up to date. This causes the BINDF_RESYNCHRONIZE flag to be set when making requests through URLMON. 
DLCTL_SILENT The browsing component will not display any user interface. This causes the BINDF_SILENTOPERATION flag to be set when making requests through URLMON. 
DLCTL_URL_ENCODING_DISABLE_UTF8 The browsing component will disable UTF-8 encoding. 
DLCTL_URL_ENCODING_ENABLE_UTF8 The browsing component will enable UTF-8 encoding. 
DLCTL_VIDEOS The browsing component will play any video clips that are contained in the document. 

解决方案 »

  1.   

    Figure 5   Download Control STDMETHODIMP CAtlBrCon::Invoke(DISPID dispidMember, REFIID riid, LCID lcid,
                                   WORD wFlags, DISPPARAMS* pDispParams,
                                   VARIANT* pvarResult, EXCEPINFO*  pExcepInfo,
                                   UINT* puArgErr)
    {
        switch (dispidMember)
        {
            case DISPID_AMBIENT_DLCONTROL:
                *pvarResult = DLCTL_DLIMAGES|DLCTL_VIDEOS|
                              DLCTL_BGSOUNDS|DLCTL_NO_SCRIPTS;
                break;        default:
                return DISP_E_MEMBERNOTFOUND;
        }    return S_OK;
    }
      

  2.   

    但是还是不能明确地控制是否下载GIF等明确的类型啊