IRecordInfo::GetFieldNames method

Gets the names of the fields of the record.

Syntax


HRESULT GetFieldNames(
  [in, out]                                      ULONG *pcNames,
  [out, size_is(*pcNames), length_is(*pcNames)]  BSTR *rgBstrNames
);

Parameters

pcNames [in, out]

The number of names to return.

rgBstrNames [out]

The name of the array of type BSTR.

If the rgBstrNames parameter is NULL, then pcNames is returned with the number of field names.

It the rgBstrNames parameter is not NULL, then the string names contained in rgBstrNames are returned. If the number of names in pcNames and rgBstrNames are not equal then the lesser number of the two is the number of returned field names. The caller needs to free the BSTRs inside the array returned in rgBstrNames.

Return value

This method can return one of these values.

Return codeDescription
S_OK

Success.

E_OUT_OFMEMORY

Out of memory.

E_INVALIDARG

One or more of the arguments is not valid.

 

Remarks

The caller should allocate memory for the array of BSTRs. If the array is larger than needed, set the unused portion to 0.

On return, the caller will need to free each contained BSTR using SysFreeString.

In case of out of memory, pcNames points to error code.

Requirements

IDL

OaIdl.idl

See also

SysFreeString
IRecordInfo

 

 

Community Additions

ADD
Show:
© 2014 Microsoft