Partager via


IGetRow::GetURLFromHROW

Given a handle of a row in a rowset, IGetRow::GetURLFromHROW returns the URL for that row.

Syntax

HRESULT GetURLFromHROW(
   HROW         hRow,
   LPOLESTR    *ppwszURL);
}

Parameters

  • hRow
    [in] The row handle (HROW).

    Warning

    The consumer must ensure that hRow contains a valid row handle because the provider might not validate hRow before using it. The result of passing the handle of a deleted row is provider-specific, although the provider must not terminate abnormally. For example, the provider might return DB_E_BADROWHANDLE or DB_E_DELETEDROW, or it might get data from a different row. The result of passing an invalid row handle in hRow is undefined.

  • ppwszURL
    [out] A pointer to provider-allocated memory in which to return the canonical URL for the row. The consumer is responsible for freeing this memory with IMalloc::Free when it no longer needs the URL. If IGetRow::GetURLFromHROW returns an error, *ppwszURL is set to NULL.

Return Code

  • S_OK
    The URL was successfully returned.

  • E_FAIL
    A provider-specific error occurred.

  • E_INVALIDARG
    ppwszURL was a null pointer.

  • E_UNEXPECTED
    ITransaction::Commit or ITransaction::Abort was called, and the row object is in a zombie state.

  • DB_E_BADROWHANDLE
    hRow was invalid. Providers are not required to check for this condition, because doing so might slow the method significantly.

  • DB_E_DELETEDROW
    hRow referred to a pending delete row or to a row for which a deletion had already been transmitted to the data store.

Comments

None