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