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

  1. //******************************************************************************
  2. //
  3. // LISTFILE.H - File containing all defines for application ListFile
  4. //
  5. //
  6. //******************************************************************************
  7.  
  8. // Global function defines
  9.  
  10. int PASCAL      WinMain(HANDLE, HANDLE, LPSTR, int);
  11.  
  12. BOOL            RegisterApplicationClass( HANDLE );
  13. BOOL            InitInstance( HANDLE, int );
  14.  
  15. long WINAPI     ListFileWndProc(HWND, UINT, WPARAM, LPARAM);
  16. long WINAPI     FileListWndProc(HWND, UINT, WPARAM, LPARAM);
  17.  
  18. BOOL WINAPI     About(HWND, UINT, WPARAM, LPARAM);
  19.  
  20. BOOL            InitDDE( void );
  21.  
  22. void            ListDDEInitiate(  HWND, UINT, WPARAM, LPARAM );
  23. void            ListDDEPoke(      HWND, UINT, WPARAM, LPARAM );
  24. void            ListDDERequest(   HWND, UINT, WPARAM, LPARAM );
  25. void            ListDDETerminate( HWND, UINT, WPARAM, LPARAM );
  26.  
  27. void            FileDDEAck(       HWND, UINT, WPARAM, LPARAM );
  28. void            FileDDEData(      HWND, UINT, WPARAM, LPARAM );
  29. void            FileDDETerminate( HWND, UINT, WPARAM, LPARAM );
  30.  
  31. void            Terminate( WORD ); // Terminate conv and/or application
  32.  
  33. //******************************************************************************
  34. //
  35. // Dialog Identifiers
  36. //
  37. //******************************************************************************
  38.  
  39. #define ID_ABOUT   5000
  40. #define ID_SEND    5001
  41. #define ID_RECV    5002
  42. #define ID_CONV    5003
  43. #define ID_IGNORE  5999
  44.  
  45. //******************************************************************************
  46. //
  47. // Resource Identifiers
  48. //
  49. //******************************************************************************
  50.  
  51. #define LISTMENU   9000
  52. #define LISTICON   9001
  53. #define ABOUTBOX   9002
  54.  
  55. //******************************************************************************
  56. //
  57. // Load String Identifiers
  58. //
  59. //******************************************************************************
  60.  
  61. #define LS_COMMAND_LINE_ERROR1  1
  62. #define LS_TITLE_TEXT           2
  63. #define LS_DDE_TOKENS           3
  64. #define LS_16STR_FORMAT         5
  65. #define LS_LISTFILE_COMMAND     6
  66. #define LS_CLEARSCREEN_COMMAND  7
  67.  
  68. //******************************************************************************
  69. //
  70. // MISC
  71. //
  72. //******************************************************************************
  73.  
  74. #define uchar           unsigned char
  75.  
  76. #define DDE_GLOBAL  ( GHND | GMEM_DDESHARE | GMEM_MOVEABLE | GMEM_ZEROINIT )
  77.  
  78. #define DDE_ACK         0x8000
  79. #define DDE_NACK        0x0000       /* Negative ACK          */
  80. #define DDE_NACK_BUSY   0x4000       /* Negative ACK/BUSY     */
  81.  
  82. #define WC_PURETEXT     0
  83. #define WC_HLLAPITEXT   1
  84.  
  85. #define SPACE_CHAR      ' '
  86. #define NULL_CHAR       '\0'
  87.  
  88. #define PSDATA_ERROR    0
  89. #define PSDATA_END      1
  90. #define PSDATA_MORE     2
  91. #define PSDATA_REREAD   3
  92.  
  93. #define SIZEOFFILENAME  21
  94. #define MAXFILENAMES    100
  95.  
  96. #define APPLICATION            1
  97. #define CONVERSATIONS          2
  98. #define CONVERSATION_SESSION   3
  99.  
  100. //******************************************************************************
  101. //
  102. // typedef's used by listfile and session
  103. //
  104. //******************************************************************************
  105. typedef struct tagGETLIST
  106. {
  107.   uchar     ddepoke[(sizeof(DDEPOKE)-1)];
  108.   int       iSession;
  109.   int       iSystem;
  110.   char      DataSet[41];
  111.   BYTE      Data[1];
  112. } GETLIST;
  113.  
  114. typedef union tagDDE_GETLIST
  115. {
  116.   DDEPOKE     DDEpoke;
  117.   GETLIST     DDEgetlist;
  118. } DDE_GETLIST;
  119.  
  120. typedef DDE_GETLIST FAR *LPDDE_GETLIST;
  121.  
  122. typedef struct tagLISTFILES
  123. {
  124.   uchar     ddedata[(sizeof(DDEDATA)-1)];
  125.   int       iItemsInList;
  126.   USHORT    uFilenameWidth;
  127.   BYTE      Data[1];
  128. } LISTFILES;
  129.  
  130. typedef union tagDDE_LISTFILES
  131. {
  132.   DDEDATA     DDEdata;
  133.   LISTFILES   DDElistfiles;
  134. } DDE_LISTFILES;
  135.  
  136. typedef DDE_LISTFILES FAR *LPDDE_LISTFILES;
  137.  
  138. typedef struct tagXCOMMANDS         // Structure used to send keystrokes
  139. {                                   // to the session via the DDE
  140.   unsigned char zXCommands[129];    // EXECUTE (MACRO service
  141. } XCOMMANDS, FAR *LPXCOMMANDS;
  142.  
  143.