IRecordInfo interface
Describes the structure of a particular UDT. You can use IRecordInfo any time you need to access the description of UDTs contained in type libraries. IRecordInfo can be reused as needed; there can be many instances of the UDT for a single IRecordInfo pointer.
When to implement
You do not need to implement this interface. The system provides an implementation.
When to use
You only need to use IRecordInfo to pass a UDT by reference that is stored in a VARIANT. If the UDT is not stored in a VARIANT you can pass a pointer to the UDT because an IRecordInfo pointer can be retrieved from the UDT type description.
IRecordInfo is used to get the amount of storage needed for a UDT, clear the storage for a UDT, copy or access the fields in a UDT. However, the layout of a UDT is the same as the layout of structures in C++, therefore you may not have to use IRecordInfo for clearing, copying and accessing the fields of the storage.
Members
The IRecordInfo interface inherits from the IUnknown interface. IRecordInfo also has these types of members:
Methods
The IRecordInfo interface has these methods.
| Method | Description |
|---|---|
| GetField |
Returns a pointer to the VARIANT containing the value of a given field name. |
| GetFieldNames |
Gets the names of the fields of the record. |
| GetFieldNoCopy |
Returns a pointer to the value of a given field name without copying the value and allocating resources. |
| GetGuid |
Gets the GUID of the record type. |
| GetName |
Gets the name of the record type. |
| GetSize |
Gets the number of bytes of memory necessary to hold the record instance. |
| GetTypeInfo |
Retrieves the type information that describes a UDT or safearray of UDTs. |
| IsMatchingType |
Determines whether the record that is passed in matches that of the current record information. |
| PutField |
Puts a variant into a field. |
| PutFieldNoCopy |
Passes ownership of the data to the assigned field by placing the actual data into the field. |
| RecordClear |
Releases object references and other values of a record without deallocating the record. |
| RecordCopy |
Copies an existing record into the passed in buffer. |
| RecordCreate |
Allocates memory for a new record, initializes the instance and returns a pointer to the record. |
| RecordCreateCopy |
Creates a copy of an instance of a record to the specified location. |
| RecordDestroy |
Releases the resources and deallocates the memory of the record. |
| RecordInit |
Initializes a new instance of a record. |
Requirements
|
IDL |
|
|---|
See also