home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pc3270sa.zip / whllapi.h < prev    next >
C/C++ Source or Header  |  2002-02-28  |  41KB  |  753 lines

  1. /*****************************************************************************/
  2. /*                                                                           */
  3. /*  Module Name     : WHLLAPI.H                                              */
  4. /*                                                                           */
  5. /*  Description     : WinHLLAPI Structure, Return Codes and Routines         */
  6. /*                                                                           */
  7. /*  Copyright Notice: IBM Personal Communication/3270 Version 4.3            */
  8. /*                    (C) COPYRIGHT IBM CORP. 1989,1995 - PROGRAM PROPERTY   */
  9. /*                    OF IBM ALL RIGHTS RESERVED                             */
  10. /*                                                                           */
  11. /*---------------------------------------------------------------------------*/
  12. /*  Function:                                                                */
  13. /*                                                                           */
  14. /*    Define the WinHLLAPI structure, return code constants and              */
  15. /*    the external routines for WinHLLAPI.                                   */
  16. /*                                                                           */
  17. /*****************************************************************************/
  18. #ifndef WHLLAPI_HEAD
  19. #define WHLLAPI_HEAD
  20.  
  21. #ifdef __cplusplus
  22.   extern "C" {
  23. #endif
  24.  
  25. #define WHLLDESCRIPTION_LEN            127
  26.  
  27. typedef struct tagWHLLAPIDATA
  28. {
  29.     WORD    wVersion;
  30.     char    szDescription[WHLLDESCRIPTION_LEN + 1];
  31. } WHLLAPIDATA, * PWHLLAPIDATA, FAR * LPWHLLAPIDATA;
  32.  
  33. /*************************************************************************/
  34. /******************** WinHLLAPI FUNCTION PROTOTYPES **********************/
  35. /*************************************************************************/
  36. extern void far pascal     WinHLLAPI(LPWORD , LPBYTE , LPWORD , LPWORD );
  37. extern HANDLE far pascal   WinHLLAPIAsync(HWND, LPWORD, LPBYTE, LPWORD, LPWORD);
  38. extern HANDLE far pascal   WinAsyncHLLAPI(HWND, LPWORD, LPBYTE, LPWORD, LPWORD);
  39. extern BOOL far pascal     WinHLLAPICancelAsyncRequest(WORD, WORD);
  40. extern int far pascal      WinHLLAPICancelBlockingCall(void);
  41. extern int far pascal      WinHLLAPICleanup(void);
  42. extern BOOL far pascal     WinHLLAPIIsBlocking(void);
  43. extern FARPROC far pascal  WinHLLAPISetBlockingHook(FARPROC);
  44. extern int far pascal      WinHLLAPIStartup(WORD, LPWHLLAPIDATA);
  45. extern BOOL far pascal     WinHLLAPIUnhookBlockingHook(void);
  46.  
  47. /*************************************************************************/
  48. /******************* WinHLLAPI STRUCTURE DEFINITIONS *********************/
  49. /*************************************************************************/
  50. /*********************************************************************/
  51. /*                     Connect for Presentation Services (1)         */
  52. /*********************************************************************/
  53.  
  54. struct HLDConnectPS                     /* 000 Connect For           */
  55.                                         /* Presentation              */
  56.                                         /* Services structure        */
  57. {
  58.   unsigned char stps_shortname;         /* 000 Session Shortname     */
  59. }
  60. ;                                       /* 000                       */
  61.  
  62. /*********************************************************************/
  63. /*                     Query Sessions (10)                           */
  64. /*********************************************************************/
  65.  
  66. struct HLDQuerySessions                 /* 000 Query Sessions        */
  67.                                         /* structure                 */
  68. {
  69.   unsigned char qses_shortname;         /* 000 Session Shortname     */
  70.   unsigned char qses_longname[8];       /* 000 Session Longname      */
  71.   unsigned char qses_sestype;           /* 000 Session Type          */
  72.   unsigned short int qses_pssize;       /* 000 Presentation Space    */
  73.                                         /* Size.                     */
  74. }
  75. ;                                       /* 000                       */
  76.  
  77. /*********************************************************************/
  78. /*                         Copy OIA (13)                             */
  79. /*********************************************************************/
  80.  
  81. struct HLDCopyOIA                       /* 000 Copy OIA structure    */
  82. {
  83.   unsigned char coia_format;            /* 000 The OIA Format        */
  84.                                         /* Byte for the 3270 PC.     */
  85.  
  86.   unsigned char coia_image[80];         /* 000 The OIA image         */
  87.  
  88.   unsigned char coia_group[22];         /* 000 The OIA group         */
  89. }
  90. ;                                       /* 000                       */
  91.  
  92. /*********************************************************************/
  93. /*                     Storage Manager (17)                          */
  94. /*********************************************************************/
  95.  
  96. struct HLDStorageMgr                    /* 000 Storage Manager       */
  97.                                         /* structure.                */
  98. {
  99.   unsigned char far * stor_ptr;         /* 000 4 byte pointer to     */
  100.                                         /* memory.                   */
  101. }
  102. ;                                       /* 000                       */
  103.  
  104. /*********************************************************************/
  105. /*                     Pause (18)                                    */
  106. /*********************************************************************/
  107.  
  108. struct HLDPause                         /* 000 Pause                 */
  109.                                         /* structure.                */
  110. {
  111.   unsigned char paus_shortname;         /* 000 Session Shortname     */
  112.   unsigned char paus_singleses;         /* 000 Single session        */
  113.                                         /* indicater                 */
  114. }
  115. ;                                       /* 000                       */
  116.  
  117. /*********************************************************************/
  118. /*                     Query System (20)                             */
  119. /*********************************************************************/
  120.  
  121. struct HLDQuerySystem                   /* 000 Query System          */
  122.                                         /* structure                 */
  123. {
  124.   unsigned char qsys_hllapi_ver;        /* 000 Ehllapi version       */
  125.   unsigned char qsys_hllapi_lvl[2];     /* 000 Ehllapi level         */
  126.   unsigned char qsys_hllapi_date[6];    /* 000 Ehllapi release       */
  127.                                         /* date                      */
  128.   unsigned char qsys_lim_ver;           /* 000 LIM version           */
  129.   unsigned char qsys_lim_lvl[2];        /* 000 LIM level             */
  130.   unsigned char qsys_hardware_base;     /* 000 Hardware base         */
  131.   unsigned char qsys_ctrl_prog_type;    /* 000 Control program       */
  132.                                         /* type                      */
  133.   unsigned char qsys_seq_num[2];        /* 000 Sequence number       */
  134.   unsigned char qsys_ctrl_prog_ver[2];  /* 000 Control program       */
  135.                                         /* version                   */
  136.   unsigned char qsys_pc_sname;          /* 000 Base pc session       */
  137.                                         /* name                      */
  138.   unsigned char qsys_err1[4];           /* 000 System error words    */
  139.                                         /* and 2                     */
  140.   unsigned char qsys_err2[4];           /* 000 System error words    */
  141.                                         /* and 4                     */
  142.   unsigned char qsys_sys_model;         /* 000 System model          */
  143.   unsigned char qsys_sys_submodel;      /* 000 System submodel       */
  144.   unsigned short qsys_pc_nls;           /* 000 Pc code page          */
  145.   unsigned char qsys_monitor_type;      /* 000 Monitor type          */
  146.   unsigned char qsys_reserved[3];       /* 000 RESERVED              */
  147. }
  148. ;                                       /* 000                       */
  149.  
  150. /*********************************************************************/
  151. /*                     Query Session Status (22)                     */
  152. /*********************************************************************/
  153.  
  154. struct HLDQuerySessionStatus            /* 000 Query Session         */
  155.                                         /* Status structure          */
  156. {
  157.   unsigned char qsst_shortname;         /* 000 Session shortname     */
  158.   unsigned char qsst_longname[8];       /* 000 Session longname      */
  159.   unsigned char qsst_sestype;           /* 000 Session type          */
  160.   unsigned char qsst_char;              /* 000 Session               */
  161.                                         /* characteristics           */
  162.   unsigned short int qsst_ps_rows;      /* 000 Number of rows in     */
  163.                                         /* presentation space        */
  164.   unsigned short int qsst_ps_cols;      /* 000 Number of columns     */
  165.                                         /* in presentation space     */
  166.   unsigned short int qsst_host_nls;     /* 000 Host code page        */
  167.   unsigned char qsst_reserv18;          /* 000 Reserved byte         */
  168. }
  169. ;                                       /* 000                       */
  170.  
  171. /*********************************************************************/
  172. /*                     Start Host Notification (23)                  */
  173. /*********************************************************************/
  174.  
  175. struct HLDStartHostNotify               /* 000 Start Host            */
  176.                                         /* Notification              */
  177.                                         /* structure.                */
  178. {
  179.   unsigned char sthn_shortname;         /* 000 Session Shortname     */
  180.   unsigned char sthn_event_opt;         /* 000 Update event          */
  181.                                         /* option                    */
  182.   unsigned char sthn_reserved[4];       /* Reserved                  */
  183.   unsigned char sthn_aevent_opt;        /* 000 Async update event    */
  184.                                         /* option                    */
  185. }
  186. ;                                       /* 000                       */
  187.  
  188. /*********************************************************************/
  189. /*                     Query Host Update (24)                        */
  190. /*********************************************************************/
  191.  
  192. struct HLDQueryHostUpdate               /* 000 Query Host Update     */
  193.                                         /* structure                 */
  194. {
  195.   unsigned char qyhn_shortname;         /* 000 Session Shortname     */
  196. }
  197. ;                                       /* 000                       */
  198.  
  199. /*********************************************************************/
  200. /*                     Stop Host Notification (25)                   */
  201. /*********************************************************************/
  202.  
  203. struct HLDStopHostNotify                /* 000 Stop Host Notification*/
  204.                                         /* structure                 */
  205. {
  206.   unsigned char sphn_shortname;         /* 000 Session Shortname     */
  207. }
  208. ;                                       /* 000                       */
  209.  
  210. /*********************************************************************/
  211. /*                     Start Close Click Intercept (41)              */
  212. /*********************************************************************/
  213.  
  214. struct HLDStartCloseIntercept           /* 000 Start Close Click     */
  215.                                         /* Intercept structure       */
  216. {
  217.   unsigned char stci_shortname;         /* 000 Session Shortname     */
  218.   HWND          stci_hwnd;              /* Window Handle for async   */
  219.                                         /* request.                  */
  220.   unsigned char stci_reserved[2];       /* Reserved                  */
  221.   unsigned char stci_close_opt;         /* type of notification      */
  222. }
  223. ;                                       /* 000                       */
  224.  
  225. /*********************************************************************/
  226. /*                     Query Close Click Intercept (42)              */
  227. /*********************************************************************/
  228.  
  229. struct HLDQueryCloseIntercept           /* 000 Query Close Click     */
  230.                                         /* Intercept structure       */
  231. {
  232.   unsigned char qyci_shortname;         /* 000 Session Shortname     */
  233. }
  234. ;                                       /* 000                       */
  235.  
  236. /*********************************************************************/
  237. /*                     Stop  Close Click Intercept (43)              */
  238. /*********************************************************************/
  239.  
  240. struct HLDStopCloseIntercept            /* 000 Stop Close Click      */
  241.                                         /* Intercept structure       */
  242. {
  243.   unsigned char spci_shortname;         /* 000 Session Shortname     */
  244. }
  245. ;                                       /* 000                       */
  246.  
  247. /*********************************************************************/
  248. /*                     Start Keystroke Intercept (50)                */
  249. /*********************************************************************/
  250.  
  251. struct HLDStartKeyIntercept             /* 000 Start Keystroke       */
  252.                                         /* Intercept structure       */
  253. {
  254.   unsigned char stki_shortname;         /* 000 Session Shortname     */
  255.   unsigned char stki_keytyp_opt;        /* 000 Type of keys to       */
  256.                                         /* intercept                 */
  257.   HWND          stki_hwnd;              /* Window Handle for async   */
  258.                                         /* request.                  */
  259.   unsigned char stki_reserved[2];       /* Reserved                  */
  260.   unsigned char stki_akeytyp_opt;       /* 000 async type of keys to */
  261.                                         /* intercept                 */
  262. }
  263. ;                                       /* 000                       */
  264.  
  265. /*********************************************************************/
  266. /*                     Get Key (51)                                  */
  267. /*********************************************************************/
  268.  
  269. struct HLDGetKey                        /* 000 Get Key structure.    */
  270. {
  271.   unsigned char gkey_shortname;         /* 000 Session Shortname     */
  272.   unsigned char gkey_keytype;           /* 000 Type of key           */
  273.                                         /* intercepted               */
  274.   unsigned char gkey_key[6];            /* 000 Ascii or ascii        */
  275.                                         /* mnemonic                  */
  276. }
  277. ;                                       /* 000                       */
  278.  
  279. /*********************************************************************/
  280. /*                     Post Intercept Status (52)                    */
  281. /*********************************************************************/
  282.  
  283. struct HLDPostInterceptStatus           /* 000 Post Intercept        */
  284.                                         /* Status structure          */
  285. {
  286.   unsigned char pist_shortname;         /* 000 Session Shortname     */
  287.   unsigned char pist_post_opt;          /* 000 Key accepted or       */
  288.                                         /* rejected                  */
  289. }
  290. ;                                       /* 000                       */
  291.  
  292. /*********************************************************************/
  293. /*                     Stop  Keystroke Intercept (53)                */
  294. /*********************************************************************/
  295.  
  296. struct HLDStopKeyIntercept              /* 000 Stop Intercept        */
  297.                                         /* Status structure          */
  298. {
  299.   unsigned char spki_shortname;         /* 000 Session Shortname     */
  300. }
  301. ;                                       /* 000                       */
  302.  
  303. /*********************************************************************/
  304. /*                     Lock Presentation Space API (60)              */
  305. /*********************************************************************/
  306.  
  307. struct HLDLockPS                        /* 000 LockPS structure     */
  308. {
  309.   unsigned char lkps_shortname;         /* 000 Session Shortname     */
  310.   unsigned char lkps_lockopt;           /* 000 Lock/unlock option    */
  311.   unsigned char lkps_queueopt;          /* 000 Queue option          */
  312. }
  313. ;                                       /* 000                       */
  314.  
  315. /*********************************************************************/
  316. /*                     Lock PMSVC API (61)                           */
  317. /*********************************************************************/
  318.  
  319. struct HLDLockPMSVC                     /* 000 LockPMSVC structure   */
  320. {
  321.   unsigned char lkpm_shortname;         /* 000 Session Shortname     */
  322.   unsigned char lkpm_lockopt;           /* 000 Lock/unlock option    */
  323.   unsigned char lkpm_queueopt;          /* 000 Queue option          */
  324. }
  325. ;                                       /* 000                       */
  326.  
  327. /*********************************************************************/
  328. /*                     Convert Position or Row Column (99)           */
  329. /*********************************************************************/
  330.  
  331. struct HLDConvertPosRowCol              /* 000 Convert Position      */
  332.                                         /* or Row Column             */
  333.                                         /* structure                 */
  334. {
  335.   unsigned char cvrc_shortname;         /* 000 Session Shortname     */
  336.   unsigned char cvrc_opt;               /* 000 Convert option        */
  337. }
  338. ;                                       /* 000                       */
  339.  
  340. /*********************************************************************/
  341. /*                     Connect for PM Services (101)                 */
  342. /*********************************************************************/
  343.  
  344. struct HLDConnectPM                     /* 000 Connect For           */
  345.                                         /* Presentation Manager      */
  346.                                         /* Services structure        */
  347. {
  348.   unsigned char stpm_shortname;         /* 000 Session Shortname     */
  349. }
  350. ;                                       /* 000                       */
  351.  
  352. /*********************************************************************/
  353. /*                     Disconnect from PM Services (102)             */
  354. /*********************************************************************/
  355.  
  356. struct HLDDisconnectPM                  /* 000 Disconnect From       */
  357.                                         /* Presentation Manager      */
  358.                                         /* Services structure        */
  359. {
  360.   unsigned char sppm_shortname;         /* 000 Session Shortname     */
  361. }
  362. ;                                       /* 000                       */
  363.  
  364. /*********************************************************************/
  365. /*                       Query PM Window Coordinates (103)           */
  366. /*********************************************************************/
  367.  
  368. struct HLDQueryWindowCoords             /* 000 Query PM Window       */
  369.                                         /* Coordinates structure     */
  370. {
  371.   unsigned char gcor_shortname;         /* 000 Session Shortname     */
  372.   unsigned long int gcor_xLeft;         /* 000 Left X coordinate     */
  373.   unsigned long int gcor_yBottom;       /* 000 Bottom Y coordinate   */
  374.   unsigned long int gcor_xRight;        /* 000 Right X coordinate    */
  375.   unsigned long int gcor_yTop;          /* 000 Top Y coordinate      */
  376. }
  377. ;                                       /* 000                       */
  378.  
  379. /*********************************************************************/
  380. /*                       PM Window Status (104)                      */
  381. /*********************************************************************/
  382.  
  383. struct HLDPMWindowStatus                /* 000 PM Window Status      */
  384.                                         /* structure                 */
  385. {
  386.   unsigned char cwin_shortname;         /* 000 Session Shortname     */
  387.   unsigned char cwin_option;            /* 000 Set/Query option      */
  388.   unsigned short int cwin_flags;        /* 000 Window flags          */
  389.   short int cwin_xpos;                  /* 000 X coordinate position */
  390.   short int cwin_ypos;                  /* 000 Y coordinate position */
  391.   short int cwin_xsize;                 /* 000 X axis window size    */
  392.   short int cwin_ysize;                 /* 000 Y axis window size    */
  393.   unsigned long int cwin_behind;        /* 000 Relative Window       */
  394.                                         /*     placement             */
  395. }
  396. ;                                       /* 000                       */
  397.  
  398. struct HLDPMWindowStatusExt             /* 000 PM Window Status for  */
  399.                                         /* extended structure        */
  400. {
  401.   unsigned char xwin_shortname;         /* 000 Session Shortname     */
  402.   unsigned char xwin_option;            /* 000 Set/Query option      */
  403.   unsigned short int xwin_flags;        /* 000 Window flags          */
  404.   short int xwin_fontx;                 /* 000 X font size           */
  405.   short int xwin_fonty;                 /* 000 Y font size           */
  406.   short int xwin_offsetx;               /* 000 X offset              */
  407.   short int xwin_offsety;               /* 000 Y offset              */
  408.   short int xwin_firstrow;              /* 000 first row             */
  409.   short int xwin_firstcol;              /* 000 first col             */
  410.   unsigned long int xwin_handle;        /* 000 Window handle         */
  411. }
  412. ;                                       /* 000                       */
  413.  
  414. /*********************************************************************/
  415. /*                Change Switch List Name (105)                      */
  416. /*********************************************************************/
  417.  
  418. struct HLDChangeSwitchName              /* 000 Change Switch List    */
  419.                                         /* Name structure            */
  420. {
  421.   unsigned char chsw_shortname;         /* 000 Session Shortname     */
  422.   unsigned char chsw_option;            /* 000 Set/Reset option      */
  423.   unsigned char chsw_swname[61];        /* 000 Switch List name      */
  424. }
  425. ;                                       /* 000                       */
  426.  
  427. /*********************************************************************/
  428. /*                Change LT Window Name (106)                        */
  429. /*********************************************************************/
  430.  
  431. struct HLDChangeWindowName              /* 000 Change LT Window      */
  432.                                         /* Name structure            */
  433. {
  434.   unsigned char chlt_shortname;         /* 000 Session Shortname     */
  435.   unsigned char chlt_option;            /* 000 Set/Reset option      */
  436.   unsigned char chlt_ltname[61];        /* 000 LT Window Name        */
  437. }
  438. ;                                       /* 000                       */
  439.  
  440. /*********************************************************************/
  441. /*                Start Structured Field           (120)             */
  442. /*********************************************************************/
  443.  
  444. struct HLDConnectSF                     /* 000 Connect SF structure  */
  445. {
  446.   unsigned char stsf_shortname;         /* 000 Session Shortname     */
  447.   unsigned char far * stsf_query;       /* 000 4 byte pointer to     */
  448.                                         /* 000 Query reply           */
  449.   unsigned short int  stsf_doid;        /* 000 Destination/Orgin id  */
  450.   unsigned char far * stsf_asem;        /* 000 4 byte pointer to     */
  451.                                         /* 000 notification semaphore*/
  452. }
  453. ;                                       /* 000                       */
  454.  
  455. /*********************************************************************/
  456. /*                Stop  Structured Field           (121)             */
  457. /*********************************************************************/
  458.  
  459. struct HLDDisconnectSF                  /* 000 Disconnect SF         */
  460.                                         /* structure                 */
  461. {
  462.   unsigned char spsf_shortname;         /* 000 Session Shortname     */
  463.   unsigned short int spsf_doid;         /* 000 Destination/Orgin id  */
  464. }
  465. ;                                       /* 000                       */
  466.  
  467. /*********************************************************************/
  468. /*                Query Communications buffer sizes(122)             */
  469. /*********************************************************************/
  470.  
  471. struct HLDQueryBufferSize               /* 000 Query Communication   */
  472.                                         /* buffer size structure     */
  473. {
  474.   unsigned char qbuf_shortname;         /* 000 Session Shortname     */
  475.   unsigned short int qbuf_opt_inbound;  /* 000 Optimal inbound buffer*/
  476.                                         /* 000 length                */
  477.   unsigned short int qbuf_max_inbound;  /* 000 Maximum inbound buffer*/
  478.                                         /* 000 length                */
  479.   unsigned short int qbuf_opt_outbound; /* 000 Optiomal outbound     */
  480.                                         /* 000 buffer length         */
  481.   unsigned short int qbuf_max_outbound; /* 000 Maximum outbound      */
  482.                                         /* 000 buffer length         */
  483. }
  484. ;                                       /* 000                       */
  485.  
  486. /*********************************************************************/
  487. /*                Allocate communications buffer   (123)             */
  488. /*********************************************************************/
  489.  
  490. struct HLDAllocateCommBuff              /* 000 Allocate Communication*/
  491.                                         /* buffer structure          */
  492. {
  493.   unsigned short int  abuf_length;      /* 000 request buffer length */
  494.   unsigned char far * abuf_address;     /* 000 4 byte pointer to     */
  495.                                         /* 000 return buffer address */
  496. }
  497. ;                                       /* 000                       */
  498.  
  499. /*********************************************************************/
  500. /*                Free communications buffer       (124)             */
  501. /*********************************************************************/
  502.  
  503. struct HLDFreeCommBuff                  /* 000 Free Communication    */
  504.                                         /* buffer structure          */
  505. {
  506.   unsigned short int  fbuf_length;      /* 000 buffer length to free */
  507.   unsigned char far * fbuf_address;     /* 000 4 byte buffer address */
  508. }
  509. ;                                       /* 000                       */
  510.  
  511. /*********************************************************************/
  512. /*                Get Async Request completion     (125)             */
  513. /*********************************************************************/
  514.  
  515. struct HLDGetAsyncCompletion            /* 000 Get Async Request     */
  516.                                         /* Completion structure      */
  517. {
  518.   unsigned char  gcmp_shortname;        /* 000 Session Shortname     */
  519.   unsigned char  gcmp_option;           /* 000 Wait option           */
  520.   unsigned short int  gcmp_requestid;   /* 000 request id            */
  521.   unsigned short int  gcmp_ret_functid; /* 000 returned function id  */
  522.   unsigned char far * gcmp_ret_datastr; /* 000 4 byte pointer to     */
  523.                                         /* 000 returned datastring   */
  524.   unsigned short int  gcmp_ret_length;  /* 000 returned length       */
  525.   unsigned short int  gcmp_ret_retcode; /* 000 returned return code  */
  526. }
  527. ;                                       /* 000                       */
  528.  
  529. /*********************************************************************/
  530. /*                Read  Structured Field            (126)            */
  531. /*********************************************************************/
  532.  
  533. struct HLDReadSF                        /* 000 Read SF structure     */
  534. {
  535.   unsigned char  rdsf_shortname;        /* 000 Session Shortname     */
  536.   unsigned char  rdsf_option;           /* 000 Wait option           */
  537.   unsigned short int  rdsf_doid;        /* 000 destination/orgin id  */
  538.   unsigned char far * rdsf_buffer;      /* 000 4 byte pointer to     */
  539.                                         /* 000 read buffer           */
  540.   unsigned short int  rdsf_requestid;   /* 000 request id            */
  541.   HWND                rdsf_hwnd;        /* Window Handle for async   */
  542.                                         /* request.                  */
  543.   unsigned char       rdsf_reserved[2]; /* Reserved                  */
  544. }
  545. ;                                       /* 000                       */
  546.  
  547. /*********************************************************************/
  548. /*               Write Structured Field            (127)             */
  549. /*********************************************************************/
  550.  
  551. struct HLDWriteSF                       /* 000 Write SF structure    */
  552. {
  553.   unsigned char  wrsf_shortname;        /* 000 Session Shortname     */
  554.   unsigned char  wrsf_option;           /* 000 Wait option           */
  555.   unsigned short int  wrsf_doid;        /* 000 destination/orgin id  */
  556.   unsigned char far * wrsf_buffer;      /* 000 4 byte pointer to     */
  557.                                         /* 000 write buffer          */
  558.   unsigned short int  wrsf_requestid;   /* 000 request id            */
  559.   HWND                wrsf_hwnd;        /* Window Handle for async   */
  560.                                         /* request.                  */
  561.   unsigned char       wrsf_reserved[2]; /* Reserved                  */
  562. }
  563. ;
  564.  
  565. /*************************************************************************/
  566. /******************** WinHLLAPI FUNCTION NUMBERS *************************/
  567. /*************************************************************************/
  568. #define  CONNECTPS                        1 /* 000 Connect PS            */
  569. #define  DISCONNECTPS                     2 /* 000 Disconnect PS         */
  570. #define  SENDKEY                          3 /* 000 Sendkey function      */
  571. #define  WAIT                             4 /* 000 Wait function         */
  572. #define  COPYPS                           5 /* 000 Copy PS function      */
  573. #define  SEARCHPS                         6 /* 000 Search PS function    */
  574. #define  QUERYCURSORLOC                   7 /* 000 Query Cursor          */
  575. #define  COPYPSTOSTR                      8 /* 000 Copy PS to String     */
  576. #define  SETSESSIONPARAMETERS             9 /* 000 Set Session           */
  577. #define  QUERYSESSIONS                   10 /* 000 Query Sessions        */
  578. #define  RESERVE                         11 /* 000 Reserve function      */
  579. #define  RELEASE                         12 /* 000 Release function      */
  580. #define  COPYOIA                         13 /* 000 Copy OIA function     */
  581. #define  QUERYFIELDATTRIBUTE             14 /* 000 Query Field           */
  582. #define  COPYSTRTOPS                     15 /* 000 Copy string to PS     */
  583. #define  STORAGEMGR                      17 /* 000 Storage Manager       */
  584. #define  PAUSE                           18 /* 000 Pause function        */
  585. #define  QUERYSYSTEM                     20 /* 000 Query System          */
  586. #define  RESETSYSTEM                     21 /* 000 Reset System          */
  587. #define  QUERYSESSIONSTATUS              22 /* 000 Query Session         */
  588. #define  STARTHOSTNOTIFICATION           23 /* 000 Start Host            */
  589. #define  QUERYHOSTUPDATE                 24 /* 000 Query Host Update     */
  590. #define  STOPHOSTNOTIFICATION            25 /* 000 Stop Host             */
  591. #define  SEARCHFIELD                     30 /* 000 Search Field          */
  592. #define  FINDFIELDPOSITION               31 /* 000 Find Field            */
  593. #define  FINDFIELDLENGTH                 32 /* 000 Find Field Length     */
  594. #define  COPYSTRINGTOFIELD               33 /* 000 Copy String to        */
  595. #define  COPYFIELDTOSTRING               34 /* 000 Copy Field to         */
  596. #define  SETCURSOR                       40 /* 000 Set Cursor            */
  597. #define  STARTCLOSEINTERCEPT             41 /* 000 Start Close Intercept */
  598. #define  QUERYCLOSEINTERCEPT             42 /* 000 Query Close Intercept */
  599. #define  STOPCLOSEINTERCEPT              43 /* 000 Stop Close Intercept  */
  600. #define  STARTKSINTERCEPT                50 /* 000 Start Keystroke       */
  601. #define  GETKEY                          51 /* 000 Get Key function      */
  602. #define  POSTINTERCEPTSTATUS             52 /* 000 Post Intercept        */
  603. #define  STOPKSINTERCEPT                 53 /* 000 Stop Keystroke        */
  604. #define  LOCKPSAPI                       60 /* 000 Lock Presentation     */
  605. #define  LOCKWINDOWSERVICESAPI           61 /* 000 Lock PM Window        */
  606. #define  SENDFILE                        90 /* 000 Send File function    */
  607. #define  RECEIVEFILE                     91 /* 000 Receive file          */
  608. #define  CONVERT                         99 /* 000 Convert Position      */
  609. #define  CONNECTWINDOWSERVICES          101 /* 000 Connect For           */
  610. #define  DISCONNECTWINDOWSERVICES       102 /* 000 Disconnect From       */
  611. #define  QUERYWINDOWCOORDINATES         103 /* 000 Query Presentation    */
  612. #define  WINDOWSTATUS                   104 /* 000 PM Window Status      */
  613. #define  CHANGEPSNAME                   105 /* 000 Change Switch List    */
  614. #define  CHANGEWINDOWNAME               106 /* 000 Change PS Window      */
  615. #define  STARTPLAYINGMACRO              110 /* 000 Start playing macro   */
  616. #define  CONNECTSTRFLDS                 120 /* 000 Start Structured      */
  617. #define  DISCONSTRFLDS                  121 /* 000 Stop Structured       */
  618. #define  QUERYCOMMBUFSIZ                122 /* 000 Query Communications  */
  619. #define  ALLOCCOMMBUFF                  123 /* 000 Allocate              */
  620. #define  FREECOMMBUFF                   124 /* 000 Free Communications   */
  621. #define  GETREQUESTCOMP                 125 /* 000 Get Asynchronous      */
  622. #define  READSTRFLDS                    126 /* 000 Read Structured Field */
  623. #define  WRITESTRFLDS                   127 /* 000 Write Structured      */
  624.  
  625. //=============================================================================
  626. // SetSessionParameters definitions
  627. //=============================================================================
  628. #define  WHLL_SSP_NEWRET                0x00000001
  629. #define  WHLL_SSP_OLDRET                0x00000002
  630. #define  WHLL_SSP_ATTRB                 0x00000004
  631. #define  WHLL_SSP_NOATTRB               0x00000008
  632. #define  WHLL_SSP_NWAIT                 0x00000010
  633. #define  WHLL_SSP_LWAIT                 0x00000020
  634. #define  WHLL_SSP_TWAIT                 0x00000040
  635. #define  WHLL_SSP_EAB                   0x00000080
  636. #define  WHLL_SSP_NOEAB                 0x00000100
  637. #define  WHLL_SSP_AUTORESET             0x00000200
  638. #define  WHLL_SSP_NORESET               0x00000400
  639. #define  WHLL_SSP_SRCHALL               0x00001000
  640. #define  WHLL_SSP_SRCHFROM              0x00002000
  641. #define  WHLL_SSP_SRCHFRWD              0x00004000
  642. #define  WHLL_SSP_SRCHBKWD              0x00008000
  643. #define  WHLL_SSP_FPAUSE                0x00010000
  644. #define  WHLL_SSP_IPAUSE                0x00020000
  645.  
  646. //=============================================================================
  647. // Convert Row or Column Flags
  648. //=============================================================================
  649. #define  WHLL_CONVERT_POSITION          'P'
  650. #define  WHLL_CONVERT_ROW               'R'
  651.  
  652. //=============================================================================
  653. // Storage Manager Sub-Function Values
  654. //=============================================================================
  655. #define  WHLL_GETSTORAGE                1
  656. #define  WHLL_FREESTORAGE               2
  657. #define  WHLL_FREEALLSTORAGE            3
  658. #define  WHLL_QUERYFREESTORAGE          4
  659.  
  660. //=============================================================================
  661. // Change PS Name Values
  662. //=============================================================================
  663. #define  WHLL_CHANGEPSNAME_SET          0X01
  664. #define  WHLL_CHANGEPSNAME_RESET        0X02
  665.  
  666. //=============================================================================
  667. // Window Status Values
  668. //=============================================================================
  669. #define  WHLL_WINDOWSTATUS_SET          0X01
  670. #define  WHLL_WINDOWSTATUS_RESET        0X02
  671.  
  672. #define  WHLL_WINDOWSTATUS_NULL         0X0000
  673. #define  WHLL_WINDOWSTATUS_SIZE         0X0001
  674. #define  WHLL_WINDOWSTATUS_MOVE         0X0002
  675. #define  WHLL_WINDOWSTATUS_ZORDER       0X0004
  676. #define  WHLL_WINDOWSTATUS_SHOW         0X0008
  677. #define  WHLL_WINDOWSTATUS_HIDE         0X0010
  678. #define  WHLL_WINDOWSTATUS_ACTIVATE     0X0080
  679. #define  WHLL_WINDOWSTATUS_DEACTIVATE   0X0100
  680. #define  WHLL_WINDOWSTATUS_MINIMIZE     0X0400
  681. #define  WHLL_WINDOWSTATUS_MAXIMIZE     0X0800
  682. #define  WHLL_WINDOWSTATUS_RESTORE      0X1000
  683.  
  684. #define  WHLL_WINDOWSTATUS_FRONT        0X00000003
  685. #define  WHLL_WINDOWSTATUS_BACK         0X00000004
  686.  
  687. /*********************************************************************/
  688. /******************** WinHLLAPI RETURN CODES *************************/
  689. /*********************************************************************/
  690. #define  WHLLOK                         0
  691. #define  WHLLNOTCONNECTED               1
  692. #define  WHLLBLOCKNOTAVAIL              1
  693. #define  WHLLPARAMETERERROR             2
  694. #define  WHLLBLOCKIDINVALID             2
  695. #define  WHLLFTXCOMPLETE                3
  696. #define  WHLLFTXSEGMENTED               4
  697. #define  WHLLPSBUSY                     4
  698. #define  WHLLINHIBITED                  5
  699. #define  WHLLTRUNCATED                  6
  700. #define  WHLLPOSITIONERROR              7
  701. #define  WHLLNOTAVAILABLE               8
  702. #define  WHLLSYSERROR                   9
  703. #define  WHLLWOULDBLOCK                 10
  704. #define  WHLLUNAVAILABLE                11
  705. #define  WHLLPSENDED                    12
  706. #define  WHLLUNDEFINEDKEY               20
  707. #define  WHLLOIAUPDATE                  21
  708. #define  WHLLPSUPDATE                   22
  709. #define  WHLLBOTHUPDATE                 23
  710. #define  WHLLNOFIELD                    24
  711. #define  WHLLNOKEYSTROKES               25
  712. #define  WHLLPSCHANGED                  26
  713. #define  WHLLFTXABORTED                 27
  714. #define  WHLLZEROLENFIELD               28
  715. #define  WHLLINVALIDTYPE                30
  716. #define  WHLLKEYOVERFLOW                31
  717. #define  WHLLSFACONN                    32
  718. #define  WHLLTRANCANCLI                 34
  719. #define  WHLLTRANCANCL                  35
  720. #define  WHLLHOSTCLOST                  36
  721. #define  WHLLOKDISABLED                 37
  722. #define  WHLLNOTCOMPLETE                38
  723. #define  WHLLSFDDM                      39
  724. #define  WHLLSFDPEND                    40
  725. #define  WHLLBUFFINUSE                  41
  726. #define  WHLLNOMATCH                    42
  727. #define  WHLLFTXCOMPLETECICS            101
  728.  
  729. #define  WHLLINVALIDFUNCTIONNUM         301
  730. #define  WHLLFILENOTFOUND               301
  731. #define  WHLLACCESSDENIED               305
  732. #define  WHLLMEMORY                     308
  733. #define  WHLLINVALIDENVIRONMENT         310
  734. #define  WHLLINVALIDFORMAT              311
  735.  
  736. #define  WHLLINVALIDPSID                9998
  737. #define  WHLLINVALIDRC                  9999
  738.  
  739. //=============================================================================
  740. // Windows HLLAPI Extension Return Codes
  741. //=============================================================================
  742. #define  WHLLALREADY                    0xF000
  743. #define  WHLLINVALID                    0xF001
  744. #define  WHLLCANCEL                     0xF002
  745. #define  WHLLSYSNOTREADY                0xF003
  746. #define  WHLLVERNOTSUPPORTED            0xF004
  747.  
  748. #ifdef __cplusplus
  749.   }
  750. #endif
  751.  
  752. #endif // #ifdef WHLLAPI_HEAD
  753.