|
<< Click to Display Table of Contents >> Step 7: Using these properties, allocate memory for a record buffer |
![]() ![]()
|
You must use the properties you obtained in Step 8 in the following code to allocate memory for a record buffer:
| pBYTE | pRecBuf; // Pointer to the record buffer |
pRecBuf = (pBYTE) malloc(curProps.iRecBufSize * sizeof(BYTE));
if (pRecBuf == NULL)
{
// If pRecBuf is NULL, there was not enough memory to allocate
// a record buffer.
// Handling of this error is user-determined, but no information
// from the table can be retrieved.
}