IRecordInfo::PutFieldNoCopy method (oaidl.h)

Passes ownership of the data to the assigned field by placing the actual data into the field.PutFieldNoCopy is useful for saving resources because it allows you to place your data directly into a record field. PutFieldNoCopy differs from PutField because it does not copy the data referenced by the variant.

Syntax

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

Parameters

[in] wFlags

The only legal values for the wFlags parameter is INVOKE_PROPERTYPUT or INVOKE_PROPERTYPUTREF.

[in, out] pvData

An instance of the record described by IRecordInfo.

[in] szFieldName

The name of the field of the record.

[in] pvarField

The variant to be put into the field.

Return value

This method can return one of these values.

Return code Description
S_OK
Success.
E_INVALIDARG
One or more of the arguments is not valid.

Requirements

Requirement Value
Target Platform Windows
Header oaidl.h

See also

IRecordInfo