# PRC_GetPrototypeDBBufferSize*

## C Specification

      #include <nitro/prc.h>

      u32 PRC_GetPrototypeDBBufferSize(
          const PRCPrototypeList*     prototypeList );

      u32 PRC_GetPrototypeDBBufferSizeEx(
          const PRCPrototypeList*     prototypeList,
          u32                         kindMask,
          BOOL                        ignoreDisabledEntries,
          const PRCPrototypeDBParam*  param );

## Arguments

prototypeList | Pointer to the sample pattern list.
kindMask | Bit field used to select the pattern type of the sample DB entry that will be taken into the sample DB.
ignoreDisabledEntries | Designates whether or not a sample entry whose `enabled` flag is FALSE should be ignored.
param | Other parameter values that are dependent on the recognition algorithm (use NULL as the default).

## Return Values

Returns the work area memory size required for the conversion of the sample DB.

## Description

When using a `PRCPrototypeList` type sample pattern list for recognition, you must convert it into a `PRCPrototypeDB` type sample DB. `PRC_GetPrototypeDBBufferSizeEx()` returns the work area required for this. Before calling `PRC_InitPrototypeDB`, allocate at least as much memory as the return value.

The logical AND is taken of the `kindMask` value and the value of `kind` for each sample DB entry in the `prototypeList`. The entry will be brought into the sample DB if the result is non-0. Specifying `PRC_KIND_ALL` for `kindMask` will select all `kinds`. If `ignoreDisabledEntries` is TRUE, sample DB entries whose `enabled` flag is FALSE will not be brought into the sample DB, even if their `kind` flags match.

`PRC_GetPrototypeDBBufferSize(prototypeList)` is the same as `PRC_GetPrototypeDBBufferSizeEx(prototypeList, PRC_KIND_ALL, FALSE, NULL)`.

## See Also

`PRC_InitPrototypeDB, PRC_InitPrototypeDBEx
`

## Revision History

06/23/2004 Initial Version

CONFIDENTIAL