IRecordInfo Interface
IRecordInfo 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.
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.
Methods in Vtable Order
IUnknown Methods | Description |
|---|---|
Returns pointers to supported interfaces. | |
Increments reference count. | |
Decrements reference count. |
IRecordInfo Functions | Description |
|---|---|
Initializes a new instance of a record. | |
Releases object references and other values of a record without deallocating the record. | |
Copies an existing record into the passed in buffer. | |
Gets the GUID of the record type. | |
Gets the name of the record type. | |
Gets the size of the record instance. | |
Gets the TypeInfo that describes the record. | |
Returns a pointer to the value of a given field name. | |
Returns a pointer to the value of a given field name without copying the value and allocating resources. | |
Puts a variant into a field. | |
Passes ownership of those resources to the assigned field by placing the actual resources into the field. | |
Gets the names of the fields of the record. | |
Determines if the record that is passed in matches that of the current record information. | |
Allocates memory for a new record, initializes the instance and returns a pointer to the record. | |
Creates a copy of an instance of a record to the specified location. | |
releases the resources and deallocates the memory of the record. |