home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s038 / 10.ddi / 017.LIF / RMXDDE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-02  |  4.2 KB  |  171 lines

  1. /**********************************************************************
  2.  
  3.                     RMXDDE Library Functions Prototypes
  4.  
  5. ***********************************************************************/
  6.  
  7. #ifndef RMXDDE_H
  8. #define RMXDDE_H
  9.  
  10. #ifndef WORD
  11. #define WORD unsigned short
  12. #endif
  13.  
  14. typedef void    (*LINKFUNCPTR)
  15.                     (WORD conversation_id, char *topic_name_p,
  16.                     char *data_item_p, 
  17.                     char *data_value_p);
  18.  
  19. typedef WORD    (*CONVFUNCPTR)
  20.                     (char *client_name_p, char *service_name_p, 
  21.                     char *topic_name_p, WORD conversation_id,
  22.                     WORD function_code);
  23.  
  24. typedef WORD    (*DATAFUNCPTR)
  25.                     (char *client_name_p, char *service_name_p, 
  26.                     char *topic_name_p, WORD conversation_id,
  27.                     char *data_item_p, char *data_buf_p,
  28.                     WORD data_buf_size,WORD function_code);
  29.  
  30.  
  31. typedef struct tCONFIGBUF
  32.     {
  33.         WORD    dummy;
  34.     } CONFIGBUF;
  35.  
  36. /**********************************************************************
  37.  
  38.                     Mandatory Operations
  39.  
  40. ***********************************************************************/
  41.  
  42. void dde_library_init    (    CONFIGBUF *config_buf_p,
  43.                             WORD *status_p
  44.                         );
  45.  
  46. /**********************************************************************
  47.  
  48.                     Simple Client Operations
  49.  
  50. ***********************************************************************/
  51.  
  52. WORD client_dde_initiate(    char *server_machine_name_p,
  53.                             char *service_name_p,
  54.                             char *topic_name_p,
  55.                             LINKFUNCPTR link_callback_p,
  56.                             WORD *status_p
  57.                         );
  58.                             
  59. void client_dde_terminate    (    WORD conversation_id,
  60.                                 WORD *status_p
  61.                             );
  62.  
  63. void client_dde_poke    (    WORD conversation_id,
  64.                             char *data_item_name_p,
  65.                             char *data_value_p,
  66.                             WORD *status_p
  67.                         );
  68.  
  69. void client_dde_request    (    WORD conversation_id,
  70.                             char *data_item_name_p,
  71.                             char *data_buf_p,
  72.                             WORD data_buf_size,
  73.                             WORD *status_p
  74.                         );
  75.  
  76. void client_dde_execute    (    WORD conversation_id,
  77.                             char *command_p,
  78.                             WORD *status_p
  79.                         );
  80.                         
  81. /**********************************************************************
  82.  
  83.                     Client Link Operations
  84.  
  85. ***********************************************************************/
  86.  
  87. void client_dde_open_hot_link    (    WORD conversation_id,
  88.                                     char *data_item_name_p,
  89.                                     WORD *status_p
  90.                                 );
  91.  
  92.  
  93. void client_dde_open_warm_link    (    WORD conversation_id,
  94.                                     char *data_item_name_p,
  95.                                     WORD *status_p
  96.                                 );
  97.  
  98. void client_dde_close_link        (    WORD conversation_id,
  99.                                     char *data_item_name_p,
  100.                                     WORD *status_p
  101.                                 );
  102.  
  103. void client_dde_run_application        (    char *machine_name_p,
  104.                                         char *command_p,
  105.                                         WORD flags,
  106.                                         WORD *status_p
  107.                                     );
  108.  
  109. /**********************************************************************
  110.  
  111.                     Server Operations
  112.  
  113. ***********************************************************************/
  114.  
  115. void server_dde_register    (    char *local_machine_p,
  116.                                 char *service_name_p,
  117.                                 CONVFUNCPTR    conv_callback_p,
  118.                                 DATAFUNCPTR    data_callback_p,
  119.                                 WORD *status_p
  120.                             );
  121.  
  122.  
  123. void server_dde_update_link    (    WORD conversation_id,
  124.                                 char *data_item_name_p,
  125.                                 char *data_value_p,
  126.                                 WORD *status_p
  127.                             );
  128.  
  129. void server_dde_terminate    (    WORD conversation_id,
  130.                                 WORD *status_p
  131.                             );
  132.  
  133.  
  134. /* DDE command identifiers used    by RMXDDE Library */
  135. /* Note: These identifiers are same    as the Windows DDE Message Identifiers */
  136.  
  137. #define    DDE_FIRST        0x03E0
  138.  
  139. /* Conversation Callback Function Codes */
  140.  
  141. #define    DDE_INITIATE    (DDE_FIRST)
  142. #define    DDE_TERMINATE    (DDE_FIRST+1)
  143.  
  144. /* Data Callback Function Codes */
  145.  
  146. #define    DDE_ADVISE        (DDE_FIRST+2)
  147. #define    DDE_HOT_LINK    DDE_ADVISE
  148. #define    DDE_UNADVISE    (DDE_FIRST+3)
  149. #define    DDE_CLOSE_LINK    DDE_UNADVISE
  150. #define    DDE_REQUEST        (DDE_FIRST+6)
  151. #define    DDE_POKE        (DDE_FIRST+7)
  152. #define    DDE_EXECUTE        (DDE_FIRST+8)
  153. #define DDE_WARM_LINK   (DDE_FIRST+9)    /* Not Used by Protocol         */
  154.  
  155. /* Protocol Messages not seen by application */
  156.  
  157. #define    DDE_ACK                (DDE_FIRST+4)
  158. #define    DDE_DATA            (DDE_FIRST+5)
  159. #define    DDE_RUN_APPLICATION    (DDE_FIRST+10)
  160.  
  161. /* Flags for dde_client_run_application() */
  162.  
  163. #define    DDE_NORMAL        0
  164. #define    DDE_MAXIMIZED    1
  165. #define    DDE_MINIMIZED    2
  166.  
  167. #define    DDE_OK            (0)
  168. #define DDE_NOT_OK        (-1)
  169.  
  170. #endif
  171.