ISearchProtocol::CreateAccessor Method

Creates and initializes an IUrlAccessor object.


HRESULT CreateAccessor(      
    LPCWSTR pcwszURL,
    AUTHENTICATION_INFO *pAuthenticationInfo,
    INCREMENTAL_ACCESS_INFO *pIncrementalAccessInfo,
    ITEM_INFO *pItemInfo,
    IUrlAccessor **ppAccessor


  • 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.
  • 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.


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