AddUrlAndNotify method

Provides an advanced method to add a URL to the Windows Internet Explorer history.

Syntax

HRESULT retVal = object.AddUrlAndNotify(pocsUrl, pocsTitle, dwFlags, fWriteHistory, poctNotify, punkISFolder);

Parameters

  • pocsUrl [in]
    Type: LPCOLESTR

    The URL to place in the history.

  • pocsTitle [in]
    Type: LPCOLESTR

    A pointer to a variable of type LPCOLESTR that specifies the title for this URL. If NULL, no title is added.

  • dwFlags [in]
    Type: DWORD

    Not implemented.

  • fWriteHistory [in]
    Type: BOOL

    A BOOL that enables writing to the date-history containers. TRUE enables writing to the date-history containers. FALSE disables writing to the date-history containers.

  • poctNotify [in]
    Type: IOleCommandTarget

    If fWriteHistory is set to TRUE, the Exec method of the IOleCommandTarget interface is called and passed the CGID_Explorer flag, the SBCMDID_SELECTHISTPIDL flag, and the OLECMDEXECOPT_PROMPTUSER flag, with a variant that contains the appropriate PIDL.

  • punkISFolder [in]
    Type: IUnknown

    The history Shell folder where the date containers are stored. If a location is not provided, the default location is used. In most cases, the calling function should specify null.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.