home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / WINAPPC.H < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  95.9 KB  |  1,720 lines

  1. /* Copyright Data Connection Ltd. 1989 */
  2. /*****************************************************************************/
  3. /*                                                                           */
  4. /*****************************************************************************/
  5. /* winappc.h */
  6. /* Copyright (c) 1989, Microsoft Corporation.  All rights reserved.          */
  7.  
  8. /*****************************************************************************/
  9. /* APPC constant, vcb and function definitions                               */
  10. /*****************************************************************************/
  11.  
  12. /*****************************************************************************/
  13. /* Change History                                                            */
  14. /*  CPIC  07/05/91  GH  Add get_conv_state verb, and support for fully       */
  15. /*                      qualified network names in the (mc)allocate VCBs     */
  16. /*  CPIC  03/06/91  GH  Changed FQname support. Name now '.' separated.      */
  17. /*  CPIC  14/06/91  GH  Added constants for the conv_state parameter         */
  18. /*  SCSN  08/08/91  GH  Fixed the AP_SEND_DATA_CONFIRM_SYNC_NONE defn.       */
  19. /*  CPIC  22/08/91  GH  Removed the FQ-flag in (mc)allocate VCBs             */
  20. /*  9997  23/10/91  AD  Change TP_ENDED end_type field to EE friendly 'type' */
  21. /*  3054  13/11/91  SW  Add pascal entry point function prototype            */
  22. /*  xxxx  02/01/92  SW  Update what_rcvd values                              */
  23. /*  CNOS  17/01/92  PP  Add opcode for CNOS.  NS/2 allows management verbs   */
  24. /*                      to go through APPC entry point                       */
  25. /*  W32   24/02/92  AD  Win32 port                                           */
  26. /*  CPIC  24/02/92  AD  Move CPIC specific constants and types               */
  27. /*  W32   14/04/92  AD  remove far keyword for Win32, add pack pragma        */
  28. /*  DISP  14/04/92  TB  Add definition for DISPLAY opcode.                   */
  29. /*  DSP2  04/06/92  TB  Check to see if appc_c.h already included mgmt hdrs  */
  30. /*  ES10  03/11/92  SP  Add support for ES 1.0 APPC extensions               */
  31. /*  WSNA2 27/10/92  CD  Changes for WinSNA                                   */
  32. /*  DFLU  18/02/93  SP  Add rc for Bad Partner LU Alias                      */
  33. /*  IBM1  29/06/93  NGR Add #defines and typedefs from ES include files      */
  34. /*  EVNT  14/12/93  DK  Allow completion to be notified by setting an event  */
  35. /*  GRC   20/01/94  DK  Add definition of GetAppcReturnCode                  */
  36. /*  RPRP  24/10/95  JD  Implement TEST_RTS_AND_POST                          */
  37. /*  SYNC  25/03/96  SGF Syncpoint Support                                    */
  38. /*  APOR  02/12/96  DA  Implement POST_ON_RECEIPT                            */
  39. /*  SELD  02/01/97  DA  Send error log data on mapped conversations          */
  40. /*  RELD  02/01/97  DA  Recv error log data                                  */
  41. /*  5178  02/25/97  SGF Single signon for priviledged proxy                  */
  42. /*  7239  03/05/97  SGF Make single signon strings UNICODE                   */
  43. /*****************************************************************************/
  44.  
  45. /*****************************************************************************/
  46. /* If winappc.h not already included then define APPC_C_INCLUDED to avoid it */
  47. /* being included again. This is needed as winappc.h is included in the      */
  48. /* management header acsmgtc.h.  *DSP2*                                      */
  49. /*****************************************************************************/
  50. #ifndef APPC_C_INCLUDED
  51. #pragma option push -b -a8 -pc -A- /*P_O_Push_S*/
  52. #define APPC_C_INCLUDED
  53.  
  54. #ifdef __cplusplus
  55. extern "C" {
  56. #endif
  57.  
  58. /*****************************************************************************/
  59. /* Set WINSNA if this is Win16 or Win32                                *WSNA2*/
  60. /*****************************************************************************/
  61. #if ( defined(WINDOWS) || defined(WIN32) )
  62.  #define WINSNA
  63. #endif
  64.  
  65.  
  66.  
  67.  
  68. /* ========================================================================= */
  69. /*****************************************************************************/
  70. /* ------------------------- macro definitions ----------------------------- */
  71. /*****************************************************************************/
  72.  
  73. /*************************************************************************W32*/
  74. /* for Win32 environment:                                                *W32*/
  75. /* -  ensure correct packing                                             *W32*/
  76. /* -  remove references to far                                           *W32*/
  77. /*************************************************************************W32*/
  78. #ifdef WIN32                                                            /*W32*/
  79.                                                                         /*W32*/
  80. #pragma pack(4)                                                         /*W32*/
  81. #define far                                                             /*W32*/
  82.                                                                         /*W32*/
  83. #endif                                                                  /*W32*/
  84.  
  85. /*************************************************************************W32*/
  86. /* define type conversion macros                                         *W32*/
  87. /*************************************************************************W32*/
  88. #define APPC_LO_UC(w)    ((unsigned char)(((unsigned short)(w)) & 0xFF))/*W32*/
  89. #define APPC_HI_UC(w)    ((unsigned char)(((unsigned short)(w) >> 8)  \
  90.                             & 0xff))                                    /*W32*/
  91. #define APPC_MAKUS(l, h) (((unsigned short)(l)) |                     \
  92.                           ((unsigned short)(h)) << 8)                   /*W32*/
  93. #define APPC_MAKUL(l, h) ((unsigned long)(((unsigned short)(l))|      \
  94.                           ((unsigned long)((unsigned short)(h))) << 16))/*W32*/
  95. #define APPC_LO_US(l)   ((unsigned short)(((unsigned long)(l)) & 0xFFFF))/*W32*/
  96. #define APPC_HI_US(l)    ((unsigned short)(((unsigned long)(l) >> 16) \
  97.                            & 0xffff))                                   /*W32*/
  98.                                                                         /*W32*/
  99. /*************************************************************************W32*/
  100. /* IF non-Intel THEN                                                     *W32*/
  101. /*   set flipping to nop for now                                         *W32*/
  102. /*************************************************************************W32*/
  103. #ifdef NON_INTEL_BYTE_ORDER                                             /*W32*/
  104. #define APPC_FLIPI(X)  (X)                                              /*W32*/
  105. #define APPC_FLIPL(X)  (X)                                              /*W32*/
  106.                                                                         /*W32*/
  107. /*************************************************************************W32*/
  108. /* ELSE (Intel environment)                                              *W32*/
  109. /*   define flipping macros                                              *W32*/
  110. /*************************************************************************W32*/
  111. #else                                                                   /*W32*/
  112. #define APPC_FLIPI(X) APPC_MAKUS(APPC_HI_UC(X),APPC_LO_UC(X))           /*W32*/
  113. #define APPC_FLIPL(X) APPC_MAKUL(APPC_FLIPI(APPC_HI_US(X)),           \
  114.                                  APPC_FLIPI(APPC_LO_US(X)))             /*W32*/
  115. #endif                                                                  /*W32*/
  116.  
  117. #ifdef WIN32
  118. #define far
  119. #endif
  120.  
  121. /* ========================================================================= */
  122. /*****************************************************************************/
  123. /* ------------------------- verb opcodes ---------------------------------- */
  124. /*****************************************************************************/
  125.  
  126. /*****************************************************************************/
  127. /* control verbs                                                             */
  128. /*****************************************************************************/
  129. #define AP_TP_STARTED                   APPC_FLIPI(0x1400)        /* X'1400' */
  130. #define AP_RECEIVE_ALLOCATE             APPC_FLIPI(0x1600)        /* X'1600' */
  131. #define AP_TP_ENDED                     APPC_FLIPI(0x1300)        /* X'1300' */
  132.  
  133. /*****************************************************************************/
  134. /* New opcode for RCV_ALLOC with a list of TP names                    *WSNA5*/
  135. /*                                                                           */
  136. /* Though defined for all OS, this verb will only be allowed for WINSNA      */
  137. /* environments                                                              */
  138. /*****************************************************************************/
  139. #define AP_RECEIVE_ALLOCATE_X           APPC_FLIPI(0x9600) /*X'1600' + X'8000'*/
  140.  
  141. /*****************************************************************************/
  142. /* management verbs                                                *DISP*CNOS*/
  143. /*****************************************************************************/
  144. #define AP_CNOS                         APPC_FLIPI(0x1500)        /* X'1500' */
  145. #define AP_DISPLAY                      APPC_FLIPI(0X1B00)        /* X'1B00' */
  146.  
  147. /*****************************************************************************/
  148. /* mapped conversation verbs                                                 */
  149. /*****************************************************************************/
  150. #define AP_M_ALLOCATE                   APPC_FLIPI(0x0100)        /* X'0100' */
  151. #define AP_M_CONFIRM                    APPC_FLIPI(0x0300)        /* X'0300' */
  152. #define AP_M_CONFIRMED                  APPC_FLIPI(0x0400)        /* X'0400' */
  153. #define AP_M_DEALLOCATE                 APPC_FLIPI(0x0500)        /* X'0500' */
  154. #define AP_M_FLUSH                      APPC_FLIPI(0x0600)        /* X'0600' */
  155. #define AP_M_GET_ATTRIBUTES             APPC_FLIPI(0x0700)        /* X'0700' */
  156. #define AP_M_PREPARE_TO_RECEIVE         APPC_FLIPI(0x0a00)        /* X'0a00' */
  157. #define AP_M_RECEIVE_AND_POST           APPC_FLIPI(0x0d00)        /* X'0d00' */
  158. #define AP_M_RECEIVE_AND_WAIT           APPC_FLIPI(0x0b00)        /* X'0b00' */
  159. #define AP_M_RECEIVE_IMMEDIATE          APPC_FLIPI(0x0c00)        /* X'0c00' */
  160. #define AP_M_REQUEST_TO_SEND            APPC_FLIPI(0x0e00)        /* X'0e00' */
  161. #define AP_M_SEND_CONVERSATION          APPC_FLIPI(0x1800) //ES10 /* X'1800' */
  162. #define AP_M_SEND_DATA                  APPC_FLIPI(0x0f00)        /* X'0f00' */
  163. #define AP_M_SEND_ERROR                 APPC_FLIPI(0x1000)        /* X'1000' */
  164. #define AP_M_TEST_RTS                   APPC_FLIPI(0x1200)        /* X'1200' */
  165. #define AP_M_TEST_RTS_AND_POST          APPC_FLIPI(0x8100)        /* X'8100' */ /*RPRP*/
  166. #ifdef WIN32                                                                    /*APOR*/
  167. #define AP_M_POST_ON_RECEIPT            APPC_FLIPI(0x8200)        /* X'8200' */ /*APOR*/
  168. #endif                                                                          /*APOR*/
  169. #define AP_M_RECEIVE_LOG_DATA           APPC_FLIPI(0x8300)        /* X'8300' */ /*RELD*/
  170.  
  171. /*****************************************************************************/
  172. /* basic conversation verbs                                                  */
  173. /*****************************************************************************/
  174. #define AP_B_ALLOCATE                   APPC_FLIPI(0x0100)        /* X'0100' */
  175. #define AP_B_CONFIRM                    APPC_FLIPI(0x0300)        /* X'0300' */
  176. #define AP_B_CONFIRMED                  APPC_FLIPI(0x0400)        /* X'0400' */
  177. #define AP_B_DEALLOCATE                 APPC_FLIPI(0x0500)        /* X'0500' */
  178. #define AP_B_FLUSH                      APPC_FLIPI(0x0600)        /* X'0600' */
  179. #define AP_B_GET_ATTRIBUTES             APPC_FLIPI(0x0700)        /* X'0700' */
  180. #define AP_B_PREPARE_TO_RECEIVE         APPC_FLIPI(0x0a00)        /* X'0a00' */
  181. #define AP_B_RECEIVE_AND_POST           APPC_FLIPI(0x0d00)        /* X'0d00' */
  182. #define AP_B_RECEIVE_AND_WAIT           APPC_FLIPI(0x0b00)        /* X'0b00' */
  183. #define AP_B_RECEIVE_IMMEDIATE          APPC_FLIPI(0x0c00)        /* X'0c00' */
  184. #define AP_B_REQUEST_TO_SEND            APPC_FLIPI(0x0e00)        /* X'0e00' */
  185. #define AP_B_SEND_CONVERSATION          APPC_FLIPI(0x1800) //ES10 /* X'1800' */
  186. #define AP_B_SEND_DATA                  APPC_FLIPI(0x0f00)        /* X'0f00' */
  187. #define AP_B_SEND_ERROR                 APPC_FLIPI(0x1000)        /* X'1000' */
  188. #define AP_B_TEST_RTS                   APPC_FLIPI(0x1200)        /* X'1200' */
  189. #define AP_B_TEST_RTS_AND_POST          APPC_FLIPI(0x8100)        /* X'8100' */ /*RPRP*/
  190. #ifdef WIN32                                                                    /*APOR*/
  191. #define AP_B_POST_ON_RECEIPT            APPC_FLIPI(0x8200)        /* X'8200' */ /*APOR*/
  192. #endif                                                                          /*APOR*/
  193. #define AP_B_RECEIVE_LOG_DATA           APPC_FLIPI(0x8300)        /* X'8300' */ /*RELD*/
  194.  
  195. /*****************************************************************************/
  196. /* type independent verbs                                                    */
  197. /*****************************************************************************/
  198. #define AP_GET_TP_PROPERTIES            APPC_FLIPI(0x1700) //ES10 /* X'1700' */
  199. #define AP_GET_TYPE                     APPC_FLIPI(0x0800)        /* X'0800' */
  200. #define AP_GET_STATE                    APPC_FLIPI(0x0900)        /* X'0900' */
  201. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  202. #define AP_SET_TP_PROPERTIES            APPC_FLIPI(0x7e00)  /* X'7e00'  *SYNC*/
  203. #define AP_GET_LU_STATUS                APPC_FLIPI(0x7f00)  /* X'7f00'  *SYNC*/
  204. #endif                                                                 /*SYNC*/
  205.  
  206. /* ========================================================================= */
  207. /*****************************************************************************/
  208. /* ------------------- primary and secondary return codes ------------------ */
  209. /*****************************************************************************/
  210. #define AP_OK                           APPC_FLIPI(0x0000)      /* X'0000'   */
  211.  
  212. #define AP_PARAMETER_CHECK              APPC_FLIPI(0x0001)      /* X'0001'   */
  213.   #define AP_BAD_TP_ID                   APPC_FLIPL(0x00000001) /*X'00000001'*/
  214.   #define AP_BAD_CONV_ID                 APPC_FLIPL(0x00000002) /*X'00000002'*/
  215.   #define AP_BAD_LU_ALIAS                APPC_FLIPL(0x00000003) /*X'00000003'*/
  216.   #define AP_INVALID_DATA_SEGMENT        APPC_FLIPL(0x00000006) /*X'00000006'*/
  217.   #define AP_BAD_CONV_TYPE               APPC_FLIPL(0x00000011) /*X'00000011'*/
  218.   #define AP_BAD_SYNC_LEVEL              APPC_FLIPL(0x00000012) /*X'00000012'*/
  219.   #define AP_BAD_SECURITY                APPC_FLIPL(0x00000013) /*X'00000013'*/
  220.   #define AP_BAD_RETURN_CONTROL          APPC_FLIPL(0x00000014) /*X'00000014'*/
  221.   #define AP_PIP_LEN_INCORRECT           APPC_FLIPL(0x00000016) /*X'00000016'*/
  222.   #define AP_NO_USE_OF_SNASVCMG          APPC_FLIPL(0x00000017) /*X'00000017'*/
  223.   #define AP_UNKNOWN_PARTNER_MODE        APPC_FLIPL(0x00000018) /*X'00000018'*/
  224.   #define AP_CONFIRM_ON_SYNC_LEVEL_NONE  APPC_FLIPL(0x00000031) /*X'00000031'*/
  225.   #define AP_DEALLOC_BAD_TYPE            APPC_FLIPL(0x00000051) /*X'00000051'*/
  226.   #define AP_DEALLOC_LOG_LL_WRONG        APPC_FLIPL(0x00000057) /*X'00000057'*/
  227.   #define AP_P_TO_R_INVALID_TYPE         APPC_FLIPL(0x000000a1) /*X'000000a1'*/
  228.   #define AP_RCV_AND_WAIT_BAD_FILL       APPC_FLIPL(0x000000b5) /*X'000000b5'*/
  229.   #define AP_RCV_IMMD_BAD_FILL           APPC_FLIPL(0x000000c4) /*X'000000c4'*/
  230.   #define AP_RCV_AND_POST_BAD_FILL       APPC_FLIPL(0x000000d5) /*X'000000d5'*/
  231.   #define AP_INVALID_SEMAPHORE_HANDLE    APPC_FLIPL(0x000000d6) /*X'000000d6'*/
  232.   #define AP_BAD_RETURN_STATUS_WITH_DATA APPC_FLIPL(0x000000d7) /*X'000000d7'*/
  233.   #define AP_BAD_LL                      APPC_FLIPL(0x000000f1) /*X'000000f1'*/
  234.   #define AP_SEND_DATA_INVALID_TYPE      APPC_FLIPL(0x000000f4) /*X'000000f4'*/
  235.   #define AP_INVALID_SESSION_ID          APPC_FLIPL(0x00000512) /*X'00000512'*/
  236.                                                                        /*ES10*/
  237. /*#define AP_SEND_DATA_CONFIRM_ON_SYNC_LEVEL_NONE 0xf5000000*/ /*X'000000f5' */
  238.   #define AP_SEND_DATA_CONFIRM_SYNC_NONE APPC_FLIPL(0x000000f5) /*X'000000f5'*/
  239.                                                                        /*SCSN*/
  240.   #define AP_BAD_PARTNER_LU_ALIAS        APPC_FLIPL(0x0000015b) /*X'0000015b'*/
  241.                                                                        /*DFLU*/
  242.  
  243.   #define AP_SEND_ERROR_LOG_LL_WRONG     APPC_FLIPL(0x00000102) /*X'00000102'*/
  244.   #define AP_SEND_ERROR_BAD_TYPE         APPC_FLIPL(0x00000103) /*X'00000103'*/
  245.   #define AP_BAD_ERROR_DIRECTION         APPC_FLIPL(0x00000105) /*X'00000105'*/
  246.   #define AP_TOO_MANY_TPS                APPC_FLIPL(0x00000243) /*X'00000243'*/
  247.   #define AP_BAD_TYPE                    APPC_FLIPL(0x00000250) /*X'00000250'*/
  248.   #define AP_UNDEFINED_TP_NAME           APPC_FLIPL(0x00000506) /*X'00000506'*/
  249.   #define AP_INVALID_SET_PROT            APPC_FLIPL(0x00000700) /*X'00000700'SYNC*/
  250.   #define AP_INVALID_NEW_PROT            APPC_FLIPL(0x00000701) /*X'00000701'SYNC*/
  251.   #define AP_INVALID_SET_UNPROT          APPC_FLIPL(0x00000702) /*X'00000702'SYNC*/
  252.   #define AP_INVALID_NEW_UNPROT          APPC_FLIPL(0x00000703) /*X'00000703'SYNC*/
  253.   #define AP_INVALID_SET_USER            APPC_FLIPL(0x00000704) /*X'00000704'SYNC*/
  254.   #define AP_INVALID_DATA_TYPE           APPC_FLIPL(0x00000705) /*X'00000705'SYNC*/
  255.   #define AP_BAD_LOCAL_LU_ALIAS          APPC_FLIPL(0x01000003) /*X'01000003'SYNC*/
  256.   #define AP_BAD_REMOTE_LU_ALIAS         APPC_FLIPL(0x02000003) /*X'02000003'SYNC*/
  257. #ifdef WIN32                                                               /*APOR*/
  258.   #define AP_POST_ON_RECEIPT_BAD_FILL    APPC_FLIPL(0x03000003) /*X'03000003'APOR*/
  259. #endif                                                                     /*APOR*/
  260. #define AP_STATE_CHECK                  APPC_FLIPI(0x0002)      /* X'0002'   */
  261.   #define AP_CONFIRM_BAD_STATE           APPC_FLIPL(0x00000032) /*X'00000032'*/
  262.   #define AP_CONFIRM_NOT_LL_BDY          APPC_FLIPL(0x00000033) /*X'00000033'*/
  263.   #define AP_CONFIRMED_BAD_STATE         APPC_FLIPL(0x00000041) /*X'00000041'*/
  264.   #define AP_DEALLOC_FLUSH_BAD_STATE     APPC_FLIPL(0x00000052) /*X'00000052'*/
  265.   #define AP_DEALLOC_CONFIRM_BAD_STATE   APPC_FLIPL(0x00000053) /*X'00000053'*/
  266.   #define AP_DEALLOC_NOT_LL_BDY          APPC_FLIPL(0x00000055) /*X'00000055'*/
  267.   #define AP_FLUSH_NOT_SEND_STATE        APPC_FLIPL(0x00000061) /*X'00000061'*/
  268.   #define AP_P_TO_R_NOT_LL_BDY           APPC_FLIPL(0x000000a2) /*X'000000a2'*/
  269.   #define AP_P_TO_R_NOT_SEND_STATE       APPC_FLIPL(0x000000a3) /*X'000000a3'*/
  270.   #define AP_RCV_AND_WAIT_BAD_STATE      APPC_FLIPL(0x000000b1) /*X'000000b1'*/
  271.   #define AP_RCV_AND_WAIT_NOT_LL_BDY     APPC_FLIPL(0x000000b2) /*X'000000b2'*/
  272.   #define AP_RCV_IMMD_BAD_STATE          APPC_FLIPL(0x000000c1) /*X'000000c1'*/
  273.   #define AP_RCV_AND_POST_BAD_STATE      APPC_FLIPL(0x000000d1) /*X'000000d1'*/
  274.   #define AP_RCV_AND_POST_NOT_LL_BDY     APPC_FLIPL(0x000000d2) /*X'000000d2'*/
  275.   #define AP_R_T_S_BAD_STATE             APPC_FLIPL(0x000000e1) /*X'000000e1'*/
  276.   #define AP_SEND_DATA_NOT_SEND_STATE    APPC_FLIPL(0x000000f2) /*X'000000f2'*/
  277.   #define AP_SEND_DATA_NOT_LL_BDY        APPC_FLIPL(0x000000f6) /*X'000000f6'*/
  278.   #define AP_ATTACH_MANAGER_INACTIVE     APPC_FLIPL(0x00000508) /*X'00000508'*/
  279.   #define AP_ALLOCATE_NOT_PENDING        APPC_FLIPL(0x00000509) /*X'00000509'*/
  280.   #define AP_INVALID_PROCESS             APPC_FLIPL(0x00000525) /*X'00000525'*/
  281.  
  282. #define AP_ALLOCATION_ERROR             APPC_FLIPI(0x0003)      /* X'0003'   */
  283.   #define AP_ALLOCATION_FAILURE_NO_RETRY APPC_FLIPL(0x00000004) /*X'00000004'*/
  284.   #define AP_ALLOCATION_FAILURE_RETRY    APPC_FLIPL(0x00000005) /*X'00000005'*/
  285.   #define AP_SECURITY_NOT_VALID          APPC_FLIPL(0x080f6051) /*X'080f6051'*/
  286.   #define AP_TRANS_PGM_NOT_AVAIL_RETRY   APPC_FLIPL(0x084b6031) /*X'084b6031 */
  287.   #define AP_TRANS_PGM_NOT_AVAIL_NO_RETRY APPC_FLIPL(0x084c0000) /*X'084c0000*/
  288.   #define AP_TP_NAME_NOT_RECOGNIZED      APPC_FLIPL(0x10086021) /*X'10086021'*/
  289.   #define AP_PIP_NOT_ALLOWED             APPC_FLIPL(0x10086031) /*X'10086031'*/
  290.   #define AP_PIP_NOT_SPECIFIED_CORRECTLY APPC_FLIPL(0x10086032) /*X'10086032'*/
  291.   #define AP_CONVERSATION_TYPE_MISMATCH  APPC_FLIPL(0x10086034) /*X'10086034'*/
  292.   #define AP_SYNC_LEVEL_NOT_SUPPORTED    APPC_FLIPL(0x10086041) /*X'10086041'*/
  293.  
  294. #define AP_DEALLOC_ABEND                APPC_FLIPI(0x0005)      /* X'0005'   */
  295. #define AP_DEALLOC_ABEND_PROG           APPC_FLIPI(0x0006)      /* X'0006'   */
  296. #define AP_DEALLOC_ABEND_SVC            APPC_FLIPI(0x0007)      /* X'0007'   */
  297. #define AP_DEALLOC_ABEND_TIMER          APPC_FLIPI(0x0008)      /* X'0008'   */
  298. #define AP_DEALLOC_NORMAL               APPC_FLIPI(0x0009)      /* X'0009'   */
  299. #define AP_PROG_ERROR_NO_TRUNC          APPC_FLIPI(0x000c)      /* X'000c'   */
  300. #define AP_PROG_ERROR_TRUNC             APPC_FLIPI(0x000d)      /* X'000d'   */
  301. #define AP_PROG_ERROR_PURGING           APPC_FLIPI(0x000e)      /* X'000e'   */
  302. #define AP_CONV_FAILURE_RETRY           APPC_FLIPI(0x000f)      /* X'000f'   */
  303. #define AP_CONV_FAILURE_NO_RETRY        APPC_FLIPI(0x0010)      /* X'0010'   */
  304. #define AP_SVC_ERROR_NO_TRUNC           APPC_FLIPI(0x0011)      /* X'0011'   */
  305. #define AP_SVC_ERROR_TRUNC              APPC_FLIPI(0x0012)      /* X'0012'   */
  306. #define AP_SVC_ERROR_PURGING            APPC_FLIPI(0x0013)      /* X'0013'   */
  307. #define AP_UNSUCCESSFUL                 APPC_FLIPI(0x0014)      /* X'0014'   */
  308. #define AP_CONVERSATION_TYPE_MIXED      APPC_FLIPI(0x0019)      /* X'0019'   */
  309. #define AP_CANCELLED                    APPC_FLIPI(0x0021)      /* X'0021'   */
  310. #define AP_SECURITY_REQUESTED_NOT_SUPPORTED  APPC_FLIPI(0x0022) /* X'0022'   */
  311. #define AP_TP_BUSY                      APPC_FLIPI(0xf002)      /* X'f002'   */
  312.  
  313. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  314. #define AP_BACKED_OUT                   APPC_FLIPI(0x0023)  /* X'0022'  *SYNC*/
  315.   #define AP_BO_NO_RESYNC            APPC_FLIPL(0x08240000) /*X'08240000'SYNC*/
  316.   #define AP_BO_RESYNC               APPC_FLIPL(0x08240001) /*X'08240001'SYNC*/
  317. #endif                                                                 /*SYNC*/
  318.  
  319. #define AP_COMM_SUBSYSTEM_ABENDED       APPC_FLIPI(0xf003)      /* X'f003'   */
  320. #define AP_COMM_SUBSYSTEM_NOT_LOADED    APPC_FLIPI(0xf004)      /* X'f004'   */
  321. #define AP_CONV_BUSY                    APPC_FLIPI(0xf005)      /* X'f005'   */
  322. #define AP_THREAD_BLOCKING              APPC_FLIPI(0xf006)      /* X'f006'   */
  323. #define AP_INVALID_VERB_SEGMENT         APPC_FLIPI(0xf008)      /* X'f008'   */
  324. #define AP_UNEXPECTED_DOS_ERROR         APPC_FLIPI(0xf011)      /* X'f011'   */
  325. #define AP_STACK_TOO_SMALL              APPC_FLIPI(0xf015)      /* X'f015'   */
  326. #define AP_INVALID_VERB                 APPC_FLIPI(0xffff)      /* X'ffff'   */
  327.  
  328. /* ========================================================================= */
  329. /*****************************************************************************/
  330. /* ---------------------------- parameters --------------------------------- */
  331. /*****************************************************************************/
  332.  
  333. /*****************************************************************************/
  334. /* opext and conv_type                                                       */
  335. /*****************************************************************************/
  336. #define AP_BASIC_CONVERSATION             0x00
  337. #define AP_BASIC                          0x00                         /*IBM1*/
  338. #define AP_MAPPED_CONVERSATION            0x01
  339. #define AP_MAPPED                         0x01                         /*IBM1*/
  340.  
  341. /*****************************************************************************/
  342. /* rts_rcvd and return_status_with_data                                      */
  343. /*****************************************************************************/
  344. #define AP_NO                             0x00
  345. #define AP_YES                            0x01
  346.  
  347. /****************************************************************************/
  348. /* sync_level, security and send_type                                        */
  349. /*****************************************************************************/
  350. #define AP_NONE                           0x00
  351.  
  352. /*****************************************************************************/
  353. /* sync_level                                                                */
  354. /*****************************************************************************/
  355. #define AP_CONFIRM_SYNC_LEVEL             0x01
  356. #define AP_CONFIRM                        0x01                         /*IBM1*/
  357. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  358. #define AP_SYNCPT                         0x02                         /*SYNC*/
  359. #endif                                                                 /*SYNC*/
  360.  
  361. /*****************************************************************************/
  362. /* security                                                                  */
  363. /*****************************************************************************/
  364. #define AP_SAME                           0x01
  365. #define AP_PGM                            0x02
  366. #define AP_STRONG                         0x03
  367. #define AP_PROXY                          0x80                         /*5178*/
  368. #define AP_PROXY_SAME                     0x81                         /*5178*/
  369. #define AP_PROXY_PGM                      0x82                         /*5178*/
  370. #define AP_PROXY_STRONG                   0x83                         /*5178*/
  371.  
  372. /*****************************************************************************/
  373. /* dealloc_type and ptr_type                                                 */
  374. /*****************************************************************************/
  375. #define AP_SYNC_LEVEL                     0x00
  376.  
  377. /*****************************************************************************/
  378. /* dealloc_type and ptr_type                                                 */
  379. /*****************************************************************************/
  380. #define AP_FLUSH                          0x01
  381. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  382. #define AP_CONFIRM_TYPE                   0x0B                         /*SYNC*/
  383. #endif                                                                 /*SYNC*/
  384.  
  385. /*****************************************************************************/
  386. /* dealloc_type                                                              */
  387. /*****************************************************************************/
  388. #define AP_ABEND_PROG                     0x02
  389. #define AP_ABEND_SVC                      0x03
  390. #define AP_ABEND_TIMER                    0x04
  391. #define AP_ABEND                          0x05
  392. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  393. #define AP_TP_NOT_AVAIL_RETRY             0x06                         /*SYNC*/
  394. #define AP_TP_NOT_AVAIL_NO_RETRY          0x07                         /*SYNC*/
  395. #define AP_TPN_NOT_RECOGNIZED             0x08                         /*SYNC*/
  396. #define AP_PIP_DATA_NOT_ALLOWED           0x09                         /*SYNC*/
  397. #define AP_PIP_DATA_INCORRECT             0x0A                         /*SYNC*/
  398. #define AP_RESOURCE_FAILURE_NO_RETRY      0x0C                         /*SYNC*/
  399. #define AP_CONV_TYPE_MISMATCH             0x0D                         /*SYNC*/
  400. #define AP_SYNC_LVL_NOT_SUPPORTED         0x0E                         /*SYNC*/
  401. #define AP_SECURITY_PARAMS_INVALID        0x0F                         /*SYNC*/
  402. #endif                                                                 /*SYNC*/
  403.  
  404. /*****************************************************************************/
  405. /* locks                                                                     */
  406. /*****************************************************************************/
  407. #define AP_SHORT                          0x00
  408. #define AP_LONG                           0x01
  409.  
  410. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  411. /************************************************************************SYNC*/
  412. /* data_type                                                            *SYNC*/
  413. /************************************************************************SYNC*/
  414. #define AP_APPLICATION                    0x00                         /*SYNC*/
  415. #define AP_USER_CONTROL_DATA              0x01                         /*SYNC*/
  416. #define AP_PS_HEADER                      0x02                         /*SYNC*/
  417. #endif                                                                 /*SYNC*/
  418.  
  419. /*****************************************************************************/
  420. /* what_rcvd                                                                 */
  421. /*****************************************************************************/
  422. #define AP_DATA                          APPC_FLIPI(0x0001)     /* X'0001'   */
  423. #define AP_DATA_COMPLETE                 APPC_FLIPI(0x0002)     /* X'0002'   */
  424. #define AP_NOT_DATA                      APPC_FLIPI(0x0003)     /* X'0003'   */ /*APOR*/
  425. #define AP_DATA_INCOMPLETE               APPC_FLIPI(0x0004)     /* X'0004'   */
  426. #define AP_SEND                          APPC_FLIPI(0x0100)     /* X'0100'   */
  427. #define AP_CONFIRM_WHAT_RECEIVED         APPC_FLIPI(0x0200)     /* X'0200'   */
  428. #define AP_CONFIRM_SEND                  APPC_FLIPI(0x0300)     /* X'0300'   */
  429. #define AP_CONFIRM_DEALLOCATE            APPC_FLIPI(0x0400)     /* X'0400'   */
  430.  
  431. #define AP_DATA_COMPLETE_SEND            APPC_FLIPI(0x0102)     /* X'0102'   */
  432. #define AP_DATA_COMPLETE_CONFIRM         APPC_FLIPI(0x0202)     /* X'0202'   */
  433. #define AP_DATA_COMPLETE_CONFIRM_SEND    APPC_FLIPI(0x0302)     /* X'0302'   */
  434. #define AP_DATA_COMPLETE_CONFIRM_DEALL   APPC_FLIPI(0x0402)     /* X'0402'   */
  435.  
  436. #define AP_DATA_SEND                     APPC_FLIPI(0x0101)     /* X'0101'   */
  437. #define AP_DATA_CONFIRM                  APPC_FLIPI(0x0201)     /* X'0201'   */
  438. #define AP_DATA_CONFIRM_SEND             APPC_FLIPI(0x0301)     /* X'0301'   */
  439. #define AP_DATA_CONFIRM_DEALLOCATE       APPC_FLIPI(0x0401)     /* X'0401'   */
  440.  
  441. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  442. #define AP_USER_CONTROL_DATA_COMPLETE    APPC_FLIPI(0x0008) /* X'0008'  *SYNC*/
  443. #define AP_USER_CONTROL_DATA_INCOMPLETE  APPC_FLIPI(0x0010) /* X'0010'  *SYNC*/
  444. #define AP_PS_HEADER_COMPLETE            APPC_FLIPI(0x0020) /* X'0020'  *SYNC*/
  445. #define AP_PS_HEADER_INCOMPLETE          APPC_FLIPI(0x0040) /* X'0040'  *SYNC*/
  446. #endif                                                                 /*SYNC*/
  447.  
  448. /*****************************************************************************/
  449. /* fill                                                                      */
  450. /*****************************************************************************/
  451. #define AP_BUFFER                         0x00
  452. #define AP_LL                             0x01
  453.  
  454. /*****************************************************************************/
  455. /* rtn_ctl                                                                   */
  456. /*****************************************************************************/
  457. #define AP_WHEN_SESSION_ALLOCATED         0x00
  458. #define AP_IMMEDIATE                      0x01
  459. #define AP_WHEN_SESSION_FREE              0x02
  460. #define AP_WHEN_CONWINNER_ALLOCATED       0x03                         /*ES10*/
  461. #define AP_WHEN_CONV_GROUP_ALLOCATED      0x04                         /*ES10*/
  462.  
  463. /*****************************************************************************/
  464. /* err_type                                                                  */
  465. /*****************************************************************************/
  466. #define AP_PROG                           0x00
  467. #define AP_SVC                            0x01
  468. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  469. #define AP_BACKOUT_NO_RESYNC              0x02                         /*SYNC*/
  470. #define AP_BACKOUT_RESYNC                 0x03                         /*SYNC*/
  471. #endif                                                                 /*SYNC*/
  472.  
  473. /*****************************************************************************/
  474. /* send_type                                                                 */
  475. /*****************************************************************************/
  476. #define AP_SEND_DATA_FLUSH                0x01
  477. #define AP_SEND_DATA_CONFIRM              0x02
  478. #define AP_SEND_DATA_P_TO_R_FLUSH         0x03
  479. #define AP_SEND_DATA_P_TO_R_SYNC_LEVEL    0x04
  480. #define AP_SEND_DATA_DEALLOC_FLUSH        0x05
  481. #define AP_SEND_DATA_DEALLOC_SYNC_LEVEL   0x06
  482. #define AP_SEND_DATA_DEALLOC_ABEND        0x07
  483. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  484. #define AP_SEND_DATA_P_TO_R_CONFIRM       0x08                         /*SYNC*/
  485. #define AP_SEND_DATA_DEALLOC_CONFIRM      0x09                         /*SYNC*/
  486. #endif                                                                 /*SYNC*/
  487.  
  488. /*****************************************************************************/
  489. /* err_dir                                                                   */
  490. /*****************************************************************************/
  491. #define  AP_RCV_DIR_ERROR                 0x00
  492. #define  AP_SEND_DIR_ERROR                0x01
  493.  
  494. /*****************************************************************************/
  495. /* end_type                                                                  */
  496. /*****************************************************************************/
  497. #define AP_SOFT                           0x00
  498. #define AP_HARD                           0x01
  499.  
  500. /*****************************************************************************/
  501. /* conv_state                                                                */
  502. /*****************************************************************************/
  503. #define AP_RESET_STATE            1
  504. #define AP_SEND_STATE             2
  505. #define AP_RECEIVE_STATE          3
  506. #define AP_CONFIRM_STATE          4
  507. #define AP_CONFIRM_SEND_STATE     5
  508. #define AP_CONFIRM_DEALL_STATE    6
  509. #define AP_PEND_POST_STATE        7
  510. #define AP_PEND_DEALL_STATE       8
  511. #define AP_END_CONV_STATE         9
  512. #define AP_SEND_PENDING_STATE    10
  513.  
  514. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  515. /************************************************************************SYNC*/
  516. /* values for type parameter on implied forget callback                 *SYNC*/
  517. /************************************************************************SYNC*/
  518. #define AP_DATA_FLOW                      0x00                         /*SYNC*/
  519. #define AP_UNBIND                         0x01                         /*SYNC*/
  520. #define AP_FAILURE                        0x02                         /*SYNC*/
  521.                                                                        /*SYNC*/
  522. #endif                                                                 /*SYNC*/
  523.  
  524. /************************************************************************SYNC*/
  525. /* extension bit for the opext field                                    *SYNC*/
  526. /************************************************************************SYNC*/
  527. #define AP_EXTD_VCB                       0x80                    /*5178*SYNC*/
  528.  
  529. /* ========================================================================= */
  530. /*****************************************************************************/
  531. /* ------------------------- vcb structures -------------------------------- */
  532. /*****************************************************************************/
  533.  
  534. /*****************************************************************************/
  535. /* common vcb header                                                         */
  536. /*****************************************************************************/
  537. struct appc_hdr
  538. {
  539.   unsigned short opcode;
  540.   unsigned char  opext;
  541.   unsigned char  reserv2;
  542.   unsigned short primary_rc;
  543.   unsigned long  secondary_rc;
  544. };
  545.  
  546. /*****************************************************************************/
  547. /* control vcbs                                                              */
  548. /*****************************************************************************/
  549. struct tp_started
  550. {
  551.   unsigned short    opcode;
  552.   unsigned char     opext;
  553.   unsigned char     reserv2;
  554.   unsigned short    primary_rc;
  555.   unsigned long     secondary_rc;
  556.   unsigned char     lu_alias[8];
  557.   unsigned char     tp_id[8];
  558.   unsigned char     tp_name[64];
  559. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  560.   unsigned char     syncpoint_rqd;  /* present if opext & AP_EXTD_VCB   *SYNC*/
  561.                                     /* AP_NO                            *SYNC*/
  562.                                     /* AP_YES                           *SYNC*/
  563. #endif                                                                 /*SYNC*/
  564. };
  565.  
  566.  
  567. struct receive_allocate
  568. {
  569.   unsigned short    opcode;
  570.   unsigned char     opext;
  571.   unsigned char     reserv2;
  572.   unsigned short    primary_rc;
  573.   unsigned long     secondary_rc;
  574.   unsigned char     tp_name[64];
  575.   unsigned char     tp_id[8];
  576.   unsigned long     conv_id;
  577.   unsigned char     sync_level;         /* AP_NONE                           */
  578.                                         /* AP_CONFIRM_SYNC_LEVEL             */
  579.                                         /* AP_SYNCPT                    *SYNC*/
  580.   unsigned char     conv_type;          /* AP_BASIC_CONVERSATION             */
  581.                                         /* AP_MAPPED_CONVERSATION            */
  582.   unsigned char     user_id[10];
  583.   unsigned char     lu_alias[8];
  584.   unsigned char     plu_alias[8];
  585.   unsigned char     mode_name[8];
  586.   unsigned char     reserv3[2];
  587.   unsigned long     conv_group_id;      /* conversation group id        *ES10*/
  588.   unsigned char     fqplu_name[17];     /* fully qualified lu name      *ES10*/
  589. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  590.   unsigned char     pip_incoming;       /* Supplied:                    *SYNC*/
  591.                                         /*   AP_NO:  TP does not accept *SYNC*/
  592.                                         /*           PIP data           *SYNC*/
  593.                                         /*   AP_YES: TP does accept PIP *SYNC*/
  594.                                         /*           data               *SYNC*/
  595.                                         /* Returned:                    *SYNC*/
  596.                                         /*   AP_NO:  PIP data not       *SYNC*/
  597.                                         /*           available          *SYNC*/
  598.                                         /*   AP_YES: PIP data available *SYNC*/
  599.   unsigned char     syncpoint_rqd;      /* AP_NO                        *SYNC*/
  600.                                         /* AP_YES                       *SYNC*/
  601.   unsigned char     reserv4[3];                                        /*SYNC*/
  602. #else                                                                  /*SYNC*/
  603.   unsigned char     reserv4[5];
  604. #endif                                                                 /*SYNC*/
  605. };
  606.  
  607.  
  608. struct tp_ended
  609. {
  610.   unsigned short    opcode;
  611.   unsigned char     opext;
  612.   unsigned char     reserv2;
  613.   unsigned short    primary_rc;
  614.   unsigned long     secondary_rc;
  615.   unsigned char     tp_id[8];
  616.   unsigned char     type;               /* AP_SOFT                      *9997*/
  617.                                         /* AP_HARD                           */
  618. };
  619.  
  620.  
  621. /*****************************************************************************/
  622. /* mapped conversation vcbs                                                  */
  623. /*****************************************************************************/
  624. struct mc_allocate
  625. {
  626.   unsigned short    opcode;
  627.   unsigned char     opext;
  628.   unsigned char     reserv2;
  629.   unsigned short    primary_rc;
  630.   unsigned long     secondary_rc;
  631.   unsigned char     tp_id[8];
  632.   unsigned long     conv_id;
  633.   unsigned char     reserv3;
  634.   unsigned char     sync_level;         /* AP_NONE                           */
  635.                                         /* AP_CONFIRM_SYNC_LEVEL             */
  636.                                         /* AP_SYNCPT                    *SYNC*/
  637.   unsigned char     reserv4[2];
  638.   unsigned char     rtn_ctl;            /* AP_WHEN_SESSION_ALLOCATED         */
  639.                                         /* AP_IMMEDIATE                      */
  640.                                         /* AP_WHEN_SESSION_FREE              */
  641.                                         /* AP_WHEN_CONWINNER_ALLOCATED  *ES10*/
  642.                                         /* AP_WHEN_CONV_GROUP_ALLOCATED *ES10*/
  643.   unsigned char     reserv5;
  644.   unsigned long     conv_group_id;      /* conversation group id        *ES10*/
  645.   unsigned long     sense_data;         /* alloc failure sense data     *ES10*/
  646.   unsigned char     plu_alias[8];
  647.   unsigned char     mode_name[8];
  648.   unsigned char     tp_name[64];
  649.   unsigned char     security;           /* AP_NONE                           */
  650.                                         /* AP_SAME                           */
  651.                                         /* AP_PGM                            */
  652.                                         /* AP_PROXY_NONE                *5178*/
  653.                                         /* AP_PROXY_SAME                *5178*/
  654.                                         /* AP_PROXY_PGM                 *5178*/
  655.   unsigned char     reserv6[11];
  656.   unsigned char     pwd[10];
  657.   unsigned char     user_id[10];
  658.   unsigned short    pip_dlen;
  659.   unsigned char far *pip_dptr;
  660.   unsigned char     reserv7;            /*CPIC* reserved for NS/2 compat.    */
  661.   unsigned char     fqplu_name[17];     /*CPIC* fully qualified PLU name     */
  662.   unsigned char     reserv8[8];         /*CPIC* reduced this from 26 to 8    */
  663. #ifdef WIN32
  664.   LPWSTR            proxy_user;         /* present if opext&AP_EXTD_VCB *5178*/
  665.   LPWSTR            proxy_domain;       /* present if opext&AP_EXTD_VCB *5178*/
  666.   unsigned char     reserv9[16];        /* present if opext&AP_EXTD_VCB *5178*/
  667. #endif
  668. };
  669.  
  670.  
  671. struct mc_confirm
  672. {
  673.   unsigned short    opcode;
  674.   unsigned char     opext;
  675.   unsigned char     reserv2;
  676.   unsigned short    primary_rc;
  677.   unsigned long     secondary_rc;
  678.   unsigned char     tp_id[8];
  679.   unsigned long     conv_id;
  680.   unsigned char     rts_rcvd;           /* AP_NO                             */
  681.                                         /* AP_YES                            */
  682. };
  683.  
  684.  
  685. struct mc_confirmed
  686. {
  687.   unsigned short    opcode;
  688.   unsigned char     opext;
  689.   unsigned char     reserv2;
  690.   unsigned short    primary_rc;
  691.   unsigned long     secondary_rc;
  692.   unsigned char     tp_id[8];
  693.   unsigned long     conv_id;
  694. };
  695.  
  696.  
  697. struct mc_deallocate
  698. {
  699.   unsigned short    opcode;
  700.   unsigned char     opext;
  701.   unsigned char     reserv2;
  702.   unsigned short    primary_rc;
  703.   unsigned long     secondary_rc;
  704.   unsigned char     tp_id[8];
  705.   unsigned long     conv_id;
  706.   unsigned char     reserv3;
  707.   unsigned char     dealloc_type;       /* AP_SYNC_LEVEL                     */
  708.                                         /* AP_FLUSH                          */
  709.                                         /* AP_CONFIRM_TYPE              *SYNC*/
  710.                                         /* AP_ABEND                          */
  711.                                         /* AP_TP_NOT_AVAIL_RETRY        *SYNC*/
  712.                                         /* AP_TP_NOT_AVAIL_NO_RETRY     *SYNC*/
  713.                                         /* AP_TPN_NOT_RECOGNIZED        *SYNC*/
  714.                                         /* AP_PIP_DATA_NOT_ALLOWED      *SYNC*/
  715.                                         /* AP_PIP_DATA_INCORRECT        *SYNC*/
  716.                                         /* AP_RESOURCE_FAILURE_NO_RETRY *SYNC*/
  717.                                         /* AP_CONV_TYPE_MISMATCH        *SYNC*/
  718.                                         /* AP_SYNC_LVL_NOT_SUPPORTED    *SYNC*/
  719.                                         /* AP_SECURITY_PARAMS_INVALID   *SYNC*/
  720.   unsigned char     reserv4[2];
  721.   unsigned char     reserv5[4];
  722. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  723.   void       (WINAPI *callback)();      /* present if opext&AP_EXTD_VCB *SYNC*/
  724.   void             *correlator;         /* present if opext&AP_EXTD_VCB *SYNC*/
  725.   unsigned char     reserv6[4];         /* present if opext&AP_EXTD_VCB *SYNC*/
  726. #endif                                                                 /*SYNC*/
  727. };
  728.  
  729.  
  730. struct mc_flush
  731. {
  732.   unsigned short    opcode;
  733.   unsigned char     opext;
  734.   unsigned char     reserv2;
  735.   unsigned short    primary_rc;
  736.   unsigned long     secondary_rc;
  737.   unsigned char     tp_id[8];
  738.   unsigned long     conv_id;
  739. };
  740.  
  741.  
  742. struct mc_get_attributes
  743. {
  744.   unsigned short    opcode;
  745.   unsigned char     opext;
  746.   unsigned char     reserv2;
  747.   unsigned short    primary_rc;
  748.   unsigned long     secondary_rc;
  749.   unsigned char     tp_id[8];
  750.   unsigned long     conv_id;
  751.   unsigned char     reserv3;
  752.   unsigned char     sync_level;         /* AP_NONE                           */
  753.                                         /* AP_CONFIRM_SYNC_LEVEL             */
  754.                                         /* AP_SYNCPT                    *SYNC*/
  755.   unsigned char     mode_name[8];
  756.   unsigned char     net_name[8];
  757.   unsigned char     lu_name[8];
  758.   unsigned char     lu_alias[8];
  759.   unsigned char     plu_alias[8];
  760.   unsigned char     plu_un_name[8];
  761.   unsigned char     reserv4[2];
  762.   unsigned char     fqplu_name[17];
  763.   unsigned char     reserv5;
  764.   unsigned char     user_id[10];
  765.   unsigned long     conv_group_id;      /* conversation group id        *ES10*/
  766.   unsigned char     conv_corr_len;      /* conversation correlator lgth *ES10*/
  767.   unsigned char     conv_corr[8];       /* conversation correlator      *ES10*/
  768.   unsigned char     reserv6[13];
  769. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  770.   unsigned char     luw_id[26];          /* present if opext&AP_EXTD_VCB*SYNC*/
  771.   unsigned char     sess_id[8];          /* present if opext&AP_EXTD_VCB*SYNC*/
  772. #endif                                                                 /*SYNC*/
  773. };
  774.  
  775.  
  776. struct mc_prepare_to_receive
  777. {
  778.   unsigned short    opcode;
  779.   unsigned char     opext;
  780.   unsigned char     reserv2;
  781.   unsigned short    primary_rc;
  782.   unsigned long     secondary_rc;
  783.   unsigned char     tp_id[8];
  784.   unsigned long     conv_id;
  785.   unsigned char     ptr_type;           /* AP_SYNC_LEVEL                     */
  786.                                         /* AP_FLUSH                          */
  787.                                         /* AP_CONFIRM_TYPE              *SYNC*/
  788.   unsigned char     locks;              /* AP_SHORT                          */
  789.                                         /* AP_LONG                           */
  790. };
  791.  
  792.  
  793. struct mc_receive_and_post
  794. {
  795.   unsigned short    opcode;
  796.   unsigned char     opext;
  797.   unsigned char     reserv2;
  798.   unsigned short    primary_rc;
  799.   unsigned long     secondary_rc;
  800.   unsigned char     tp_id[8];
  801.   unsigned long     conv_id;
  802.   unsigned short    what_rcvd;          /* AP_NONE                           */
  803.                                         /* AP_DATA                           */
  804.                                         /* AP_CONFIRM_WHAT_RECEIVED          */
  805.                                         /* AP_CONFIRM_SEND                   */
  806.                                         /* AP_CONFIRM_DEALLOCATE             */
  807.   unsigned char     rtn_status;         /* AP_NO                             */
  808.                                         /* AP_YES                            */
  809.   unsigned char     reserv4;
  810.   unsigned char     rts_rcvd;           /* AP_NO                             */
  811.                                         /* AP_YES                            */
  812.   unsigned char     reserv5;
  813.   unsigned short    max_len;
  814.   unsigned short    dlen;
  815.   unsigned char far *dptr;
  816.   unsigned char far *sema;
  817.   unsigned char     reserv6;
  818. };
  819.  
  820.  
  821. struct mc_receive_and_wait
  822. {
  823.   unsigned short    opcode;
  824.   unsigned char     opext;
  825.   unsigned char     reserv2;
  826.   unsigned short    primary_rc;
  827.   unsigned long     secondary_rc;
  828.   unsigned char     tp_id[8];
  829.   unsigned long     conv_id;
  830.   unsigned short    what_rcvd;          /* AP_NONE                           */
  831.                                         /* AP_DATA                           */
  832.                                         /* AP_SEND                           */
  833.                                         /* AP_CONFIRM_WHAT_RECEIVED          */
  834.                                         /* AP_CONFIRM_SEND                   */
  835.                                         /* AP_CONFIRM_DEALLOCATE             */
  836.   unsigned char     rtn_status;         /* AP_NO                             */
  837.                                         /* AP_YES                            */
  838.   unsigned char     reserv4;
  839.   unsigned char     rts_rcvd;           /* AP_NO                             */
  840.                                         /* AP_YES                            */
  841.   unsigned char     reserv5;
  842.   unsigned short    max_len;
  843.   unsigned short    dlen;
  844.   unsigned char far *dptr;
  845.   unsigned char     reserv6[5];
  846. };
  847.  
  848.  
  849. struct mc_receive_immediate
  850. {
  851.   unsigned short    opcode;
  852.   unsigned char     opext;
  853.   unsigned char     reserv2;
  854.   unsigned short    primary_rc;
  855.   unsigned long     secondary_rc;
  856.   unsigned char     tp_id[8];
  857.   unsigned long     conv_id;
  858.   unsigned short    what_rcvd;          /* AP_NONE                           */
  859.                                         /* AP_DATA                           */
  860.                                         /* AP_SEND                           */
  861.                                         /* AP_CONFIRM_WHAT_RECEIVED          */
  862.                                         /* AP_CONFIRM_SEND                   */
  863.                                         /* AP_CONFIRM_DEALLOCATE             */
  864.   unsigned char     rtn_status;         /* AP_NO                             */
  865.                                         /* AP_YES                            */
  866.   unsigned char     reserv4;
  867.   unsigned char     rts_rcvd;           /* AP_NO                             */
  868.                                         /* AP_YES                            */
  869.   unsigned char     reserv5;
  870.   unsigned short    max_len;
  871.   unsigned short    dlen;
  872.   unsigned char far *dptr;
  873.   unsigned char     reserv6[5];
  874. };
  875.  
  876.  
  877. struct mc_request_to_send
  878. {
  879.   unsigned short    opcode;
  880.   unsigned char     opext;
  881.   unsigned char     reserv2;
  882.   unsigned short    primary_rc;
  883.   unsigned long     secondary_rc;
  884.   unsigned char     tp_id[8];
  885.   unsigned long     conv_id;
  886. };
  887.  
  888.  
  889. struct mc_send_conversation                                            /*ES10*/
  890. {                                                                      /*ES10*/
  891.   unsigned short    opcode;                                            /*ES10*/
  892.   unsigned char     opext;                                             /*ES10*/
  893.   unsigned char     reserv2;                                           /*ES10*/
  894.   unsigned short    primary_rc;                                        /*ES10*/
  895.   unsigned long     secondary_rc;                                      /*ES10*/
  896.   unsigned char     tp_id[8];                                          /*ES10*/
  897.   unsigned char     reserv3[8];                                        /*ES10*/
  898.   unsigned char     rtn_ctl;            /* AP_WHEN_SESSION_ALLOCATED    *ES10*/
  899.                                         /* AP_IMMEDIATE                 *ES10*/
  900.                                         /* AP_WHEN_SESSION_FREE         *ES10*/
  901.                                         /* AP_WHEN_CONWINNER_ALLOCATED  *ES10*/
  902.                                         /* AP_WHEN_CONV_GROUP_ALLOCATED *ES10*/
  903.   unsigned char     reserv4;                                           /*ES10*/
  904.   unsigned long     conv_group_id;      /* conversation group id        *ES10*/
  905.   unsigned long     sense_data;         /* alloc failure sense data     *ES10*/
  906.   unsigned char     plu_alias[8];                                      /*ES10*/
  907.   unsigned char     mode_name[8];                                      /*ES10*/
  908.   unsigned char     tp_name[64];                                       /*ES10*/
  909.   unsigned char     security;           /* AP_NONE                      *ES10*/
  910.                                         /* AP_SAME                      *ES10*/
  911.                                         /* AP_PGM                       *ES10*/
  912.   unsigned char     reserv5[11];                                       /*ES10*/
  913.   unsigned char     pwd[10];                                           /*ES10*/
  914.   unsigned char     user_id[10];                                       /*ES10*/
  915.   unsigned short    pip_dlen;                                          /*ES10*/
  916.   unsigned char far *pip_dptr;                                         /*ES10*/
  917.   unsigned char     reserv6;                                           /*ES10*/
  918.   unsigned char     fqplu_name[17];                                    /*ES10*/
  919.   unsigned char     reserv7[8];                                        /*ES10*/
  920.   unsigned short    dlen;                                              /*ES10*/
  921.   unsigned char far *dptr;                                             /*ES10*/
  922. };                                                                     /*ES10*/
  923.  
  924.  
  925. struct mc_send_data
  926. {
  927.   unsigned short    opcode;
  928.   unsigned char     opext;
  929.   unsigned char     reserv2;
  930.   unsigned short    primary_rc;
  931.   unsigned long     secondary_rc;
  932.   unsigned char     tp_id[8];
  933.   unsigned long     conv_id;
  934.   unsigned char     rts_rcvd;           /* AP_NO                             */
  935.                                         /* AP_YES                            */
  936. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  937.   unsigned char     data_type;           /* type of data to be sent     *SYNC*/
  938.                                          /* AP_APPLICATION              *SYNC*/
  939.                                          /* AP_USER_CONTROL_DATA        *SYNC*/
  940.                                          /* AP_PS_HEADER                *SYNC*/
  941. #else                                                                  /*SYNC*/
  942.   unsigned char     reserv3;
  943. #endif                                                                 /*SYNC*/
  944.   unsigned short    dlen;
  945.   unsigned char far *dptr;
  946.   unsigned char     type;               /* AP_SEND_DATA_FLUSH                */
  947.                                         /* AP_SEND_DATA_CONFIRM              */
  948.                                         /* AP_SEND_DATA_P_TO_R_FLUSH         */
  949.                                         /* AP_SEND_DATA_P_TO_R_SYNC_LEVEL    */
  950.                                         /* AP_SEND_DATA_P_TO_R_CONFIRM  *SYNC*/
  951.                                         /* AP_SEND_DATA_DEALLOC_FLUSH        */
  952.                                         /* AP_SEND_DATA_DEALLOC_SYNC_LEVEL   */
  953.                                         /* AP_SEND_DATA_DEALLOC_CONFIRM *SYNC*/
  954.                                         /* AP_SEND_DATA_DEALLOC_ABEND        */
  955.   unsigned char     reserv4;
  956. };
  957.  
  958.  
  959. struct mc_send_error
  960. {
  961.   unsigned short    opcode;
  962.   unsigned char     opext;
  963.   unsigned char     reserv2;
  964.   unsigned short    primary_rc;
  965.   unsigned long     secondary_rc;
  966.   unsigned char     tp_id[8];
  967.   unsigned long     conv_id;
  968.   unsigned char     rts_rcvd;           /* AP_NO                             */
  969.                                         /* AP_YES                            */
  970. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  971.   unsigned char     err_type;            /* type of error               *SYNC*/
  972.                                          /* AP_PROG                     *SYNC*/
  973.                                          /* AP_BACKOUT_NO_RESYNC        *SYNC*/
  974.                                          /* AP_BACKOUT_RESYNC           *SYNC*/
  975. #else                                                                  /*SYNC*/
  976.   unsigned char     reserv3;
  977. #endif                                                                 /*SYNC*/
  978.   unsigned char     err_dir;            /* AP_RCV_DIR_ERROR                  */
  979.                                         /* AP_SEND_DIR_ERROR                 */
  980.   unsigned char     reserv4;
  981.   unsigned short    log_dlen;                                          /*SELD*/
  982.   unsigned char far *log_dptr;                                         /*SELD*/
  983. };
  984.  
  985. struct mc_test_rts
  986. {
  987.   unsigned short    opcode;
  988.   unsigned char     opext;
  989.   unsigned char     reserv2;
  990.   unsigned short    primary_rc;
  991.   unsigned long     secondary_rc;
  992.   unsigned char     tp_id[8];
  993.   unsigned long     conv_id;
  994.   unsigned char     reserv3;
  995. };
  996.  
  997. struct mc_test_rts_and_post                                            /*RPRP*/
  998. {                                                                      /*RPRP*/
  999.   unsigned short    opcode;                                            /*RPRP*/
  1000.   unsigned char     opext;                                             /*RPRP*/
  1001.   unsigned char     reserv2;                                           /*RPRP*/
  1002.   unsigned short    primary_rc;                                        /*RPRP*/
  1003.   unsigned long     secondary_rc;                                      /*RPRP*/
  1004.   unsigned char     tp_id[8];                                          /*RPRP*/
  1005.   unsigned long     conv_id;                                           /*RPRP*/
  1006.   unsigned char     reserv3;                                           /*RPRP*/
  1007.   unsigned long     handle;                                            /*RPRP*/
  1008. };                                                                     /*RPRP*/
  1009.  
  1010. #ifdef WIN32                                                           /*APOR*/
  1011. struct mc_post_on_receipt                                              /*APOR*/
  1012. {                                                                      /*APOR*/
  1013.   unsigned short        opcode;                                        /*APOR*/
  1014.   unsigned char         opext;                                         /*APOR*/
  1015.   unsigned char         reserv1;                                       /*APOR*/
  1016.   unsigned short        primary_rc;                                    /*APOR*/
  1017.   unsigned long         secondary_rc;                                  /*APOR*/
  1018.   unsigned char         tp_id[8];                                      /*APOR*/
  1019.   unsigned long         conv_id;                                       /*APOR*/
  1020.   unsigned short        reserv2;                                       /*APOR*/
  1021.   unsigned char         reserv3;                                       /*APOR*/
  1022.   unsigned char         reserv4;                                       /*APOR*/
  1023.   unsigned short        max_len;                                       /*APOR*/
  1024.   unsigned short        reserv5;                                       /*APOR*/
  1025.   unsigned char far *   reserv6;                                       /*APOR*/
  1026.   unsigned char         reserv7[5];                                    /*APOR*/
  1027.   unsigned long         sema;                                          /*APOR*/
  1028. };                                                                     /*APOR*/
  1029. #endif                                                                 /*APOR*/
  1030.  
  1031. struct mc_receive_log_data                                             /*RELD*/
  1032. {                                                                      /*RELD*/
  1033.   unsigned short        opcode;                                        /*RELD*/
  1034.   unsigned char         opext;                                         /*RELD*/
  1035.   unsigned char         reserv1;                                       /*RELD*/
  1036.   unsigned short        primary_rc;                                    /*RELD*/
  1037.   unsigned long         secondary_rc;                                  /*RELD*/
  1038.   unsigned char         tp_id[8];                                      /*RELD*/
  1039.   unsigned long         conv_id;                                       /*RELD*/
  1040.   unsigned short        log_dlen;                                      /*RELD*/
  1041.   unsigned char far *   log_dptr;                                      /*RELD*/
  1042. };                                                                     /*RELD*/
  1043.  
  1044. /*****************************************************************************/
  1045. /* basic conversation vcbs                                                   */
  1046. /*****************************************************************************/
  1047. struct allocate
  1048. {
  1049.   unsigned short    opcode;
  1050.   unsigned char     opext;
  1051.   unsigned char     reserv2;
  1052.   unsigned short    primary_rc;
  1053.   unsigned long     secondary_rc;
  1054.   unsigned char     tp_id[8];
  1055.   unsigned long     conv_id;
  1056.   unsigned char     conv_type;          /* AP_BASIC_CONVERSATION             */
  1057.                                         /* AP_MAPPED_CONVERSATION            */
  1058.   unsigned char     sync_level;         /* AP_NONE                           */
  1059.                                         /* AP_CONFIRM_SYNC_LEVEL             */
  1060.                                         /* AP_SYNCPT                    *SYNC*/
  1061.   unsigned char     reserv3[2];
  1062.   unsigned char     rtn_ctl;            /* AP_WHEN_SESSION_ALLOCATED         */
  1063.                                         /* AP_IMMEDIATE                      */
  1064.                                         /* AP_WHEN_SESSION_FREE              */
  1065.                                         /* AP_WHEN_CONWINNER_ALLOCATED  *ES10*/
  1066.                                         /* AP_WHEN_CONV_GROUP_ALLOCATED *ES10*/
  1067.   unsigned char     reserv4;
  1068.   unsigned long     conv_group_id;      /* conversation group id        *ES10*/
  1069.   unsigned long     sense_data;         /* alloc failure sense data     *ES10*/
  1070.   unsigned char     plu_alias[8];
  1071.   unsigned char     mode_name[8];
  1072.   unsigned char     tp_name[64];
  1073.   unsigned char     security;           /* AP_NONE                           */
  1074.                                         /* AP_SAME                           */
  1075.                                         /* AP_PGM                            */
  1076.                                         /* AP_PROXY_NONE                *5178*/
  1077.                                         /* AP_PROXY_SAME                *5178*/
  1078.                                         /* AP_PROXY_PGM                 *5178*/
  1079.   unsigned char     reserv5[11];
  1080.   unsigned char     pwd[10];
  1081.   unsigned char     user_id[10];
  1082.   unsigned short    pip_dlen;
  1083.   unsigned char far *pip_dptr;
  1084.   unsigned char     reserv7;            /*CPIC* for NS/2 compatability       */
  1085.   unsigned char     fqplu_name[17];     /*CPIC* fully qualified PLU name     */
  1086.   unsigned char     reserv8[8];         /*CPIC* reduced this from 26 to 8    */
  1087. #ifdef WIN32
  1088.   LPWSTR            proxy_user;         /* present if opext&AP_EXTD_VCB *5178*/
  1089.   LPWSTR            proxy_domain;       /* present if opext&AP_EXTD_VCB *5178*/
  1090.   unsigned char     reserv9[16];        /* present if opext&AP_EXTD_VCB *5178*/
  1091. #endif
  1092. };
  1093.  
  1094.  
  1095. struct confirm
  1096. {
  1097.   unsigned short    opcode;
  1098.   unsigned char     opext;
  1099.   unsigned char     reserv2;
  1100.   unsigned short    primary_rc;
  1101.   unsigned long     secondary_rc;
  1102.   unsigned char     tp_id[8];
  1103.   unsigned long     conv_id;
  1104.   unsigned char     rts_rcvd;           /* AP_NO                             */
  1105.                                         /* AP_YES                            */
  1106. };
  1107.  
  1108.  
  1109. struct confirmed
  1110. {
  1111.   unsigned short    opcode;
  1112.   unsigned char     opext;
  1113.   unsigned char     reserv2;
  1114.   unsigned short    primary_rc;
  1115.   unsigned long     secondary_rc;
  1116.   unsigned char     tp_id[8];
  1117.   unsigned long     conv_id;
  1118. };
  1119.  
  1120.  
  1121. struct deallocate
  1122. {
  1123.   unsigned short    opcode;
  1124.   unsigned char     opext;
  1125.   unsigned char     reserv2;
  1126.   unsigned short    primary_rc;
  1127.   unsigned long     secondary_rc;
  1128.   unsigned char     tp_id[8];
  1129.   unsigned long     conv_id;
  1130.   unsigned char     reserv3;
  1131.   unsigned char     dealloc_type;       /* AP_SYNC_LEVEL                     */
  1132.                                         /* AP_FLUSH                          */
  1133.                                         /* AP_CONFIRM_TYPE              *SYNC*/
  1134.                                         /* AP_ABEND_PROG                     */
  1135.                                         /* AP_ABEND_SVC                      */
  1136.                                         /* AP_ABEND_TIMER                    */
  1137.                                         /* AP_TP_NOT_AVAIL_RETRY        *SYNC*/
  1138.                                         /* AP_TP_NOT_AVAIL_NO_RETRY     *SYNC*/
  1139.                                         /* AP_TPN_NOT_RECOGNIZED        *SYNC*/
  1140.                                         /* AP_PIP_DATA_NOT_ALLOWED      *SYNC*/
  1141.                                         /* AP_PIP_DATA_INCORRECT        *SYNC*/
  1142.                                         /* AP_RESOURCE_FAILURE_NO_RETRY *SYNC*/
  1143.                                         /* AP_CONV_TYPE_MISMATCH        *SYNC*/
  1144.                                         /* AP_SYNC_LVL_NOT_SUPPORTED    *SYNC*/
  1145.                                         /* AP_SECURITY_PARAMS_INVALID   *SYNC*/
  1146.   unsigned short    log_dlen;
  1147.   unsigned char far *log_dptr;
  1148. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  1149.   void       (WINAPI *callback)();      /* present if opext&AP_EXTD_VCB *SYNC*/
  1150.   void             *correlator;         /* present if opext&AP_EXTD_VCB *SYNC*/
  1151.   unsigned char     reserv6[4];         /* present if opext&AP_EXTD_VCB *SYNC*/
  1152. #endif                                                                 /*SYNC*/
  1153. };
  1154.  
  1155.  
  1156. struct flush
  1157. {
  1158.   unsigned short    opcode;
  1159.   unsigned char     opext;
  1160.   unsigned char     reserv2;
  1161.   unsigned short    primary_rc;
  1162.   unsigned long     secondary_rc;
  1163.   unsigned char     tp_id[8];
  1164.   unsigned long     conv_id;
  1165. };
  1166.  
  1167.  
  1168. struct get_attributes
  1169. {
  1170.   unsigned short    opcode;
  1171.   unsigned char     opext;
  1172.   unsigned char     reserv2;
  1173.   unsigned short    primary_rc;
  1174.   unsigned long     secondary_rc;
  1175.   unsigned char     tp_id[8];
  1176.   unsigned long     conv_id;
  1177.   unsigned char     reserv3;
  1178.   unsigned char     sync_level;         /* AP_NONE                           */
  1179.                                         /* AP_CONFIRM_SYNC_LEVEL             */
  1180.                                         /* AP_SYNCPT                    *SYNC*/
  1181.   unsigned char     mode_name[8];
  1182.   unsigned char     net_name[8];
  1183.   unsigned char     lu_name[8];
  1184.   unsigned char     lu_alias[8];
  1185.   unsigned char     plu_alias[8];
  1186.   unsigned char     plu_un_name[8];
  1187.   unsigned char     reserv4[2];
  1188.   unsigned char     fqplu_name[17];
  1189.   unsigned char     reserv5;
  1190.   unsigned char     user_id[10];
  1191.   unsigned long     conv_group_id;      /* conversation group id        *ES10*/
  1192.   unsigned char     conv_corr_len;      /* conversation correlator lgth *ES10*/
  1193.   unsigned char     conv_corr[8];       /* conversation correlator      *ES10*/
  1194.   unsigned char     reserv6[13];
  1195. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  1196.   unsigned char     luw_id[26];          /* present if opext&AP_EXTD_VCB*SYNC*/
  1197.   unsigned char     sess_id[8];          /* present if opext&AP_EXTD_VCB*SYNC*/
  1198. #endif                                                                 /*SYNC*/
  1199. };
  1200.  
  1201.  
  1202. struct prepare_to_receive
  1203. {
  1204.   unsigned short    opcode;
  1205.   unsigned char     opext;
  1206.   unsigned char     reserv2;
  1207.   unsigned short    primary_rc;
  1208.   unsigned long     secondary_rc;
  1209.   unsigned char     tp_id[8];
  1210.   unsigned long     conv_id;
  1211.   unsigned char     ptr_type;           /* AP_SYNC_LEVEL                     */
  1212.                                         /* AP_FLUSH                          */
  1213.                                         /* AP_CONFIRM_TYPE              *SYNC*/
  1214.   unsigned char     locks;              /* AP_SHORT                          */
  1215.                                         /* AP_LONG                           */
  1216. };
  1217.  
  1218.  
  1219. struct receive_and_post
  1220. {
  1221.   unsigned short    opcode;
  1222.   unsigned char     opext;
  1223.   unsigned char     reserv2;
  1224.   unsigned short    primary_rc;
  1225.   unsigned long     secondary_rc;
  1226.   unsigned char     tp_id[8];
  1227.   unsigned long     conv_id;
  1228.   unsigned short    what_rcvd;          /* AP_NONE                           */
  1229.                                         /* AP_DATA                           */
  1230.                                         /* AP_DATA_COMPLETE                  */
  1231.                                         /* AP_DATA_INCOMPLETE                */
  1232.                                         /* AP_SEND                           */
  1233.                                         /* AP_CONFIRM_WHAT_RECEIVED          */
  1234.                                         /* AP_CONFIRM_SEND                   */
  1235.                                         /* AP_CONFIRM_DEALLOCATE             */
  1236.   unsigned char     rtn_status;         /* AP_NO                             */
  1237.                                         /* AP_YES                            */
  1238.   unsigned char     fill;               /* AP_BUFFER                         */
  1239.                                         /* AP_LL                             */
  1240.   unsigned char     rts_rcvd;           /* AP_NO                             */
  1241.                                         /* AP_YES                            */
  1242.   unsigned char     reserv4;
  1243.   unsigned short    max_len;
  1244.   unsigned short    dlen;
  1245.   unsigned char far *dptr;
  1246.   unsigned char far *sema;
  1247.   unsigned char     reserv5;
  1248. };
  1249.  
  1250.  
  1251. struct receive_and_wait
  1252. {
  1253.   unsigned short    opcode;
  1254.   unsigned char     opext;
  1255.   unsigned char     reserv2;
  1256.   unsigned short    primary_rc;
  1257.   unsigned long     secondary_rc;
  1258.   unsigned char     tp_id[8];
  1259.   unsigned long     conv_id;
  1260.   unsigned short    what_rcvd;          /* AP_NONE                           */
  1261.                                         /* AP_DATA                           */
  1262.                                         /* AP_DATA_COMPLETE                  */
  1263.                                         /* AP_DATA_INCOMPLETE                */
  1264.                                         /* AP_SEND                           */
  1265.                                         /* AP_CONFIRM_WHAT_RECEIVED          */
  1266.                                         /* AP_CONFIRM_SEND                   */
  1267.                                         /* AP_CONFIRM_DEALLOCATE             */
  1268.   unsigned char     rtn_status;         /* AP_NO                             */
  1269.                                         /* AP_YES                            */
  1270.   unsigned char     fill;               /* AP_BUFFER                         */
  1271.                                         /* AP_LL                             */
  1272.   unsigned char     rts_rcvd;           /* AP_NO                             */
  1273.                                         /* AP_YES                            */
  1274.   unsigned char     reserv4;
  1275.   unsigned short    max_len;
  1276.   unsigned short    dlen;
  1277.   unsigned char far *dptr;
  1278.   unsigned char     reserv5[5];
  1279. };
  1280.  
  1281.  
  1282. struct receive_immediate
  1283. {
  1284.   unsigned short    opcode;
  1285.   unsigned char     opext;
  1286.   unsigned char     reserv2;
  1287.   unsigned short    primary_rc;
  1288.   unsigned long     secondary_rc;
  1289.   unsigned char     tp_id[8];
  1290.   unsigned long     conv_id;
  1291.   unsigned short    what_rcvd;          /* AP_NONE                           */
  1292.                                         /* AP_DATA                           */
  1293.                                         /* AP_DATA_COMPLETE                  */
  1294.                                         /* AP_DATA_INCOMPLETE                */
  1295.                                         /* AP_SEND                           */
  1296.                                         /* AP_CONFIRM_WHAT_RECEIVED          */
  1297.                                         /* AP_CONFIRM_SEND                   */
  1298.                                         /* AP_CONFIRM_DEALLOCATE             */
  1299.   unsigned char     rtn_status;         /* AP_NO                             */
  1300.                                         /* AP_YES                            */
  1301.   unsigned char     fill;               /* AP_BUFFER                         */
  1302.                                         /* AP_LL                             */
  1303.   unsigned char     rts_rcvd;           /* AP_NO                             */
  1304.                                         /* AP_YES                            */
  1305.   unsigned char     reserv4;
  1306.   unsigned short    max_len;
  1307.   unsigned short    dlen;
  1308.   unsigned char far *dptr;
  1309.   unsigned char     reserv5[5];
  1310. };
  1311.  
  1312.  
  1313. struct request_to_send
  1314. {
  1315.   unsigned short    opcode;
  1316.   unsigned char     opext;
  1317.   unsigned char     reserv2;
  1318.   unsigned short    primary_rc;
  1319.   unsigned long     secondary_rc;
  1320.   unsigned char     tp_id[8];
  1321.   unsigned long     conv_id;
  1322. };
  1323.  
  1324.  
  1325. struct send_conversation                                               /*ES10*/
  1326. {                                                                      /*ES10*/
  1327.   unsigned short    opcode;                                            /*ES10*/
  1328.   unsigned char     opext;                                             /*ES10*/
  1329.   unsigned char     reserv2;                                           /*ES10*/
  1330.   unsigned short    primary_rc;                                        /*ES10*/
  1331.   unsigned long     secondary_rc;                                      /*ES10*/
  1332.   unsigned char     tp_id[8];                                          /*ES10*/
  1333.   unsigned char     reserv3[8];                                        /*ES10*/
  1334.   unsigned char     rtn_ctl;            /* AP_WHEN_SESSION_ALLOCATED    *ES10*/
  1335.                                         /* AP_IMMEDIATE                 *ES10*/
  1336.                                         /* AP_WHEN_SESSION_FREE         *ES10*/
  1337.                                         /* AP_WHEN_CONWINNER_ALLOCATED  *ES10*/
  1338.                                         /* AP_WHEN_CONV_GROUP_ALLOCATED *ES10*/
  1339.   unsigned char     reserv4;                                           /*ES10*/
  1340.   unsigned long     conv_group_id;      /* conversation group id        *ES10*/
  1341.   unsigned long     sense_data;         /* allocation failure sense data*ES10*/
  1342.   unsigned char     plu_alias[8];                                      /*ES10*/
  1343.   unsigned char     mode_name[8];                                      /*ES10*/
  1344.   unsigned char     tp_name[64];                                       /*ES10*/
  1345.   unsigned char     security;           /* AP_NONE                      *ES10*/
  1346.                                         /* AP_SAME                      *ES10*/
  1347.                                         /* AP_PGM                       *ES10*/
  1348.   unsigned char     reserv5[11];                                       /*ES10*/
  1349.   unsigned char     pwd[10];                                           /*ES10*/
  1350.   unsigned char     user_id[10];                                       /*ES10*/
  1351.   unsigned short    pip_dlen;                                          /*ES10*/
  1352.   unsigned char far *pip_dptr;                                         /*ES10*/
  1353.   unsigned char     reserv6;                                           /*ES10*/
  1354.   unsigned char     fqplu_name[17];                                    /*ES10*/
  1355.   unsigned char     reserv7[8];                                        /*ES10*/
  1356.   unsigned short    dlen;                                              /*ES10*/
  1357.   unsigned char far *dptr;                                             /*ES10*/
  1358. };                                                                     /*ES10*/
  1359.  
  1360.  
  1361. struct send_data
  1362. {
  1363.   unsigned short    opcode;
  1364.   unsigned char     opext;
  1365.   unsigned char     reserv2;
  1366.   unsigned short    primary_rc;
  1367.   unsigned long     secondary_rc;
  1368.   unsigned char     tp_id[8];
  1369.   unsigned long     conv_id;
  1370.   unsigned char     rts_rcvd;           /* AP_NO                             */
  1371.                                         /* AP_YES                            */
  1372. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  1373.   unsigned char     data_type;           /* type of data to be sent     *SYNC*/
  1374.                                          /* AP_APPLICATION              *SYNC*/
  1375.                                          /* AP_USER_CONTROL_DATA        *SYNC*/
  1376.                                          /* AP_PS_HEADER                *SYNC*/
  1377. #else                                                                  /*SYNC*/
  1378.   unsigned char     reserv3;
  1379. #endif                                                                 /*SYNC*/
  1380.   unsigned short    dlen;
  1381.   unsigned char far *dptr;
  1382.   unsigned char type;                   /* AP_SEND_DATA_FLUSH                */
  1383.                                         /* AP_SEND_DATA_CONFIRM              */
  1384.                                         /* AP_SEND_DATA_P_TO_R_FLUSH         */
  1385.                                         /* AP_SEND_DATA_P_TO_R_SYNC_LEVEL    */
  1386.                                         /* AP_SEND_DATA_P_TO_R_CONFIRM  *SYNC*/
  1387.                                         /* AP_SEND_DATA_DEALLOC_FLUSH        */
  1388.                                         /* AP_SEND_DATA_DEALLOC_SYNC_LEVEL   */
  1389.                                         /* AP_SEND_DATA_DEALLOC_CONFIRM *SYNC*/
  1390.                                         /* AP_SEND_DATA_DEALLOC_ABEND        */
  1391.   unsigned char     reserv4;
  1392. };
  1393.  
  1394.  
  1395. struct send_error
  1396. {
  1397.   unsigned short    opcode;
  1398.   unsigned char     opext;
  1399.   unsigned char     reserv2;
  1400.   unsigned short    primary_rc;
  1401.   unsigned long     secondary_rc;
  1402.   unsigned char     tp_id[8];
  1403.   unsigned long     conv_id;
  1404.   unsigned char     rts_rcvd;           /* AP_NO                             */
  1405.                                         /* AP_YES                            */
  1406.   unsigned char     err_type;           /* AP_PROG                           */
  1407.                                         /* AP_SVC                            */
  1408.                                         /* AP_BACKOUT_NO_RESYNC         *SYNC*/
  1409.                                         /* AP_BACKOUT_RESYNC            *SYNC*/
  1410.   unsigned char     err_dir;            /* AP_RCV_DIR_ERROR                  */
  1411.                                         /* AP_SEND_DIR_ERROR                 */
  1412.   unsigned char     reserv3;
  1413.   unsigned short    log_dlen;
  1414.   unsigned char far *log_dptr;
  1415. };
  1416.  
  1417.  
  1418. struct test_rts
  1419. {
  1420.   unsigned short    opcode;
  1421.   unsigned char     opext;
  1422.   unsigned char     reserv2;
  1423.   unsigned short    primary_rc;
  1424.   unsigned long     secondary_rc;
  1425.   unsigned char     tp_id[8];
  1426.   unsigned long     conv_id;
  1427.   unsigned char     reserv3;
  1428. };
  1429.  
  1430. struct test_rts_and_post                                               /*RPRP*/
  1431. {                                                                      /*RPRP*/
  1432.   unsigned short    opcode;                                            /*RPRP*/
  1433.   unsigned char     opext;                                             /*RPRP*/
  1434.   unsigned char     reserv2;                                           /*RPRP*/
  1435.   unsigned short    primary_rc;                                        /*RPRP*/
  1436.   unsigned long     secondary_rc;                                      /*RPRP*/
  1437.   unsigned char     tp_id[8];                                          /*RPRP*/
  1438.   unsigned long     conv_id;                                           /*RPRP*/
  1439.   unsigned char     reserv3;                                           /*RPRP*/
  1440.   unsigned long     handle;                                            /*RPRP*/
  1441. };                                                                     /*RPRP*/
  1442.  
  1443. #ifdef WIN32                                                           /*APOR*/
  1444. struct post_on_receipt                                                 /*APOR*/
  1445. {                                                                      /*APOR*/
  1446.   unsigned short        opcode;                                        /*APOR*/
  1447.   unsigned char         opext;                                         /*APOR*/
  1448.   unsigned char         reserv1;                                       /*APOR*/
  1449.   unsigned short        primary_rc;                                    /*APOR*/
  1450.   unsigned long         secondary_rc;                                  /*APOR*/
  1451.   unsigned char         tp_id[8];                                      /*APOR*/
  1452.   unsigned long         conv_id;                                       /*APOR*/
  1453.   unsigned short        reserv2;                                       /*APOR*/
  1454.   unsigned char         fill;                                          /*APOR*/
  1455.   unsigned char         reserv4;                                       /*APOR*/
  1456.   unsigned short        max_len;                                       /*APOR*/
  1457.   unsigned short        reserv5;                                       /*APOR*/
  1458.   unsigned char far *   reserv6;                                       /*APOR*/
  1459.   unsigned char         reserv7[5];                                    /*APOR*/
  1460.   unsigned long         sema;                                          /*APOR*/
  1461. };                                                                     /*APOR*/
  1462. #endif                                                                 /*APOR*/
  1463.  
  1464. struct receive_log_data                                                /*RELD*/
  1465. {                                                                      /*RELD*/
  1466.   unsigned short        opcode;                                        /*RELD*/
  1467.   unsigned char         opext;                                         /*RELD*/
  1468.   unsigned char         reserv1;                                       /*RELD*/
  1469.   unsigned short        primary_rc;                                    /*RELD*/
  1470.   unsigned long         secondary_rc;                                  /*RELD*/
  1471.   unsigned char         tp_id[8];                                      /*RELD*/
  1472.   unsigned long         conv_id;                                       /*RELD*/
  1473.   unsigned short        log_dlen;                                      /*RELD*/
  1474.   unsigned char far *   log_dptr;                                      /*RELD*/
  1475. };                                                                     /*RELD*/
  1476.  
  1477.  
  1478. /*****************************************************************************/
  1479. /* type independent vcbs                                                     */
  1480. /*****************************************************************************/
  1481. typedef struct luw_id_overlay                                          /*ES10*/
  1482. {                                                                      /*ES10*/
  1483.   unsigned char     fqlu_name_len;                                     /*ES10*/
  1484.   unsigned char     fqlu_name[17];                                     /*ES10*/
  1485.   unsigned char     instance[6];                                       /*ES10*/
  1486.   unsigned char     sequence[2];                                       /*ES10*/
  1487. } LUW_ID_OVERLAY;                                                      /*ES10*/
  1488.                                                                        /*ES10*/
  1489. struct get_tp_properties                                               /*ES10*/
  1490. {                                                                      /*ES10*/
  1491.   unsigned short    opcode;                                            /*ES10*/
  1492. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  1493.   unsigned char     opext;                                             /*SYNC*/
  1494.   unsigned char     reserv2;                                           /*SYNC*/
  1495. #else                                                                  /*SYNC*/
  1496.   unsigned char     reserv2[2];                                        /*ES10*/
  1497. #endif                                                                 /*SYNC*/
  1498.   unsigned short    primary_rc;                                        /*ES10*/
  1499.   unsigned long     secondary_rc;                                      /*ES10*/
  1500.   unsigned char     tp_id[8];                                          /*ES10*/
  1501.   unsigned char     tp_name[64];                                       /*ES10*/
  1502.   unsigned char     lu_alias[8];                                       /*ES10*/
  1503.   unsigned char     luw_id[26];         /* Logical Unit of Work id      *ES10*/
  1504.   unsigned char     fqlu_name[17];      /* fully qualified LU name      *ES10*/
  1505.   unsigned char     reserv3[10];                                       /*ES10*/
  1506.   unsigned char     user_id[10];                                       /*ES10*/
  1507. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  1508.   unsigned char     prot_luw_id[26];    /* present if opext & AP_EXTD   *SYNC*/
  1509. #endif                                                                 /*SYNC*/
  1510. };                                                                     /*ES10*/
  1511.  
  1512. #ifdef SYNCPT_SUPPORT                                                  /*SYNC*/
  1513. struct set_tp_properties                                               /*SYNC*/
  1514. {                                                                      /*SYNC*/
  1515.   unsigned short    opcode;                                            /*SYNC*/
  1516.   unsigned char     opext;                                             /*SYNC*/
  1517.   unsigned char     reserv2;                                           /*SYNC*/
  1518.   unsigned short    primary_rc;                                        /*SYNC*/
  1519.   unsigned long     secondary_rc;                                      /*SYNC*/
  1520.   unsigned char     tp_id[8];                                          /*SYNC*/
  1521.   unsigned char     set_prot_id;        /* AP_NO                        *SYNC*/
  1522.                                         /* AP_YES                       *SYNC*/
  1523.   unsigned char     new_prot_id;        /* AP_NO                        *SYNC*/
  1524.                                         /* AP_YES                       *SYNC*/
  1525.   unsigned char     prot_id[26];                                       /*SYNC*/
  1526.   unsigned char     set_unprot_id;      /* AP_NO                        *SYNC*/
  1527.                                         /* AP_YES                       *SYNC*/
  1528.   unsigned char     new_unprot_id;      /* AP_NO                        *SYNC*/
  1529.                                         /* AP_YES                       *SYNC*/
  1530.   unsigned char     unprot_id[26];                                     /*SYNC*/
  1531.   unsigned char     set_user_id;        /* AP_NO                        *SYNC*/
  1532.                                         /* AP_YES                       *SYNC*/
  1533.   unsigned char     reserv3;                                           /*SYNC*/
  1534.   unsigned char     user_id[10];                                       /*SYNC*/
  1535.   unsigned char     reserv4[10];                                       /*SYNC*/
  1536. };                                                                     /*SYNC*/
  1537.                                                                        /*SYNC*/
  1538. struct get_lu_status                                                   /*SYNC*/
  1539. {                                                                      /*SYNC*/
  1540.   unsigned short    opcode;                                            /*SYNC*/
  1541.   unsigned char     opext;                                             /*SYNC*/
  1542.   unsigned char     reserv2;                                           /*SYNC*/
  1543.   unsigned short    primary_rc;                                        /*SYNC*/
  1544.   unsigned long     secondary_rc;                                      /*SYNC*/
  1545.   unsigned char     tp_id[8];                                          /*SYNC*/
  1546.   unsigned char     plu_alias[8];                                      /*SYNC*/
  1547.   unsigned short    active_sess;                                       /*SYNC*/
  1548.   unsigned char     zero_sess;          /* AP_NO                        *SYNC*/
  1549.                                         /* AP_YES                       *SYNC*/
  1550.   unsigned char     reserv3[7];                                        /*SYNC*/
  1551. };                                                                     /*SYNC*/
  1552. #endif                                                                 /*SYNC*/
  1553.  
  1554. struct get_type
  1555. {
  1556.   unsigned short    opcode;
  1557.   unsigned char     opext;
  1558.   unsigned char     reserv2;
  1559.   unsigned short    primary_rc;
  1560.   unsigned long     secondary_rc;
  1561.   unsigned char     tp_id[8];
  1562.   unsigned long     conv_id;
  1563.   unsigned char     conv_type;          /* AP_BASIC_CONVERSATION             */
  1564.                                         /* AP_MAPPED_CONVERSATION            */
  1565. };
  1566.  
  1567.  
  1568. struct get_state
  1569. {
  1570.   unsigned short    opcode;
  1571.   unsigned char     opext;
  1572.   unsigned char     reserv2;
  1573.   unsigned short    primary_rc;
  1574.   unsigned long     secondary_rc;
  1575.   unsigned char     tp_id[8];
  1576.   unsigned long     conv_id;
  1577.   unsigned char     conv_state;                             /* AP_RESET etc. */
  1578. };
  1579.  
  1580.  
  1581.  
  1582. /************************************************************************IBM1*/
  1583. /* Add typedefs for OS/2 ES compatability.                              *IBM1*/
  1584. /************************************************************************IBM1*/
  1585. typedef struct tp_started            TP_STARTED;
  1586. typedef struct receive_allocate      RECEIVE_ALLOCATE;
  1587. typedef struct tp_ended              TP_ENDED;
  1588. typedef struct mc_allocate           MC_ALLOCATE;
  1589. typedef struct mc_confirm            MC_CONFIRM;
  1590. typedef struct mc_confirmed          MC_CONFIRMED;
  1591. typedef struct mc_deallocate         MC_DEALLOCATE;
  1592. typedef struct mc_flush              MC_FLUSH;
  1593. typedef struct mc_get_attributes     MC_GET_ATTRIBUTES;
  1594. typedef struct mc_prepare_to_receive MC_PREPARE_TO_RECEIVE;
  1595. typedef struct mc_receive_and_post   MC_RECEIVE_AND_POST;
  1596. typedef struct mc_receive_and_wait   MC_RECEIVE_AND_WAIT;
  1597. typedef struct mc_receive_immediate  MC_RECEIVE_IMMEDIATE;
  1598. typedef struct mc_request_to_send    MC_REQUEST_TO_SEND;
  1599. typedef struct mc_send_conversation  MC_SEND_CONVERSATION;
  1600. typedef struct mc_send_data          MC_SEND_DATA;
  1601. typedef struct mc_send_error         MC_SEND_ERROR;
  1602. typedef struct mc_test_rts           MC_TEST_RTS;
  1603. typedef struct mc_test_rts_and_post  MC_TEST_RTS_AND_POST;             /*RPRP*/
  1604. #ifdef WIN32                                                           /*APOR*/
  1605. typedef struct mc_post_on_receipt    MC_POST_ON_RECEIPT;               /*APOR*/
  1606. #endif                                                                 /*APOR*/
  1607. typedef struct mc_receive_log_data   MC_RECEIVE_LOG_DATA;              /*RELD*/
  1608. typedef struct allocate              ALLOCATE;
  1609. typedef struct confirm               CONFIRM;
  1610. typedef struct confirmed             CONFIRMED;
  1611. typedef struct deallocate            DEALLOCATE;
  1612. typedef struct flush                 FLUSH;
  1613. typedef struct get_attributes        GET_ATTRIBUTES;
  1614. typedef struct prepare_to_receive    PREPARE_TO_RECEIVE;
  1615. typedef struct receive_and_post      RECEIVE_AND_POST;
  1616. typedef struct receive_and_wait      RECEIVE_AND_WAIT;
  1617. typedef struct receive_immediate     RECEIVE_IMMEDIATE;
  1618. typedef struct request_to_send       REQUEST_TO_SEND;
  1619. typedef struct send_conversation     SEND_CONVERSATION;
  1620. typedef struct send_data             SEND_DATA;
  1621. typedef struct send_error            SEND_ERROR;
  1622. typedef struct test_rts              TEST_RTS;
  1623. typedef struct test_rts_and_post     TEST_RTS_AND_POST;                /*RPRP*/
  1624. #ifdef WIN32                                                           /*APOR*/
  1625. typedef struct post_on_receipt       POST_ON_RECEIPT;                  /*APOR*/
  1626. #endif                                                                 /*APOR*/
  1627. typedef struct receive_log_data      RECEIVE_LOG_DATA;                 /*RELD*/
  1628. typedef struct get_tp_properties     GET_TP_PROPERTIES;
  1629. typedef struct get_type              GET_TYPE;
  1630.  
  1631. /* ========================================================================= */
  1632. /*****************************************************************************/
  1633. /* ---------------------- APPC function prototypes ------------------------- */
  1634. /*****************************************************************************/
  1635.  
  1636. #ifdef WIN32                                                            /*W32*/
  1637.  #ifndef WINSNA                                                       /*WSNA2*/
  1638.   extern void pascal APPC(long);                                        /*W32*/
  1639.  #endif                                                               /*WSNA2*/
  1640. extern void pascal APPC_P(long);                                        /*W32*/
  1641. extern void pascal APPC_C(long);                                        /*W32*/
  1642. #else                                                                   /*W32*/
  1643.  #ifndef WINSNA                                                       /*WSNA2*/
  1644.   extern void pascal far _loadds APPC(long);                           /*1.1X*/
  1645.  #endif                                                               /*WSNA2*/
  1646. extern void pascal far _loadds APPC_P(long);                           /*1.1P*/
  1647. extern void pascal far _loadds APPC_C(long);
  1648. #endif                                                                  /*W32*/
  1649.  
  1650.  
  1651. /*****************************************************************************/
  1652. /* WinSNA function prototypes                                          *WSNA2*/
  1653. /*****************************************************************************/
  1654. #ifdef WINSNA
  1655.  
  1656.  
  1657. /*---------------------------------------------------------------------------*/
  1658. /* Windows APPC Extension Return Codes.                                              */
  1659. /*---------------------------------------------------------------------------*/
  1660.  
  1661. #define WAPPCALREADY         0xF000   /* An async call is already outstanding */
  1662. #define WAPPCINVALID         0xF001   /* Async Task Id is invalid             */
  1663. #define WAPPCCANCEL          0xF002   /* Blocking call was cancelled          */
  1664. #define WAPPCSYSNOTREADY     0xF003   /* Underlying subsystem not started     */
  1665. #define WAPPCVERNOTSUPPORTED 0xF004   /* Application version not supported    */
  1666.  
  1667.  
  1668. /*----------------------------------------------------------------------------*/
  1669. /* Api structre definitions                                                   */
  1670. /*----------------------------------------------------------------------------*/
  1671. #define WAPPCDESCRIPTION_LEN    127
  1672.  
  1673. typedef struct tagWAPPCDATA
  1674. {
  1675.   WORD    wVersion;
  1676.   char    szDescription[WAPPCDESCRIPTION_LEN+1];
  1677. } WAPPCDATA, * PWAPPCDATA, FAR * LPWAPPCDATA;
  1678.  
  1679.  
  1680.  extern void    WINAPI APPC(long);
  1681.  extern HANDLE  WINAPI WinAsyncAPPC( HWND, long);
  1682.  extern HANDLE  WINAPI WinAsyncAPPCEx( HANDLE, long);                  /*EVNT*/
  1683.  extern BOOL    WINAPI WinAPPCCleanup(void);
  1684.  extern BOOL    WINAPI WinAPPCIsBlocking(void);
  1685.  extern int     WINAPI WinAPPCCancelAsyncRequest( HANDLE );
  1686.  extern BOOL    WINAPI WinAPPCCancelBlockingCall(void);
  1687.  extern int     WINAPI WinAPPCStartup(WORD, LPWAPPCDATA);
  1688.  extern FARPROC WINAPI WinAPPCSetBlockingHook(FARPROC);
  1689.  extern BOOL    WINAPI WinAPPCUnhookBlockingHook(void);
  1690.  extern int     WINAPI GetAppcReturnCode (struct appc_hdr FAR * vpb,   /*GRC */
  1691.                                           UINT        buffer_length,
  1692.                                           unsigned char FAR * buffer_addr);
  1693.  
  1694.  #define WIN_APPC_ASYNC_COMPLETE_MESSAGE "WinAsyncAPPC"
  1695.  
  1696.  
  1697. #endif
  1698.  
  1699.  
  1700. /*************************************************************************W32*/
  1701. /* for Win32 environment, restore original packing mode                  *W32*/
  1702. /*************************************************************************W32*/
  1703. #ifdef WIN32                                                            /*W32*/
  1704.                                                                         /*W32*/
  1705. #pragma pack()                                                          /*W32*/
  1706.                                                                         /*W32*/
  1707. #endif                                                                  /*W32*/
  1708.  
  1709. #ifdef __cplusplus
  1710. }
  1711. #endif
  1712.  
  1713. /*****************************************************************************/
  1714. /* End ifndef APPC_C_INCLUDED *DSP2*                                         */
  1715. /*****************************************************************************/
  1716. #pragma option pop /*P_O_Pop*/
  1717. #endif
  1718.  
  1719. /* winappc.h */
  1720.