Annotation of pmsdk/samples/pmcomm/pmcomm.h, revision 1.1.1.1

1.1       root        1: /*----------------------------------
                      2:    PMCOMM.H header file
                      3:    Created by Microsoft Corp., 1988
                      4:   ----------------------------------*/
                      5: 
                      6: #define ID_RESOURCE      1
                      7: 
                      8: /* ---- string table ----- */
                      9: #define IDS_CLASS        1
                     10: #define IDS_TITLE        2
                     11: #define IDS_INIFILE      3
                     12: #define IDS_UNTITLED     4
                     13: 
                     14: /* ----- popup menu ------ */
                     15: #define IDM_ABOUTMENU    1
                     16: #define IDM_ACTION       2
                     17: #define IDM_OPTION       3
                     18: 
                     19: /* ----- menu items ------ */
                     20: #define IDM_ABOUT        14
                     21: #define IDM_SETTINGS     20
                     22: #define IDM_START        21
                     23: #define IDM_STOP         22
                     24: #define IDM_ECHO         23
                     25: #define IDM_PAUSE        24
                     26: #define IDM_TEST         25
                     27: #define IDM_BREAK        26
                     28: #define IDM_CAPTURE      27
                     29: #define IDM_WRAP         28
                     30: #define IDM_CTRLC        29
                     31: #define IDM_DATE         30
                     32: 
                     33: /* ---- dialog boxes ----- */
                     34: #define IDD_ABOUT        1
                     35: #define IDD_SETTINGS     2
                     36: #define IDD_GETFILE      3
                     37: 
                     38: /* ---- dialog control ids ---- */
                     39: #define DB_FILENAME     240
                     40: #define DB_PORT         260
                     41: #define DB_BAUD         262
                     42: #define DB_STRING       264 
                     43: #define DB_PARITY       270 
                     44: #define DB_STOPBITS     280 
                     45: #define DB_DATABITS     296    /* allow for 6 7 8 */ 
                     46: 
                     47: /* ---- comm info ----- */
                     48: 
                     49: /* IOCTL category and functions */
                     50: #define SERIAL          1       /* category: serial device control */
                     51: #define SETBAUD         0x41    /* function: set baud rate */
                     52: #define SETLINECHAR     0x42    /* function: set line characteristics */
                     53: #define GETDCB          0x73    /* function: get device control block */
                     54: #define SETDCB          0x53    /* function: set device control block */
                     55: #define ENBL_XON_XOFF   0x03    /* enable auto transmit & receive flow cntl */
                     56: #define GENERIC         11      /* category: generic device control commands */
                     57: #define GETCOMERROR     0x6d    /* function: retrieve & clear COM error info */
                     58: #define GETCOMSTATUS    0x64    /* function: get COM error info */
                     59: #define FLUSHINPUT      1       /* function: flush input buffer */
                     60: #define FLUSHOUTPUT     2       /* function: flush output buffer */
                     61: #define GETNUMCHARS     0x68    /* function: get number of chars in recv que */
                     62: #define FLUSH_CMDINFO   0       /* command information for FLUSH INPUT/OUTPUT*/
                     63: #define SETBREAKON      0x4b    /* function: set break on */
                     64: #define SETBREAKOFF     0x45    /* function: set break off */
                     65: 
                     66: /* miscelaneous definitions */
                     67: #define RESERVED        0       /* reserved word */
                     68: #define IOWAIT          0       /* wait */
                     69: #define KBD_BITMASK     0x0006  /* bit mask for the KbdSetStatus call */
                     70: #define INBUFLENGTH     2048    /* length of input buffer */
                     71: #define BREAK           4       /* signal number for BREAK signal */
                     72: #define RECV_CTRL       2       /* signal handler should receive control */
                     73: #define READTIMEOUT     4000    /* time out for com port in .01 sec units */
                     74: #define DISABLE_SIGNALS 1       /* disable signals */
                     75: #define ENABLE_SIGNALS  0       /* enable signals */
                     76: #define ADD_ADDR        1       /* DOSEXITLIST function request code */
                     77: #define XFER            3       /* DOSEXITLIST function request code */
                     78: 
                     79: /* modem related definitions */
                     80: 
                     81: #define NUM_RETRY       1       /* no. times to retry modem connection */
                     82: 
                     83: /* modem commands */
                     84: #define MC_INIT         0
                     85: #define MC_ATTN         1
                     86: #define MC_ESC          2
                     87: #define MC_ONHOOK       3
                     88: #define MC_OFFHOOK      4
                     89: #define MC_RESET        5
                     90: #define MC_DIAL       128       /* special command for dialing */
                     91: 
                     92: #define B_PAUSE       0x20      /* a pause in a modem command */
                     93: 
                     94: /* modem status values */
                     95: #define MS_OK           0       /* modem operation was successful */
                     96: #define MS_CONNECT      1       /* a connection was made */
                     97: #define MS_RING         2       /* a ring was detected */
                     98: #define MS_NOCARRIER    3       /* no carrier was detected */
                     99: #define MS_ERROR        4       /* a command error was detected */
                    100: #define MS_CONNECT1200  5       /* a connection was established at 1200bps*/
                    101: #define MS_NODIALTONE   6       /*dialtone not detected within time in reg S7*/
                    102: #define MS_BUSY         7       /* a busy signal was detected */
                    103: 
                    104: #define MS_NOREPLY      8       /* no reply was recieved from the modem */
                    105: #define OT_FAILURE      9       /* other modem connection failure */
                    106: 
                    107: /* connection: modem/computer */
                    108: #define MODEM           1
                    109: #define COMPUTER        2
                    110: 
                    111: /* dial type: tone/pulse */
                    112: #define TONE            1
                    113: #define PULSE           2
                    114: 
                    115: /* parity: even/odd/none */
                    116: #define EVEN            2
                    117: #define ODD             1
                    118: #define NONE            0
                    119: 
                    120: char *ErrMsg[] = {
                    121:                 "VIOGETCONFIG",
                    122:                 "KBDSETSTATUS",
                    123:                 "OUT OF MEMORY",
                    124:                 "DOSCREATETHREAD",
                    125:                 "DOSCLOSE COMPORT",
                    126:                 "DOSDEVIOCTL SETDCB",
                    127:                 "DOSREAD",
                    128:                 "VIOWRTTTY",
                    129:                 "DOSOPEN: check if COM driver is installed",
                    130:                 "DOSDEVIOCTL SETBAUD",
                    131:                 "DOSDEVIOCTL SETLINECHAR",
                    132:                 "DOSDEVIOCTL GETDCB",
                    133:                 "KBDCHARIN",
                    134:                 "DOSWRITE",
                    135:                 "VIOWRTCHARSTRATT",
                    136:                 "VIOWRTNCELL",
                    137:                 "DOSEXITLIST ADD_ADDR",
                    138:                 "VIOSETCURPOS",
                    139:                 "VIOGETMODE",
                    140:                 "DOSDEVIOCTL FLUSH_XMIT_RECV_QUEUE",
                    141:                 "DOSDEVIOCTL GETCOM",
                    142:                 "DOSSETSIGHANDLER",
                    143:                 "DOSDEVIOCTL SETBREAKON",
                    144:                 "DOSDEVIOCTL SETBREAKOFF",
                    145:                 "INVALID SIGNAL",
                    146:                 "do_option: invalid option type",
                    147:                 "mod_option: invalid option type",
                    148:                 "show_option: invalid option type"
                    149: };
                    150: 
                    151: /* index definitions for error messages array */
                    152: #define ERR_VIOGETCONFIG        0
                    153: #define ERR_KBDSETSTATUS        1
                    154: #define ERR_OUTOFMEMORY         2
                    155: #define ERR_DOSCREATETHREAD     3
                    156: #define ERR_DOSCLOSECOMPORT     4
                    157: #define ERR_IOCTLSETDCB         5
                    158: #define ERR_DOSREAD             6
                    159: #define ERR_VIOWRTTTY           7
                    160: #define ERR_DOSOPEN             8
                    161: #define ERR_IOCTLSETBAUD        9
                    162: #define ERR_IOCTLSETLINECHAR   10
                    163: #define ERR_IOCTLGETDCB        11
                    164: #define ERR_KBDCHARIN          12
                    165: #define ERR_DOSWRITE           13
                    166: #define ERR_VIOWRTCHARSTRATT   14
                    167: #define ERR_VIOWRTNCELL        15
                    168: #define ERR_DOSEXITLIST        16
                    169: #define ERR_VIOSETCURPOS       17
                    170: #define ERR_VIOGETMODE         18
                    171: #define ERR_IOCTLFLUSHQUE      19       
                    172: #define ERR_IOCTLGETCOMERROR   20 
                    173: #define ERR_DOSSETSIGHANDLER   21
                    174: #define ERR_IOCTLSETBREAKON    22
                    175: #define ERR_IOCTLSETBREAKOFF   23
                    176: #define ERR_INVALIDSIGNAL      24
                    177: #define ERR_DO_OPT_INVOPT      25
                    178: #define ERR_MOD_OPT_INVOPT     26
                    179: #define ERR_SHOW_OPT_INVOPT    27
                    180: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.