次の方法で共有


IErrorRecords::GetErrorParameters

Returns the error parameters.

Syntax

HRESULT GetErrorParameters (
   ULONG          ulRecordNum,
   DISPPARAMS *   pdispparams);

Parameters

  • ulRecordNum
    [in] The zero-based number of the record for which to return parameters.

  • pdispparams
    [out] A pointer to a DISPPARAMS structure in which to return the error parameters. The consumer allocates the memory for the DISPPARAMS structure itself, but the provider allocates the memory for any arrays pointed to by elements of the DISPPARAMS structure.

Return Code

  • S_OK
    The method succeeded.

  • E_INVALIDARG
    pdispparams was a null pointer.

  • E_OUTOFMEMORY
    The provider was unable to allocate sufficient memory in which to return the data pointed to by elements of *pdispparams.

  • DB_E_BADRECORDNUM
    ulRecordNum, which is zero-based, was greater than or equal to the count, which is one-based, of records returned by IErrorRecords::GetRecordCount.

Comments

This method is used by consumers only when the meaning of the error parameters is known to the consumer; error parameters are generally passed to the error lookup service and incorporated into error messages by the provider through that lookup service. There is no reason for providers to use this method.

See Also

Reference

IErrorRecords::GetBasicErrorInfo

IErrorRecords::GetCustomErrorObject