Jump to content

CM FREERECORD

From EDM2
Revision as of 00:42, 21 April 2025 by Martini (talk | contribs) (Created page with "This message frees the memory associated with one or more RECORDCORE structures. ;Note:; If the CCS_MINIRECORDCORE style bit is specified when a container is created, then MINIRECORDCORE should be used instead of RECORDCORE, and PMINIRECORDCORE should be used instead of PRECORDCORE in all applicable data structures and messages. ==Syntax== <PRE> param1 PVOID pRecordArray; Pointer to an array of pointers to RECORDCORE structures that are to be freed.: pa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This message frees the memory associated with one or more RECORDCORE structures.

Note
; If the CCS_MINIRECORDCORE style bit is specified when a container is created, then MINIRECORDCORE should be used instead of RECORDCORE, and PMINIRECORDCORE should be used instead of PRECORDCORE in all applicable data structures and messages.

Syntax

param1
PVOID pRecordArray; /* Pointer to an array of pointers to RECORDCORE structures that are to be freed. */

param2
USHORT cNumRecord;  /* Number of records. */

Parameters

pRecordArray (PVOID) - Input
Pointer to an array of pointers to RECORDCORE structures that are to be freed.
cNumRecord (USHORT) - Input
Number of container records to be freed.

Returns

rc (BOOL) - returns
Success indicator.
TRUE: Memory associated with a record or records in the container was freed.
FALSE: Associated memory was not freed. The WinGetLastError function may return the following errors:
PMERR_INVALID_PARAMETERS
PMERR_MEMORY_DEALLOCATION_ERR
PMERR_RECORD_CURRENTLY_INSERTED.

Remarks

It is the application's responsibility to free all application-allocated memory associated with the container records, such as text strings.

If a specified record is currently inserted into the container, the record is not freed and the PMERR_RECORD_CURRENTLY_INSERTED error is set. Container records must be removed with the CM_REMOVERECORD message before the CM_FREERECORD message is used.

If the number of pointers to container records in the array exceeds the count of records to be freed, only the number of records in the cNumRecord parameter is freed. If either the pRecordArray or the cNumRecord parameter is invalid, the PMERR_INVALID_PARAMETERS error is set and no container records are freed.

If the PMERR_MEMORY_DEALLOCATION_ERR error occurs, any further processing is unreliable.

Default Processing

The default window procedure does not expect to receive this message and therefore takes no action on it other than to return FALSE.