ISearchProtocol2::CreateAccessorEx Method

Creates and initializes an IUrlAccessor object. This method has the same basic functionality as the ISearchProtocol::CreateAccessor method, but it includes an additional pUserData parameter to supply additional data to the protocol handler.

Syntax

HRESULT CreateAccessorEx(      
    LPCWSTR pcwszURL,
    AUTHENTICATION_INFO *pAuthenticationInfo,
    INCREMENTAL_ACCESS_INFO *pIncrementalAccessInfo,
    ITEM_INFO *pItemInfo,
    const BLOB *pUserData,
    IUrlAccessor **ppAccessor
);

Parameters

  • pcwszURL
    [in]  Pointer to a null-terminated Unicode string containing the URL of the item being accessed.
  • pAuthenticationInfo
    [in]  Pointer to an AUTHENTICATION_INFO structure that contains authentication information necessary for accessing this item in the content source.
  • pIncrementalAccessInfo
    [in] Pointer to an INCREMENTAL_ACCESS_INFO structure that contains incremental access information, such as the last time the file was accessed by the gatherer.
  • pItemInfo
    [in] Pointer to an ITEM_INFO structure that contains information about the URL item, such as the name of the item's workspace catalog.
  • pUserData
    [in]  Pointer to user information. This data can be whatever the notification originator decides. If the protocol handler implements this interface, it will receive this data. Not all notifications have this blob set.
  • ppAccessor
    [out]  Receives the address of a pointer to the IUrlAccessor object created by this method. This object contains information about the URL item, such as the item's file name.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

This method creates and initializes an IUrlAccessor object to process an item currently being accessed by the gatherer. The protocol host calls this method on the protocol handler. This method is called once for every URL processed by the gatherer and retrieves a pointer to the IUrlAccessor object.