home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 19.ddi / SAMPLES / DDEML / CLOCK / WRAPPER.H_ / WRAPPER.H
Encoding:
C/C++ Source or Header  |  1993-02-08  |  2.4 KB  |  80 lines

  1. /***************************************************************************\
  2.                            
  3.    MODULE      : wrapper.h 
  4.                            
  5.    PURPOSE     : This is not a full program but a module you can include
  6.                  in your code.  It implements a standard DDEML callback
  7.                  function that allows you to have most of your DDE table
  8.                  driven.  The default callback function handles all basic
  9.                  System Topic information based on the tables you give
  10.                  to this app.
  11.  
  12.    LIMITATIONS : This only supports servers that:
  13.                  have only one service name
  14.                  have enumerable topics and items
  15.                  do not change the topics or items they support over time.
  16.                      
  17. \***************************************************************************/
  18.  
  19.  
  20. /*      TYPES           */
  21.  
  22. typedef BOOL        (PASCAL *CBFNIN)(HDDEDATA);
  23. typedef HDDEDATA    (PASCAL *CBFNOUT)(HDDEDATA);
  24.  
  25.  
  26.  
  27. /*  STRUCTURES  */
  28.  
  29. typedef struct _DDEFORMATTBL {
  30.     LPSTR           pszFormat;
  31.     WORD            wFmt;
  32.     WORD            wFmtFlags;
  33.     CBFNIN          lpfnPoke;
  34.     CBFNOUT         lpfnRequest;
  35. } DDEFORMATTBL;
  36. typedef DDEFORMATTBL *PDDEFORMATTBL;
  37. typedef DDEFORMATTBL FAR *LPDDEFORMATTBL;
  38.  
  39. typedef struct _DDEITEMTBL {
  40.     LPSTR           pszItem;
  41.     HSZ             hszItem;
  42.     CBFNIN          lpfnExecute;
  43.     WORD            cFormats;
  44.     WORD            wItemFlags;
  45.     LPDDEFORMATTBL  fmt;
  46. } DDEITEMTBL;
  47. typedef DDEITEMTBL *PDDEITEMTBL;
  48. typedef DDEITEMTBL FAR *LPDDEITEMTBL;
  49.  
  50.  
  51. typedef struct _DDETOPICTBL {
  52.     LPSTR           pszTopic;
  53.     HSZ             hszTopic;
  54.     WORD            cItems;
  55.     WORD            wTopicFlags;
  56.     LPDDEITEMTBL     item;
  57. } DDETOPICTBL;
  58. typedef DDETOPICTBL *PDDETOPICTBL;
  59. typedef DDETOPICTBL FAR *LPDDETOPICTBL;
  60.  
  61. typedef struct _DDESERVICETBL {
  62.     LPSTR           pszService;
  63.     HSZ             hszService;
  64.     WORD            cTopics;
  65.     WORD            wServiceFlags;
  66.     LPDDETOPICTBL    topic;
  67. } DDESERVICETBL;
  68. typedef DDESERVICETBL *PDDESERVICETBL;
  69. typedef DDESERVICETBL FAR *LPDDESERVICETBL;
  70.  
  71.  
  72.  
  73. /*      PROTOTYPES      */
  74.  
  75. BOOL InitializeDDE(PFNCALLBACK lpfnCustomCallback, LPDWORD pidInst,
  76.     LPDDESERVICETBL AppSvcInfo,  DWORD dwFilterFlags, HANDLE hInst);
  77.  
  78. VOID UninitializeDDE(VOID);
  79.  
  80.