cbINPUTREQ

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

cbINPUTREQ

Return to chapter overview

The cbINPUTREQ callback is used when a BDE driver needs to communicate with the end user. This callback is used in the following cases:

a)

a dBASE BLOB (.MDX) file is missing:

cbiMDXMISSING

b)

a Paradox BLOB (.MB) file is missing:

cbiPDXBLOB

c)

a Paradox lookup table is missing:

cbiPDXLOOKUP

d)

a dBASE (.DBT) file is missing:

cbiDBTMISSING

The structure passed to the callback function is defined as follows:

typedef struct {

  CBInputId  eCbInputId;             // ID for this input request

  INT16      iCount;                 // Number of entries

  INT16      iSelection;             // Selection 1..n  (In/Out)

  BOOL16     bSave;                  // Save this option  (In/Out)

  DBIMSG     szMsg;                  // Message to display

  CBEntry    acbEntry[MAXCBENTRIES]; // Entries

} CBInputDesc;

Structure

Type

Description

eCbInputId

CBInputId

eCbInputId is an enumerated type indicating what this input request is for. This will match one of the aforementioned values (cbiMDXMISSING,...).

iCount

INT16

iCount refers to the number of entries in the array acbEntry. (See below.)

iSelection

INT16

iSelection is used as both input to the callback function and output back to the driver. The input value from the driver indicates what the default choice in acbEntry should be. The output value is used to tell  the driver which choice was selected.

bSave

BOOL16

The bSave element is used to tell the driver if it encounters a similar error on a different relation to take the same action as this time.

szMsg

DBIMSG

szMsg is a string the client can display to indicate what the problem is.

acbEntry

 

CBEntry

This array contains a list of operations that the driver can take to remedy the problem (such as Open the base table as read-only Abort the operation). The array also contains a help string for each of the choices. The array acbEntry is defined as:

typedef struct {      // Entries for input requested callback

  DBINAME  szKeyWord; // Keyword to display

  DBIMSG   szHelp;    // Help String

} CBEntry;

Where szKeyWord is a string indicating an operation that the driver can perform for this case. The szHelp element contains a help string associated with the operation that the client can display.