Listing 1

int PPB_BioAPI_Capture
( INT iTimeout, // timeout in seconds
INT iPurpose, // purpose of the capture
LPLONG pHandle, // ref - sample data handle
LPINT pQuality // ref - image quality
)

Purpose:
Capture a live sample from the scanner.

Parameters:
timeout - in (int) Timeout in seconds
purpose - in (int) Purpose of the capture
1= Verify
2= Identify
3= Enroll
4= Enroll for verification only
5= Enroll for identification only
6= Audit
handle - ref (ulong) Handle to the sample data (used for data access routines)
quality - ref (int) Rating of the image quality
0= poor, 1= acceptable, 2= good

Listing 2

// Capture a fingerprint for Verification (1)
integer li_result
integer li_quality
unsignedlong lul_CaptureHandle
unsignedlong lul_cbMinutiae
unsignedlong lul_DontCare

// Capture a fingerprint for Verification (1) with a 30 second timeout
// Ideally, we would reject if the quality is poor (0)
li_result = PPB_BioAPI_Capture( 30, 1, lul_CaptureHandle, li_quality )

// Details of the capture (especially the buffer sizes)
li_result = PPB_BioAPI_CaptureBufferDetails( lul_CaptureHandle, lul_cbMinutiae, &
lul_DontCare, lul_DontCare, lul_DontCare, lul_DontCare )

// Retrieve the Minutiae blob to store in the database
// allocate the space
// +200 bytes for the header and paranoia
// divide by 2 because PocketPB is Unicode
string ls_buffer
blob lblb_minutiae
ls_buffer = SPACE( 100 + (cbMinutiae / 2) )
lblb_minutiae = BLOB( ls_buffer )
li_result = PPB_BioAPI_RetrieveMinutiae( iul_CaptureHandle, lblb_minutiae )


// store the blob in the database for later use...