IRecordInfo::GetField method

Returns a pointer to the VARIANT containing the value of a given field name.

Syntax


HRESULT GetField(
  [in]  PVOID     pvData,
  [in]  LPCOLESTR szFieldName,
  [out] VARIANT   *pvarField
);

Parameters

pvData [in]

The instance of a record.

szFieldName [in]

The field name.

pvarField [out]

The VARIANT that you want to hold the value of the field name, szFieldName. On return, places a copy of the field's value in the variant.

Return value

This method can return one of these values.

Return codeDescription
S_OK

Success.

E_INVALIDARG

One or more of the arguments is not valid.

 

Remarks

The VARIANT that you pass in contains a copy of the field's value upon return. If you modify the VARIANT then the underlying record field does not change.

The caller allocates memory of the VARIANT.

The method VariantClear is called for pvarField before copying.

Requirements

IDL

OaIdl.idl

See also

VariantClear
IRecordInfo

 

 

Show: