
#define   ERROR_BIDI_INVALID_SCOPE             514

/*              STRUCTURE OF THE BIDI DATA SEGMENT */

#define  SCOPE_LIMIT     15
#define  EFFECT_LIMIT    3
#define  MIN_EFFECT     -1
#define  MIN_SCOPE      -1
#define  CSD_BYTE         0x000000FF
#define  NUMERAL_BYTE     0x0000FF00
#define  ORIENTATION_BYTE 0x00FF0000
#define  RESERVED_BYTE    0xFF000000


/*       STRUCTURE OF THE PRINTER CONTROL BLOCK */
   struct   lptblock {
                      INT   LptLength;
                      BYTE  LptArea[18];
                     };

/*       STRUCTURE OF THE KEYBOARD VIDEO CONTROL BLOCK */
   struct   kbvblock {
                      INT   KbvLength;
                      BYTE  KbvArea[78];
                     };

typedef struct _bidiatt {
                         BYTE    CsdValue;
                         BYTE    NumShapes;
                         BYTE    orientation;
                         BYTE    reserved;
                        } BIDIATT;

/********* the keyboard control block structure *********/
typedef struct  _kbvcb {
                         USHORT   length;
                         USHORT   BDVerID;
                         ULONG    BidiAtt;
                         BYTE     reserved[4];
                         USHORT   HotKeys;
                         USHORT   flags;
                         BYTE     reserved2[64];
                       } KBVCB;

/******* the printer control block structure ************/
typedef struct  _prcb {
                        USHORT    length;
                        ULONG     BidiAtt;
                        UCHAR     reserved[14];
                      } PRCB;


/******** STRUCTURE OF RetInfo **************************/
typedef struct  _retinfo {
                       INT  length;
                       BYTE ReturnArea[78];
                    }RETINFO;


/******** STRUCTURE OF SetInfo ***************************/
typedef struct  _setinfo {
                       INT  length;
                       BYTE SetArea[78];
                    }SETINFO;

/*       STRUCTURE OF THE BIDI DATA SEGMENT                   */
/*                               320 reserved locations.      */
/*                               3x20 LPT locations.          */
/*                               17x80 locations.             */

   struct   bididseg {
                      BYTE   reserved[320];
                      struct lptblock  lpt[3];
                      struct kbvblock  kbvcb[17];
                     };

extern VOID far pascal _loadds NLPOPUP (VOID);

extern USHORT far pascal _loadds NlsIntQueryBidiAtt (LONG,
                                                     LONG,
                                                     PRETINFO );

extern USHORT far pascal _loadds NlsIntSetBidiAtt (LONG,
                                                   LONG,
                                                   PSETINFO);
INT  CheckData (INT, SETINFO*);

