home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pc3270sa.zip / uuccpr32.h < prev    next >
Text File  |  2002-02-28  |  8KB  |  136 lines

  1. /*****************************************************************************/
  2. /*                                                                           */
  3. /*  Module Name     : UUCCPR32.H                                             */
  4. /*                                                                           */
  5. /*  Description     : 32 Bit CPRB Structure, Return Codes and Routines       */
  6. /*                                                                           */
  7. /*  Copyright Notice: IBM Personal Communication/3270 Version 4.1            */
  8. /*                    (C) COPYRIGHT IBM CORP. 1989,1996 - PROGRAM PROPERTY   */
  9. /*                    OF IBM ALL RIGHTS RESERVED                             */
  10. /*                                                                           */
  11. /*---------------------------------------------------------------------------*/
  12. /*  Function:                                                                */
  13. /*                                                                           */
  14. /*    Define the CPRB structure, return code constants and the external      */
  15. /*    routines init_send_req_parms and send_request.                         */
  16. /*                                                                           */
  17. /*  Remarks:                                                                 */
  18. /*                                                                           */
  19. /*    * 32 bit entry point is init_send_req_parms and send_request           */
  20. /*                                                                           */
  21. /*****************************************************************************/
  22.  
  23. /*---------------------------------------------------------------------------*/
  24. /*  CPR32 Structure                                                          */
  25. /*---------------------------------------------------------------------------*/
  26. #ifdef __cplusplus                     /* C++ compiler                       */
  27.   extern "C" {
  28. #endif
  29.  
  30. #ifndef  SRPI_C_INCLUDED
  31. #define  SRPI_C_INCLUDED
  32. #endif
  33.  
  34. typedef
  35. struct
  36. {
  37.   unsigned char  *     uerserver;     /* ascii name of server                */
  38.   unsigned short       uerfunct;      /* function id                         */
  39.   unsigned char        uerrsvd1[2];   /* RESERVED                            */
  40.  
  41.   unsigned short       uerqparml;     /* request parameters length           */
  42.   unsigned char        uerrsvd2[2];   /* RESERVED                            */
  43.   unsigned char  *     uerqparmad;    /* request parameters address          */
  44.   unsigned short       uerqdatal;     /* request data length                 */
  45.   unsigned char        uerrsvd3[2];   /* RESERVED                            */
  46.   unsigned char  *     uerqdataad;    /* request data address                */
  47.  
  48.   unsigned short       uerrparml;     /* reply parameters length             */
  49.   unsigned char        uerrsvd4[2];   /* RESERVED                            */
  50.   unsigned char  *     uerrparmad;    /* reply parameters address            */
  51.   unsigned short       uerrdatal;     /* reply data length                   */
  52.   unsigned char        uerrsvd5[2];   /* RESERVED                            */
  53.   unsigned char  *     uerrdataad;    /* reply data address                  */
  54.  
  55.   unsigned long        uerretcode;    /* return code                         */
  56.   unsigned long        uerservrc;     /* server return code                  */
  57.   unsigned short       uerrepldplen;  /* replied paramters length            */
  58.   unsigned short       uerreplddlen;  /* replied data data length            */
  59.  
  60.   unsigned long        uer3270ind;    /* 3270 screen update notify           */
  61.  
  62.   char                 uerrsvd6[148]; /* reserved field                      */
  63.  
  64. } UERCPRB;
  65.  
  66. /*---------------------------------------------------------------------------*/
  67. /*  Parameters for 3270 screen update notify                                 */
  68. /*---------------------------------------------------------------------------*/
  69.  
  70. #define UER3270NOTIFY 0x0000000000    /* notify user of 3270 screen update   */
  71. #define UER3270DISABL 0XFFFFFFFFFF    /* do not notify user of screen update */
  72.  
  73. /*---------------------------------------------------------------------------*/
  74. /*  Return Codes                                                             */
  75. /*---------------------------------------------------------------------------*/
  76.  
  77. #define UERERROK        0x00000000    /* successful                          */
  78.  
  79. /* Type 1 Errors */
  80.  
  81. #define UERERRT1START   0x01000402    /* not started                         */
  82. #define UERERRT1LOAD    0x01000404    /* not loaded                          */
  83. #define UERERRT1BUSY    0x01000408    /* busy (not used)                     */
  84. #define UERERRT1VER     0x0100040A    /* unsupported version id              */
  85. #define UERERRT1EMU     0x0100040C    /* emulator not loaded                 */
  86. #define UERERRT1ROUT    0x0100040E    /* undefined server name               */
  87. #define UERERRT1COMMR   0x01000410    /* resource not available              */
  88. #define UERERRT1REST    0x01000412    /* emulator restarted since last use   */
  89. #define UERERRT1INUSE   0x01000414    /* session in use by file transfer     */
  90. #define UERERRT1QPLEN   0x01000602    /* req. parm. length too large         */
  91. #define UERERRT1RPLEN   0x01000604    /* reply parm. length too large        */
  92. #define UERERRT1VERB    0x01000606    /* invalid verb type                   */
  93. #define UERERRT1SERV    0x01000608    /* invalid server name                 */
  94. #define UERERRT1QPAD    0x0100060C    /* invalid request parameters address  */
  95. #define UERERRT1QDAD    0x0100060E    /* invalid request data address        */
  96. #define UERERRT1RPAD    0x01000610    /* invalid reply parameters address    */
  97. #define UERERRT1RDAD    0x01000612    /* invalid reply data address          */
  98. #define UERERRT1TOPV    0x01000616    /* TOPVIEW not supported (not used)    */
  99. #define UERERRT1INV3270 0x01000622    /* invalid 3270 screen update notify   */
  100. #define UERERRT1INVCPRB 0x01000624    /* invalid CPRB segment                */
  101. #define UERERRT1CNCL    0x01000802    /* cancelled by host                   */
  102. #define UERERRT1CONV    0x01000C00    /* unable to maintain conversation     */
  103. #define UERERRT1ISE     0x01000C02    /* internal software error             */
  104. #define UERERRT1PROT    0x01000C04    /* protocol violation                  */
  105. #define UERERRT1SYIN    0x01000C06    /* system inconsistency                */
  106.  
  107. /* Type 3 Errors - Process Errors */
  108.  
  109. #define UERERRT3NORES   0x03041D00    /* host resource not available         */
  110. #define UERERRT3NOSER   0x03041E00    /* server unknown at host              */
  111. #define UERERRT3UNSER   0x03041F00    /* server not available at host        */
  112. #define UERERRT3TERMS   0x03042200    /* server ended normally, but no reply */
  113. #define UERERRT3ABNDS   0x03042300    /* server ended abnormally, no reply   */
  114.  
  115. /*  For type 2 and type 3 errors the most significant byte of the return     */
  116. /*  code is 0x02 and 0x03 respectively. The 3 remaining bytes are the        */
  117. /*  exception class, exception code, and exception object sent or received   */
  118. /*  in ackknowledge.                                                         */
  119.  
  120. #define UERERRT2        0x02          /* error type 2 - acknowledge sent     */
  121. #define UERERRT3        0x03          /* error type 3 - acknowledge received */
  122.  
  123. /*---------------------------------------------------------------------------*/
  124. /*  Interface Routines                                                       */
  125. /*---------------------------------------------------------------------------*/
  126.  
  127. #define ord_init_send_req_parms  102
  128. #define ord_send_request         103
  129.  
  130. void     WINAPI init_send_req_parms(UERCPRB * );
  131. long int WINAPI send_request(UERCPRB * );
  132.  
  133. #ifdef __cplusplus
  134.   }
  135. #endif
  136.