home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / windows / ddelib / ddelib.prn < prev    next >
Encoding:
Text File  |  1990-09-17  |  91.3 KB  |  1,712 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                                      DDELIB 1.3
  9.  
  10.                              Horizon Technologies Inc.
  11.  
  12.  
  13.          Introduction:
  14.  
  15.  
  16.               The Dynamic Data Exchange (DDE) Dynamic Link Library (DLL)
  17.  
  18.               offers Microsoft Windows programmers a tool that reduces the
  19.  
  20.               effort required to add DDE support to their applications.
  21.  
  22.  
  23.               DDE is a protocol for sending data and commands between two
  24.  
  25.               applications in real time.  This link makes it possible to
  26.  
  27.               build an integrated system from specialized component
  28.  
  29.               programs.  For example, a DDE session could be established
  30.  
  31.               to transfer numerical data from a spreadsheet to a word
  32.  
  33.               processing program.  By means of the DDE protocol the
  34.  
  35.               spreadsheet could automatically send updated data to the
  36.  
  37.               word processor every time the user changed an entry in the
  38.  
  39.               spreadsheet.
  40.  
  41.  
  42.               As attractive as this sounds, DDE has a major drawback - it
  43.  
  44.               is very difficult for programmers to implement.  Not only
  45.  
  46.               must they deal with the data being transferred to and from
  47.  
  48.               the application being developed, but also with the difficult
  49.  
  50.               and confusing DDE protocol itself.
  51.  
  52.  
  53.               We cannot offer much assistance in the processing of data,
  54.  
  55.               as this is inherent to the structure of every program.
  56.  
  57.               However, there is considerable relief from the burdens of
  58.  
  59.               the DDE protocol in the form of this library.  The 
  60.                                                              The 
  61.                                                              The ___
  62.                                                                  DDE
  63.                                                                  ___
  64.                                                                  DDE
  65.                                                                  ___
  66.                                                                  DDE
  67.  
  68.               _______
  69.               Library
  70.               _______
  71.               Library
  72.               _______
  73.               Library provides a simplified means of implementing the DDE
  74.                       provides a simplified means of implementing the DDE
  75.                       provides a simplified means of implementing the DDE
  76.  
  77.               protocol in any Windows application
  78.               protocol in any Windows application
  79.               protocol in any Windows application.
  80.  
  81.  
  82.          Overview:
  83.  
  84.  
  85.               This overview summarizes the function calls available in the
  86.  
  87.               ___ _______
  88.               DDE Library.  A general knowledge of the DDE protocol can be
  89.  
  90.               obtained from Microsoft documents:  Chapters 8, 9 and 10 of
  91.  
  92.               the _________ _______ ________ ___________ ___ _ _______
  93.                   Microsoft Windows Software Development Kit - Windows
  94.  
  95.               __________ _ _______ ___
  96.               Extensions - Version 2.0, and chapter 22 of the _________
  97.                                                               Microsoft
  98.  
  99.               _______ _____ __ ___________
  100.               Windows Guide to Programming for Windows 3.0 will provide
  101.  
  102.               the needed background.
  103.  
  104.  
  105.               The ___ _______
  106.                   DDE Library tracks all DDE messages.  The application,
  107.  
  108.               whether a client, a server or both, does not have to respond
  109.  
  110.               to any DDE messages in its window procedure.  The ___
  111.                                                                 DDE
  112.  
  113.               _______
  114.               Library will create special windows to handle all of the DDE
  115.  
  116.               message traffic.  The application needs only to interact
  117.  
  118.               with the library functions provided.
  119.  
  120.  
  121.               The ___ _______
  122.                   DDE Library handles all message flow control and
  123.  
  124.               acknowledgements.  It tracks the current state of the DDE
  125.  
  126.  
  127.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  128.  
  129.          Inc.  All rights reserved.  (517) 347-0800                 Page 1
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.               conversation and sends messages only when permitted by the
  137.  
  138.               DDE protocol.  The application does not have to determine
  139.  
  140.               whether or not to acknowledge a received message or wait
  141.  
  142.               until an acknowledgement is received from a transmitted
  143.  
  144.               message.
  145.  
  146.  
  147.               The ___ _______
  148.                   DDE Library handles all atom creation and deletion.  It
  149.  
  150.               will convert a string to an atom and back again so the
  151.  
  152.               application does not need to work with any of the atom
  153.  
  154.               manager functions.
  155.  
  156.  
  157.               The ___ _______
  158.                   DDE Library handles much of the memory management
  159.  
  160.               required for DDE.  Any memory management required by the
  161.  
  162.               application is documented by those functions requiring it.
  163.  
  164.  
  165.               The ___ _______
  166.                   DDE Library provides special support services to help
  167.  
  168.               DDE server applications track information relevant to DDE,
  169.  
  170.               but not necessarily part of the DDE protocol itself.
  171.  
  172.  
  173.               Applications requiring DDE client functionality use the
  174.  
  175.               following functions:
  176.  
  177.                   
  178.                   
  179.                  ___________
  180.                  DDEInitiate
  181.                   
  182.                    
  183.                     
  184.                      
  185.                       
  186.                        
  187.                         
  188.                          
  189.                           
  190.                            
  191.                             
  192.                             
  193.                             
  194.                              and  
  195.                                   
  196.                                   
  197.                                   
  198.                                  ____________
  199.                                  DDETerminate
  200.                                    
  201.                                     
  202.                                      
  203.                                       
  204.                                        
  205.                                         
  206.                                          
  207.                                           
  208.                                            
  209.                                             
  210.                                              
  211.                                              
  212.                                              
  213.                                               for session management.
  214.  
  215.                   
  216.                   
  217.                  _________
  218.                  DDEAdvise
  219.                   
  220.                    
  221.                     
  222.                      
  223.                       
  224.                        
  225.                         
  226.                          
  227.                           
  228.                           
  229.                           
  230.                            and  
  231.                                 
  232.                                 
  233.                                 
  234.                                ___________
  235.                                DDEUnadvise
  236.                                  
  237.                                   
  238.                                    
  239.                                     
  240.                                      
  241.                                       
  242.                                        
  243.                                         
  244.                                          
  245.                                           
  246.                                           
  247.                                           
  248.                                            to establish and close advise
  249.  
  250.                    circuits.
  251.  
  252.                   
  253.                   
  254.                   
  255.                   
  256.                  __________
  257.                  DDERequest
  258.                    
  259.                     
  260.                      
  261.                       
  262.                        
  263.                         
  264.                          
  265.                           
  266.                            
  267.                            
  268.                            
  269.                             and  
  270.                                  
  271.                                  
  272.                                  
  273.                                 _______
  274.                                 DDEPoke
  275.                                   
  276.                                    
  277.                                     
  278.                                      
  279.                                       
  280.                                        
  281.                                        
  282.                                        
  283.                                         for one time data transfers from
  284.  
  285.                    and to the server respectively.
  286.  
  287.                   
  288.                   
  289.                   
  290.                   
  291.                  __________
  292.                  DDEExecute
  293.                    
  294.                     
  295.                      
  296.                       
  297.                        
  298.                         
  299.                          
  300.                           
  301.                            
  302.                            
  303.                            
  304.                             to send a command to the server.
  305.  
  306.  
  307.               Applications requiring DDE server functionality use these
  308.  
  309.               functions:
  310.  
  311.                   
  312.                   
  313.                  ________________
  314.                  DDERegisterTopic
  315.                   
  316.                    
  317.                     
  318.                      
  319.                       
  320.                        
  321.                         
  322.                          
  323.                           
  324.                            
  325.                             
  326.                              
  327.                               
  328.                                
  329.                                 
  330.                                  
  331.                                  
  332.                                  
  333.                                   to provide a service to other potential
  334.  
  335.                    client applications.
  336.  
  337.                   
  338.                   
  339.                   
  340.                   
  341.                  ____________________
  342.                  DDEGetSessionAppAtom
  343.                    
  344.                     
  345.                      
  346.                       
  347.                        
  348.                         
  349.                          
  350.                           
  351.                            
  352.                             
  353.                              
  354.                               
  355.                                
  356.                                 
  357.                                  
  358.                                   
  359.                                    
  360.                                     
  361.                                      
  362.                                      
  363.                                      
  364.                                      ,  
  365.                                         
  366.                                         
  367.                                         
  368.                                        ____________________
  369.                                        DDEGetSessionAppName
  370.                                          
  371.                                           
  372.                                            
  373.                                             
  374.                                              
  375.                                               
  376.                                                
  377.                                                 
  378.                                                  
  379.                                                   
  380.                                                    
  381.                                                     
  382.                                                      
  383.                                                       
  384.                                                        
  385.                                                         
  386.                                                          
  387.                                                           
  388.                                                            
  389.                                                            
  390.                                                            
  391.                                                            ,
  392.  
  393.                     
  394.                     
  395.                     
  396.                     
  397.                    ______________________
  398.                    DDEGetSessionTopicAtom
  399.                      
  400.                       
  401.                        
  402.                         
  403.                          
  404.                           
  405.                            
  406.                             
  407.                              
  408.                               
  409.                                
  410.                                 
  411.                                  
  412.                                   
  413.                                    
  414.                                     
  415.                                      
  416.                                       
  417.                                        
  418.                                         
  419.                                          
  420.                                          
  421.                                          
  422.                                           and  
  423.                                                
  424.                                                
  425.                                                
  426.                                               ______________________
  427.                                               DDEGetSessionTopicName
  428.                                                 
  429.                                                  
  430.                                                   
  431.                                                    
  432.                                                     
  433.                                                      
  434.                                                       
  435.                                                        
  436.                                                         
  437.                                                          
  438.                                                           
  439.                                                            
  440.                                                             
  441.                                                              
  442.                                                               
  443.                                                                
  444.                                                                 
  445.                                                                  
  446.                                                                   
  447.                                                                    
  448.                                                                     
  449.                                                                     
  450.                                                                     
  451.                                                                      to
  452.  
  453.                    obtain information about the client application.
  454.  
  455.                   
  456.                   
  457.                  ___________
  458.                  DDESendData
  459.                   
  460.                    
  461.                     
  462.                      
  463.                       
  464.                        
  465.                         
  466.                          
  467.                           
  468.                            
  469.                             
  470.                             
  471.                             
  472.                              to transmit data to client applications.
  473.  
  474.                  _________________
  475.                  DDERegisterAdvise
  476.                   
  477.                   
  478.                   
  479.                    
  480.                     
  481.                      
  482.                       
  483.                        
  484.                         
  485.                          
  486.                           
  487.                            
  488.                             
  489.                              
  490.                               
  491.                                
  492.                                 
  493.                                  
  494.                                   
  495.                                   
  496.                                   
  497.                                   , ____________
  498.                                     DDEGetAdvise
  499.                                      
  500.                                      
  501.                                      
  502.                                       
  503.                                        
  504.                                         
  505.                                          
  506.                                           
  507.                                            
  508.                                             
  509.                                              
  510.                                               
  511.                                                
  512.                                                 
  513.                                                 
  514.                                                 
  515.                                                  and ___________________
  516.                                                      DDEUnregisterAdvise
  517.                                                       
  518.                                                       
  519.                                                       
  520.                                                        
  521.                                                         
  522.                                                          
  523.                                                           
  524.                                                            
  525.                                                             
  526.                                                              
  527.                                                               
  528.                                                                
  529.                                                                 
  530.                                                                  
  531.                                                                   
  532.                                                                    
  533.                                                                     
  534.                                                                      
  535.                                                                       
  536.                                                                        
  537.                                                                         
  538.                                                                         
  539.                                                                         
  540.                                                                         
  541.  
  542.                    to record outstanding advises to be serviced.  Unlike
  543.  
  544.                    any other ___ _______
  545.                              DDE Library functions, these functions do not
  546.  
  547.                    perform any DDE actions and can be considered
  548.  
  549.                    separately from the rest of the ___ _______
  550.                                                    DDE Library.  In fact,
  551.  
  552.                    they are merely convenience routines to aid in the
  553.  
  554.                    implementation of DDE server applications.
  555.  
  556.                  __________________
  557.                  DDEUnregisterTopic
  558.                   
  559.                   
  560.                   
  561.                    
  562.                     
  563.                      
  564.                       
  565.                        
  566.                         
  567.                          
  568.                           
  569.                            
  570.                             
  571.                              
  572.                               
  573.                                
  574.                                 
  575.                                  
  576.                                   
  577.                                    
  578.                                    
  579.                                    
  580.                                     to remove a particular service.
  581.  
  582.  
  583.               Each of the functions of the ___ _______
  584.                                            DDE Library are described in
  585.  
  586.               detail on the following pages.  The information provided
  587.  
  588.               includes the function description, syntax, parameter list,
  589.  
  590.               return value, and helpful comments.  These descriptions also
  591.  
  592.               document the format of any callback functions that may be
  593.  
  594.  
  595.  
  596.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  597.  
  598.          Inc.  All rights reserved.  (517) 347-0800                 Page 2
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.               required.  An appendix is supplied that describes the
  606.  
  607.               different structures used.
  608.  
  609.  
  610.               ___ _______
  611.               DDE Library can communicate with a variety of DDE based
  612.  
  613.               applications including Microsoft's _____
  614.                                                  Excel and ____ ___
  615.                                                            Word for
  616.  
  617.               _______
  618.               Windows.  ___ _______
  619.                         DDE Library also comes with sample programs that
  620.  
  621.               demonstrate the use of the library.
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  669.  
  670.          Inc.  All rights reserved.  (517) 347-0800                 Page 3
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.                                                                 DDEInitiate
  678.  
  679.  
  680.          Syntax:
  681.  
  682.                  HWND DDEInitiate (hOwner, lpszApp, lpszTopic)
  683.  
  684.                  Client applications use this function to initiate a DDE
  685.  
  686.                  session with the first server that responds.  This DDE
  687.  
  688.                  function must be called before any of the other client
  689.  
  690.                  DDE functions.
  691.  
  692.  
  693.                  _________
  694.                  Parameter
  695.                  _________
  696.                  Parameter
  697.                  _________
  698.                  Parameter        ________________
  699.                                   Type/Description
  700.                                   ________________
  701.                                   Type/Description
  702.                                   ________________
  703.                                   Type/Description
  704.  
  705.                  hOwner           HWND
  706.                                   HWND
  707.                                   HWND  Handle to the top level window of
  708.  
  709.                                   the application.
  710.  
  711.  
  712.                  lpszApp          LPSTR
  713.                                   LPSTR
  714.                                   LPSTR  Points to a character string that
  715.  
  716.                                   names the requested application.  The
  717.  
  718.                                   string must be a null terminated
  719.  
  720.                                   character string.
  721.  
  722.                  lpszTopic        LPSTR
  723.                                   LPSTR
  724.                                   LPSTR  Points to a character string that
  725.  
  726.                                   names the requested topic.  The string
  727.  
  728.                                   must be a null terminated character
  729.  
  730.                                   string.
  731.  
  732.  
  733.          Return Value:
  734.  
  735.                  A handle to the initiated DDE session which is used in
  736.  
  737.                  subsequent client DDE function calls.  It is NULL if the
  738.  
  739.                  function is unsuccessful.
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  768.  
  769.          Inc.  All rights reserved.  (517) 347-0800                 Page 4
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.                                                                   DDEAdvise
  777.  
  778.  
  779.          Syntax:
  780.  
  781.                  WORD DDEAdvise (hClient, lpszItem, lpAdvise,
  782.  
  783.                    lpfnAdviseCallBack)
  784.  
  785.                  Client applications use this function to request the
  786.  
  787.                  establishment of an advise circuit for a particular data
  788.  
  789.                  item.  Whenever the server determines that the value of
  790.  
  791.                  the data item has changed, it will notify the client by
  792.  
  793.                  calling the lpfnAdviseCallBack function.  This function
  794.  
  795.                  returns after the server has acknowledged the advise.
  796.  
  797.  
  798.                  _________
  799.                  Parameter
  800.                  _________
  801.                  Parameter
  802.                  _________
  803.                  Parameter        ________________
  804.                                   Type/Description
  805.                                   ________________
  806.                                   Type/Description
  807.                                   ________________
  808.                                   Type/Description
  809.  
  810.                  hClient          HWND
  811.                                   HWND
  812.                                   HWND  Handle to a DDE session returned
  813.  
  814.                                   by DDEInitiate.
  815.  
  816.  
  817.                  lpszItem         LPSTR
  818.                                   LPSTR
  819.                                   LPSTR  Points to a character string that
  820.  
  821.                                   names the requested item.  The string
  822.  
  823.                                   must be a null terminated character
  824.  
  825.                                   string.
  826.  
  827.                  lpAdvise         DDEADVISE FAR *
  828.                                   DDEADVISE FAR *
  829.                                   DDEADVISE FAR *  Points to a DDEADVISE
  830.  
  831.                                   structure that specifies the particular
  832.  
  833.                                   options for this advise circuit.  See
  834.  
  835.                                   Advise Structure below.
  836.  
  837.  
  838.                  lpfnAdviseCallBack    DDECALLBACK
  839.                                        DDECALLBACK
  840.                                        DDECALLBACK  Is the procedure
  841.  
  842.                                   instance of the callback function that
  843.  
  844.                                   will be invoked each time the server
  845.  
  846.                                   issues an advise.  See Callback Function
  847.  
  848.                                   below.
  849.  
  850.          Return Value:
  851.  
  852.  
  853.                  A word in the format of the DDEACK structure.  See
  854.  
  855.                  Appendix for more information.
  856.  
  857.          Advise Structure:
  858.  
  859.  
  860.                  Set fDeferUpd to TRUE to cause the server to exclude the
  861.  
  862.                  DDEDATA structure as part of the data message.  Set
  863.  
  864.                  fAckReq to TRUE to cause the server to wait for an
  865.  
  866.                  acknowledgement before sending another data message.  Set
  867.  
  868.                  cfFormat to a valid clipboard format, such as CF_TEXT,
  869.  
  870.                  identifying the format of the data requested.  See
  871.  
  872.                  Appendix for more information.
  873.  
  874.                  Never set both fAckReq and fDeferUpd to TRUE, since the
  875.  
  876.                  server would have no way of letting the client know
  877.  
  878.                  whether or not ot should acknowledge a particular data
  879.  
  880.                  message.
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  888.  
  889.          Inc.  All rights reserved.  (517) 347-0800                 Page 5
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.          Comments:
  897.  
  898.  
  899.                  Setting fDeferUpd to TRUE provides a mechanism to avoid
  900.  
  901.                  frequent data transfers if only a notification is
  902.  
  903.                  required.
  904.  
  905.                  Note that when setting fAckReq to TRUE the server will
  906.  
  907.                  not receive an acknowledgement until the callback
  908.  
  909.                  function returns.
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  956.  
  957.          Inc.  All rights reserved.  (517) 347-0800                 Page 6
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.          Callback Function:
  966.  
  967.                  WORD FAR PASCAL Advise (hClient, iMessage, lpszItem,
  968.  
  969.                    hData)
  970.  
  971.                  Advise is a placeholder for the application-supplied
  972.  
  973.                  function name.  The actual name must be exported by
  974.  
  975.                  including it in an EXPORTS
  976.                                     EXPORTS
  977.                                     EXPORTS statement in the application's
  978.  
  979.                  module definition file.
  980.  
  981.  
  982.                  _________
  983.                  Parameter
  984.                  _________
  985.                  Parameter
  986.                  _________
  987.                  Parameter        ________________
  988.                                   Type/Description
  989.                                   ________________
  990.                                   Type/Description
  991.                                   ________________
  992.                                   Type/Description
  993.  
  994.                  hClient          HWND
  995.                                   HWND
  996.                                   HWND  Handle to a DDE session returned
  997.  
  998.                                   by DDEInitiate.
  999.  
  1000.  
  1001.                  iMessage         unsigned
  1002.                                   unsigned
  1003.                                   unsigned  A value indicating why the
  1004.  
  1005.                                   callback function was invoked.  See
  1006.  
  1007.                                   messages below.
  1008.  
  1009.                  lpszItem         LPSTR
  1010.                                   LPSTR
  1011.                                   LPSTR  Points to a character string that
  1012.  
  1013.                                   names the item whose value is currently
  1014.  
  1015.                                   being advised.  The string is a null
  1016.  
  1017.                                   terminated character string.
  1018.  
  1019.  
  1020.                  hData            HANDLE
  1021.                                   HANDLE
  1022.                                   HANDLE  A handle to a global memory
  1023.  
  1024.                                   object in the form of a DDEDATA
  1025.  
  1026.                                   structure for DDE_DATA messages.  It
  1027.  
  1028.                                   will be NULL if the fDeferUpd flag of
  1029.  
  1030.                                   the DDEADVISE strucure passed to
  1031.  
  1032.                                   DDEAdvise was TRUE.  It is also NULL for
  1033.  
  1034.                                   all other values of iMessage.  See Data
  1035.  
  1036.                                   Structure below.  __ ___ ____ ____
  1037.                                                     Do not free this
  1038.  
  1039.                                   ______ ______
  1040.                                   memory object.
  1041.  
  1042.          Messages:
  1043.  
  1044.  
  1045.                  The messages sent to the callback function contained in
  1046.  
  1047.                  iMessage are as follows:
  1048.  
  1049.                  _____
  1050.                  Value
  1051.                  _____
  1052.                  Value
  1053.                  _____
  1054.                  Value            ___________
  1055.                                   Description
  1056.                                   ___________
  1057.                                   Description
  1058.                                   ___________
  1059.                                   Description
  1060.  
  1061.  
  1062.                  DDE_ACK          First message sent when the circuit
  1063.  
  1064.                                   opens successfully.  hData is NULL.
  1065.  
  1066.                  DDE_DATA         One message sent each time the server
  1067.  
  1068.                                   advises the client of the new data.
  1069.  
  1070.  
  1071.                  DDE_TERMINATE    Sent when the circuit is closing or if
  1072.  
  1073.                                   the circuit could not be established.
  1074.  
  1075.          Return Value:
  1076.  
  1077.  
  1078.                  The return value, defined as a WORD, is unused.
  1079.  
  1080.          Data Structure:
  1081.  
  1082.  
  1083.                  If the fDeferUpd flag in the DDEADVISE structure passed
  1084.  
  1085.                  to the DDEAdvise function was TRUE then hData will be
  1086.  
  1087.                  NULL.  cfFormat should be the format set in the DDEADVISE
  1088.  
  1089.                  structure passed to the DDEAdvise function.
  1090.  
  1091.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  1092.  
  1093.          Inc.  All rights reserved.  (517) 347-0800                 Page 7
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.                                                                 DDEUnadvise
  1101.  
  1102.  
  1103.          Syntax:
  1104.  
  1105.                  WORD FAR PASCAL DDEUnadvise (hClient, lpszItem)
  1106.  
  1107.                  Client applications use this function to request the
  1108.  
  1109.                  termination of an advise circuit for a particular data
  1110.  
  1111.                  item previously established by a call to the DDEAdvise
  1112.  
  1113.                  function.  This function returns after the server has
  1114.  
  1115.                  acknowledged the unadvise.
  1116.  
  1117.  
  1118.                  _________
  1119.                  Parameter
  1120.                  _________
  1121.                  Parameter
  1122.                  _________
  1123.                  Parameter        ________________
  1124.                                   Type/Description
  1125.                                   ________________
  1126.                                   Type/Description
  1127.                                   ________________
  1128.                                   Type/Description
  1129.  
  1130.                  hClient          HWND
  1131.                                   HWND
  1132.                                   HWND  Handle to a DDE session returned
  1133.  
  1134.                                   by DDEInitiate.
  1135.  
  1136.  
  1137.                  lpszItem         LPSTR
  1138.                                   LPSTR
  1139.                                   LPSTR  Points to a character string that
  1140.  
  1141.                                   names the requested item.  The string
  1142.  
  1143.                                   must be a null terminated character
  1144.  
  1145.                                   string.
  1146.  
  1147.          Return Value:
  1148.  
  1149.  
  1150.                  A word in the format of the DDEACK structure.  See
  1151.  
  1152.                  Appendix.
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  1185.  
  1186.          Inc.  All rights reserved.  (517) 347-0800                 Page 8
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.                                                                  DDERequest
  1194.  
  1195.  
  1196.          Syntax:
  1197.  
  1198.                  WORD DDERequest (hClient, lpszItem, cfFormat,
  1199.  
  1200.                    lpfnRequestCallBack)
  1201.  
  1202.                  Client applications use this function to request a
  1203.  
  1204.                  particular data item.  The server will respond to the
  1205.  
  1206.                  client by calling the lpfnRequestCallBack function.  This
  1207.  
  1208.                  function returns after the server has acknowledged the
  1209.  
  1210.                  request.
  1211.  
  1212.  
  1213.                  _________
  1214.                  Parameter
  1215.                  _________
  1216.                  Parameter
  1217.                  _________
  1218.                  Parameter        ________________
  1219.                                   Type/Description
  1220.                                   ________________
  1221.                                   Type/Description
  1222.                                   ________________
  1223.                                   Type/Description
  1224.  
  1225.                  hClient          HWND
  1226.                                   HWND
  1227.                                   HWND  Handle to a DDE session returned
  1228.  
  1229.                                   by DDEInitiate.
  1230.  
  1231.  
  1232.                  lpszItem         LPSTR
  1233.                                   LPSTR
  1234.                                   LPSTR  Points to a character string that
  1235.  
  1236.                                   names the requested item.  The string
  1237.  
  1238.                                   must be a null terminated character
  1239.  
  1240.                                   string.
  1241.  
  1242.                  cfFormat         WORD
  1243.                                   WORD
  1244.                                   WORD  should be set to a valid clipboard
  1245.  
  1246.                                   format, such as CF_TEXT, identifying the
  1247.  
  1248.                                   format of the data requested.
  1249.  
  1250.  
  1251.                  lpfnRequestCallBack   DDECALLBACK
  1252.                                        DDECALLBACK
  1253.                                        DDECALLBACK  Is the procedure
  1254.  
  1255.                                   instance of the callback function that
  1256.  
  1257.                                   is invoked when the server responds with
  1258.  
  1259.                                   the data.  See Callback Function below.
  1260.  
  1261.          Return Value:
  1262.  
  1263.  
  1264.                  A word in the format of the DDEACK structure.  See
  1265.  
  1266.                  Appendix.
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  1290.  
  1291.          Inc.  All rights reserved.  (517) 347-0800                 Page 9
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.          Callback Function:
  1300.  
  1301.                  WORD FAR PASCAL Request (hClient, iMessage, lpszItem,
  1302.  
  1303.                    hData)
  1304.  
  1305.                  Request is a placeholder for the application-supplied
  1306.  
  1307.                  function name.  The actual name must be exported by
  1308.  
  1309.                  including it in an EXPORTS
  1310.                                     EXPORTS
  1311.                                     EXPORTS statement in the application's
  1312.  
  1313.                  module definition file.
  1314.  
  1315.  
  1316.                  _________
  1317.                  Parameter
  1318.                  _________
  1319.                  Parameter
  1320.                  _________
  1321.                  Parameter        ________________
  1322.                                   Type/Description
  1323.                                   ________________
  1324.                                   Type/Description
  1325.                                   ________________
  1326.                                   Type/Description
  1327.  
  1328.                  hClient          HWND
  1329.                                   HWND
  1330.                                   HWND  Handle to a DDE session returned
  1331.  
  1332.                                   by DDEInitiate.
  1333.  
  1334.  
  1335.                  iMessage         unsigned
  1336.                                   unsigned
  1337.                                   unsigned  A value indicating why the
  1338.  
  1339.                                   callback function was invoked.  See
  1340.  
  1341.                                   messages below.
  1342.  
  1343.                  lpszItem         LPSTR
  1344.                                   LPSTR
  1345.                                   LPSTR  Points to a character string that
  1346.  
  1347.                                   names the item whose value is currently
  1348.  
  1349.                                   being requested.  The string is a null
  1350.  
  1351.                                   terminated character string.
  1352.  
  1353.  
  1354.                  hData            HANDLE
  1355.                                   HANDLE
  1356.                                   HANDLE  A handle to a global memory
  1357.  
  1358.                                   object in the form of a DDEDATA
  1359.  
  1360.                                   structure for DDE_DATA messages.
  1361.  
  1362.                                   Otherwise, it is NULL.  See Data
  1363.  
  1364.                                   Structure below.  __ ___ ____ ____
  1365.                                                     Do not free this
  1366.  
  1367.                                   ______ ______
  1368.                                   memory object.
  1369.  
  1370.          Messages:
  1371.  
  1372.  
  1373.                  The messages sent to the callback function contained in
  1374.  
  1375.                  iMessage are as follows:
  1376.  
  1377.                  _____
  1378.                  Value
  1379.                  _____
  1380.                  Value
  1381.                  _____
  1382.                  Value            ___________
  1383.                                   Description
  1384.                                   ___________
  1385.                                   Description
  1386.                                   ___________
  1387.                                   Description
  1388.  
  1389.  
  1390.                  DDE_DATA         Sent if the server fulfilled the request
  1391.  
  1392.                                   and is providing the data.
  1393.  
  1394.                  DDE_TERMINATE    Sent if the server could not fulfill the
  1395.  
  1396.                                   request and hence no data is available.
  1397.  
  1398.                                   hData is NULL.
  1399.  
  1400.  
  1401.          Return Value:
  1402.  
  1403.                  The return value, defined as a WORD, is unused.
  1404.  
  1405.  
  1406.          Data Structure:
  1407.  
  1408.                  cfFormat is the format requested in the DDERequest
  1409.  
  1410.                  function.
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  1420.  
  1421.          Inc.  All rights reserved.  (517) 347-0800                Page 10
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.                                                                     DDEPoke
  1429.  
  1430.  
  1431.          Syntax:
  1432.  
  1433.                  WORD FAR PASCAL DDEPoke (hClient, lpszItem, hPoke)
  1434.  
  1435.                  Client applications use this function to send,
  1436.  
  1437.                  unsolicited, a particular data item to the server.  This
  1438.  
  1439.                  function returns after the server has acknowledged the
  1440.  
  1441.                  poke.
  1442.  
  1443.  
  1444.                  _________
  1445.                  Parameter
  1446.                  _________
  1447.                  Parameter
  1448.                  _________
  1449.                  Parameter        ________________
  1450.                                   Type/Description
  1451.                                   ________________
  1452.                                   Type/Description
  1453.                                   ________________
  1454.                                   Type/Description
  1455.  
  1456.                  hClient          HWND
  1457.                                   HWND
  1458.                                   HWND  Handle to a DDE session returned
  1459.  
  1460.                                   by DDEInitiate.
  1461.  
  1462.  
  1463.                  lpszItem         LPSTR
  1464.                                   LPSTR
  1465.                                   LPSTR  Points to a character string that
  1466.  
  1467.                                   names the item whose data is being sent.
  1468.  
  1469.                                   The string must be a null terminated
  1470.  
  1471.                                   character string.
  1472.  
  1473.                  hPoke            HANDLE
  1474.                                   HANDLE
  1475.                                   HANDLE  A handle to a global memory
  1476.  
  1477.                                   object in the form of a DDEPOKE
  1478.  
  1479.                                   structure.  It must have been allocated
  1480.  
  1481.                                   with GlobalAlloc using the GMEM_DDESHARE
  1482.  
  1483.                                   flag.  See Poke Structure below.
  1484.  
  1485.  
  1486.          Return Value:
  1487.  
  1488.                  A word in the format of the DDEACK structure.  See
  1489.  
  1490.                  Appendix.
  1491.  
  1492.  
  1493.          Poke Structure:
  1494.  
  1495.                  Set fRelease to TRUE to cause the server to free the
  1496.  
  1497.                  memory object.  Otherwise, it is the client application's
  1498.  
  1499.                  responsibility to free the memory object.  Set cfFormat
  1500.  
  1501.                  to a valid clipboard format, such as CF_TEXT, identifying
  1502.  
  1503.                  the format of the data being sent.
  1504.  
  1505.  
  1506.          Comments:
  1507.  
  1508.                  Even if fRelease has been set to TRUE in the DDEPOKE
  1509.  
  1510.                  structure, it is still the client application's
  1511.  
  1512.                  responsibility to free the memory object if the poke
  1513.  
  1514.                  fails.  This can be determined by examining fAck in the
  1515.  
  1516.                  return value.  It will be FALSE if the poke failed.
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  1531.  
  1532.          Inc.  All rights reserved.  (517) 347-0800                Page 11
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.                                                                  DDEExecute
  1540.  
  1541.  
  1542.          Syntax:
  1543.  
  1544.                  WORD FAR PASCAL DDEExecute (hClient, hCommand)
  1545.  
  1546.                  Client applications use this function to send,
  1547.  
  1548.                  unsolicited, a particular command to the server.  This
  1549.  
  1550.                  function returns after the server has acknowledged the
  1551.  
  1552.                  command.
  1553.  
  1554.  
  1555.                  _________
  1556.                  Parameter
  1557.                  _________
  1558.                  Parameter
  1559.                  _________
  1560.                  Parameter        ________________
  1561.                                   Type/Description
  1562.                                   ________________
  1563.                                   Type/Description
  1564.                                   ________________
  1565.                                   Type/Description
  1566.  
  1567.                  hClient          HWND
  1568.                                   HWND
  1569.                                   HWND  Handle to a DDE session returned
  1570.  
  1571.                                   by DDEInitiate.
  1572.  
  1573.  
  1574.                  hCommand         HANDLE
  1575.                                   HANDLE
  1576.                                   HANDLE  A handle to a global memory
  1577.  
  1578.                                   object which contains a null terminated
  1579.  
  1580.                                   ASCII string of commands that the server
  1581.  
  1582.                                   should execute.  It must have been
  1583.  
  1584.                                   allocated with GlobalAlloc using the
  1585.  
  1586.                                   GMEM_DDESHARE flag.  Example: [open
  1587.  
  1588.                                   ("foo.xlm")] [run ("r1c1")].  ____
  1589.                                                                 This
  1590.  
  1591.                                   ______ ______ ____ __ _____ __ ___ ___
  1592.                                   memory object will be freed by the DDE
  1593.  
  1594.                                   _______
  1595.                                   Library.
  1596.  
  1597.          Return Value:
  1598.  
  1599.  
  1600.                  A word in the format of the DDEACK structure.  See
  1601.  
  1602.                  Appendix.
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  1631.  
  1632.          Inc.  All rights reserved.  (517) 347-0800                Page 12
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.                                                                DDETerminate
  1640.  
  1641.  
  1642.          Syntax:
  1643.  
  1644.                  WORD FAR PASCAL DDETerminate (hClient)
  1645.  
  1646.                  Client applications use this function to terminate a
  1647.  
  1648.                  session previously established DDEInitiate.  This
  1649.  
  1650.                  function invalidates the hClient handle which can no
  1651.  
  1652.                  longer be used.  This function returns after the server
  1653.  
  1654.                  has acknowledged the command.
  1655.  
  1656.  
  1657.                  _________
  1658.                  Parameter
  1659.                  _________
  1660.                  Parameter
  1661.                  _________
  1662.                  Parameter        ________________
  1663.                                   Type/Description
  1664.                                   ________________
  1665.                                   Type/Description
  1666.                                   ________________
  1667.                                   Type/Description
  1668.  
  1669.                  hClient          HWND
  1670.                                   HWND
  1671.                                   HWND  Handle to a DDE session returned
  1672.  
  1673.                                   by DDEInitiate.
  1674.  
  1675.  
  1676.          Return Value:
  1677.  
  1678.                  A word in the format of the DDEACK structure.  See
  1679.  
  1680.                  Appendix.
  1681.  
  1682.  
  1683.          Comments:
  1684.  
  1685.                  Advise circuits established with DDEAdvise do ___
  1686.                                                                not need to
  1687.  
  1688.                  be explicitly closed with a call to DDEUnadvise before
  1689.  
  1690.                  terminating a session.
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  1723.  
  1724.          Inc.  All rights reserved.  (517) 347-0800                Page 13
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.                                                            DDERegisterTopic
  1732.  
  1733.  
  1734.          Syntax:
  1735.  
  1736.                  HWND DDERegisterTopic (hOwner, lpszApp, lpszTopic,
  1737.  
  1738.                    lpfnTopicCallBack)
  1739.  
  1740.                  Server applications use this function to register its
  1741.  
  1742.                  services for a particular topic.  Any potential client
  1743.  
  1744.                  application can establish a session with this server by
  1745.  
  1746.                  issuing a DDEInitiate for this particular application and
  1747.  
  1748.                  topic.
  1749.  
  1750.  
  1751.                  _________
  1752.                  Parameter
  1753.                  _________
  1754.                  Parameter
  1755.                  _________
  1756.                  Parameter        ________________
  1757.                                   Type/Description
  1758.                                   ________________
  1759.                                   Type/Description
  1760.                                   ________________
  1761.                                   Type/Description
  1762.  
  1763.                  hOwner           HWND
  1764.                                   HWND
  1765.                                   HWND  Handle to the top level window of
  1766.  
  1767.                                   the application.
  1768.  
  1769.  
  1770.                  lpszApp          LPSTR
  1771.                                   LPSTR
  1772.                                   LPSTR  Points to a character string that
  1773.  
  1774.                                   names the name of the application
  1775.  
  1776.                                   providing the service.  The string must
  1777.  
  1778.                                   be a null terminated character string.
  1779.  
  1780.                  lpszTopic        LPSTR
  1781.                                   LPSTR
  1782.                                   LPSTR  Points to a character string that
  1783.  
  1784.                                   names the name of the topic that the
  1785.  
  1786.                                   application is servicing.  The string
  1787.  
  1788.                                   must be a null terminated character
  1789.  
  1790.                                   string.
  1791.  
  1792.  
  1793.                  lpfnTopicCallBackDDECALLBACK
  1794.                                   DDECALLBACK
  1795.                                   DDECALLBACK  Is the procedure instance
  1796.  
  1797.                                   of the callback function that is invoked
  1798.  
  1799.                                   each time a client requests a service.
  1800.  
  1801.                                   See Callback Function below.
  1802.  
  1803.          Return Value:
  1804.  
  1805.  
  1806.                  A handle to the created DDE topic server which is used in
  1807.  
  1808.                  subsequent server DDE function calls.  It is NULL if the
  1809.  
  1810.                  function is unsuccessful.
  1811.  
  1812.          Comments:
  1813.  
  1814.  
  1815.                  A server may register more than one topic by repeatedly
  1816.  
  1817.                  calling DDERegisterTopic.  Each invocation should (but is
  1818.  
  1819.                  not required to) use the same value for lpszApp.
  1820.  
  1821.                  The application can use the same callback function for
  1822.  
  1823.                  more than one topic.  Four functions:
  1824.  
  1825.                  DDEGetSessionAppAtom, DDEGetSessionAppName,
  1826.  
  1827.                  DDEGetSessionTopicAtom, and DDEGetSessionTopicName can be
  1828.  
  1829.                  used within the callback function to determine the
  1830.  
  1831.                  application and topic that a client is communicating
  1832.  
  1833.                  with.
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  1842.  
  1843.          Inc.  All rights reserved.  (517) 347-0800                Page 14
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.          Callback Function:
  1852.  
  1853.                  WORD FAR PASCAL Topic (hSession, iMessage, lpszItem,
  1854.  
  1855.                    hData)
  1856.  
  1857.                  Topic is a placeholder for the application-supplied
  1858.  
  1859.                  function name.  The actual name must be exported by
  1860.  
  1861.                  including it in an EXPORTS
  1862.                                     EXPORTS
  1863.                                     EXPORTS statement in the application's
  1864.  
  1865.                  module definition file.
  1866.  
  1867.  
  1868.                  _________
  1869.                  Parameter
  1870.                  _________
  1871.                  Parameter
  1872.                  _________
  1873.                  Parameter        ________________
  1874.                                   Type/Description
  1875.                                   ________________
  1876.                                   Type/Description
  1877.                                   ________________
  1878.                                   Type/Description
  1879.  
  1880.                  hSession         HWND
  1881.                                   HWND
  1882.                                   HWND  Handle that identifies a
  1883.  
  1884.                                   particular DDE session with a client.
  1885.  
  1886.                                   This is ___
  1887.                                           not the return value from
  1888.  
  1889.                                   DDERegisterTopic.
  1890.  
  1891.  
  1892.                  iMessage         unsigned
  1893.                                   unsigned
  1894.                                   unsigned  A value indicating why the
  1895.  
  1896.                                   callback function was invoked.  See
  1897.  
  1898.                                   messages below.
  1899.  
  1900.                  lpszItem         LPSTR
  1901.                                   LPSTR
  1902.                                   LPSTR  Points to a character string that
  1903.  
  1904.                                   names the item of interest.  This may be
  1905.  
  1906.                                   NULL for some messages.  The string is a
  1907.  
  1908.                                   null terminated character string.
  1909.  
  1910.  
  1911.                  hData            HANDLE
  1912.                                   HANDLE
  1913.                                   HANDLE  A handle to a global memory
  1914.  
  1915.                                   object in a form dependant on the
  1916.  
  1917.                                   message.  __ ___ ____ ____ ______
  1918.                                             Do not free this memory
  1919.  
  1920.                                   ______
  1921.                                   object.
  1922.  
  1923.          Return Value:
  1924.  
  1925.  
  1926.                  The return value is defined as a WORD.  For messages that
  1927.  
  1928.                  require a return value, fill this word using the format
  1929.  
  1930.                  of the DDEACK structure.  The DDEACK structure is defined
  1931.  
  1932.                  in the Appendix.  Each message value documented below
  1933.  
  1934.                  defines whether or not it requires a return value.
  1935.  
  1936.          Messages:
  1937.  
  1938.  
  1939.                  The messages sent to the callback function contained in
  1940.  
  1941.                  iMessage are as follows:
  1942.  
  1943.                  _____
  1944.                  Value
  1945.                  _____
  1946.                  Value
  1947.                  _____
  1948.                  Value            ___________
  1949.                                   Description
  1950.                                   ___________
  1951.                                   Description
  1952.                                   ___________
  1953.                                   Description
  1954.  
  1955.  
  1956.                  DDE_INITIATE     Message sent when a new client
  1957.  
  1958.                                   establishes a session.  lpszItem and
  1959.  
  1960.                                   hData are NULL.  The return value is not
  1961.  
  1962.                                   used.
  1963.  
  1964.                  DDE_TERMINATE    Message sent when a session with a
  1965.  
  1966.                                   client is being terminated.  lpszItem
  1967.  
  1968.                                   and hData are NULL.  The return value is
  1969.  
  1970.                                   not used.
  1971.  
  1972.  
  1973.                  DDE_POKE         Message sent when the client is offering
  1974.  
  1975.                                   data for a particular item.  lpszItem
  1976.  
  1977.                                   contains the name of the item.  hData is
  1978.  
  1979.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  1980.  
  1981.          Inc.  All rights reserved.  (517) 347-0800                Page 15
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.                                   in the form of a DDEPOKE structure.
  1989.  
  1990.                                   Make sure to set fAck and fBusy in the
  1991.  
  1992.                                   return value since it is used.
  1993.  
  1994.  
  1995.                  DDE_REQUEST      Message sent when the client is
  1996.  
  1997.                                   requesting a one time data transfer for
  1998.  
  1999.                                   a particular item.  lpszItem contains
  2000.  
  2001.                                   the name of the item.  hData is in the
  2002.  
  2003.                                   form of a DDEADVISE structure.  Check
  2004.  
  2005.                                   cfFormat.  No need to check fRelease or
  2006.  
  2007.                                   fAckReq.  __ ___ ____ ____ ______
  2008.                                             Do not free this memory
  2009.  
  2010.                                   _______
  2011.                                   object.  Make sure to set fAck and fBusy
  2012.  
  2013.                                   in the return value since it is used.
  2014.  
  2015.                                   If fAck is TRUE the server is ________
  2016.                                                                 required
  2017.  
  2018.                                   to send the data using DDESendData.
  2019.  
  2020.                  DDE_EXECUTE      Message sent when the client is
  2021.  
  2022.                                   requesting the execution of a command
  2023.  
  2024.                                   string.  lpszItem is NULL.  hData is
  2025.  
  2026.                                   simply a null terminated ASCII string.
  2027.  
  2028.                                   Make sure to set fAck and fBusy in the
  2029.  
  2030.                                   return value since it is used.
  2031.  
  2032.  
  2033.                  DDE_ADVISE       Message sent when the client is
  2034.  
  2035.                                   requesting a continuous data transfer
  2036.  
  2037.                                   for a particular item whenever its value
  2038.  
  2039.                                   changes.  lpszItem contains the name of
  2040.  
  2041.                                   the item.  hData is in the form of a
  2042.  
  2043.                                   DDEADVISE structure.  Check fAckReq,
  2044.  
  2045.                                   fDeferUpd, and cfFormat.  __ ___ ____
  2046.                                                             Do not free
  2047.  
  2048.                                   ____ ______ _______
  2049.                                   this memory object.  Make sure to set
  2050.  
  2051.                                   fAck and fBusy in the return value since
  2052.  
  2053.                                   it is used.  If fAck is TRUE the server
  2054.  
  2055.                                   should send advise data using
  2056.  
  2057.                                   DDESendData.
  2058.  
  2059.                  DDE_UNADVISE     Message sent when the client is
  2060.  
  2061.                                   requesting a continuous data transfer to
  2062.  
  2063.                                   be terminated for a particular item.
  2064.  
  2065.                                   lpszItem contains the name of the item.
  2066.  
  2067.                                   hData is NULL.  Make sure to set fAck
  2068.  
  2069.                                   and fBusy in the return value since it
  2070.  
  2071.                                   is used.
  2072.  
  2073.  
  2074.  
  2075.  
  2076.  
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  2085.  
  2086.          Inc.  All rights reserved.  (517) 347-0800                Page 16
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.                                                        DDEGetSessionAppAtom
  2094.  
  2095.  
  2096.          Syntax:
  2097.  
  2098.                  ATOM DDEGetSessionAppAtom (hSession)
  2099.  
  2100.                  Server applications use this function to determine the
  2101.  
  2102.                  application name that the client has used to communicate
  2103.  
  2104.                  with it.  This is useful if the same callback function
  2105.  
  2106.                  has been passed to multiple calls to DDERegisterTopic.
  2107.  
  2108.  
  2109.                  _________
  2110.                  Parameter
  2111.                  _________
  2112.                  Parameter
  2113.                  _________
  2114.                  Parameter        ________________
  2115.                                   Type/Description
  2116.                                   ________________
  2117.                                   Type/Description
  2118.                                   ________________
  2119.                                   Type/Description
  2120.  
  2121.                  hSession         HWND
  2122.                                   HWND
  2123.                                   HWND  Handle that identifies a
  2124.  
  2125.                                   particular DDE session with a client
  2126.  
  2127.                                   identified as the first parameter of the
  2128.  
  2129.                                   callback function registered by
  2130.  
  2131.                                   DDERegisterTopic.  This is ___
  2132.                                                              not the
  2133.  
  2134.                                   return value from DDERegisterTopic.
  2135.  
  2136.  
  2137.          Return Value:
  2138.  
  2139.                  An atom value (integer) representing the application
  2140.  
  2141.                  name.  Use GlobalGetAtomName or DDEGetSessionAppName to
  2142.  
  2143.                  retrieve the actual string.
  2144.  
  2145.  
  2146.  
  2147.                                                        DDEGetSessionAppName
  2148.  
  2149.  
  2150.          Syntax:
  2151.  
  2152.                  int DDEGetSessionAppName (hSession, lpszApp, nSize)
  2153.  
  2154.                  Server applications use this function to determine the
  2155.  
  2156.                  application name that the client has used to communicate
  2157.  
  2158.                  with it.  This is useful if the same callback function
  2159.  
  2160.                  has been passed to multiple calls to DDERegisterTopic.
  2161.  
  2162.  
  2163.                  _________
  2164.                  Parameter
  2165.                  _________
  2166.                  Parameter
  2167.                  _________
  2168.                  Parameter        ________________
  2169.                                   Type/Description
  2170.                                   ________________
  2171.                                   Type/Description
  2172.                                   ________________
  2173.                                   Type/Description
  2174.  
  2175.                  hSession         HWND
  2176.                                   HWND
  2177.                                   HWND  Handle that identifies a
  2178.  
  2179.                                   particular DDE session with a client
  2180.  
  2181.                                   identified as the first parameter of the
  2182.  
  2183.                                   callback function registered by
  2184.  
  2185.                                   DDERegisterTopic.  This is ___
  2186.                                                              not the
  2187.  
  2188.                                   return value from DDERegisterTopic.
  2189.  
  2190.  
  2191.                  lpszApp          LPSTR
  2192.                                   LPSTR
  2193.                                   LPSTR  Points to a character string to
  2194.  
  2195.                                   receive the name of the application.
  2196.  
  2197.                                   The string will be a null terminated
  2198.  
  2199.                                   character string.
  2200.  
  2201.                  nSize            int
  2202.                                   int
  2203.                                   int  Specifies the maximum size (in
  2204.  
  2205.                                   bytes) of the buffer pointed to by
  2206.  
  2207.                                   lpszApp.
  2208.  
  2209.  
  2210.          Return Value:
  2211.  
  2212.                  The return value specifies the actual number of bytes
  2213.  
  2214.                  copied to the buffer.
  2215.  
  2216.  
  2217.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  2218.  
  2219.          Inc.  All rights reserved.  (517) 347-0800                Page 17
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.                                                      DDEGetSessionTopicAtom
  2227.  
  2228.  
  2229.          Syntax:
  2230.  
  2231.                  ATOM DDEGetSessionTopicAtom (hSession)
  2232.  
  2233.                  Server applications use this function to determine the
  2234.  
  2235.                  topic name that the client has used to communicate with
  2236.  
  2237.                  it.  This is useful if the same callback function has
  2238.  
  2239.                  been passed to multiple calls to DDERegisterTopic.
  2240.  
  2241.  
  2242.                  _________
  2243.                  Parameter
  2244.                  _________
  2245.                  Parameter
  2246.                  _________
  2247.                  Parameter        ________________
  2248.                                   Type/Description
  2249.                                   ________________
  2250.                                   Type/Description
  2251.                                   ________________
  2252.                                   Type/Description
  2253.  
  2254.                  hSession         HWND
  2255.                                   HWND
  2256.                                   HWND  Handle that identifies a
  2257.  
  2258.                                   particular DDE session with a client
  2259.  
  2260.                                   identified as the first parameter of the
  2261.  
  2262.                                   callback function registered by
  2263.  
  2264.                                   DDERegisterTopic.  This is ___
  2265.                                                              not the
  2266.  
  2267.                                   return value from DDERegisterTopic.
  2268.  
  2269.  
  2270.          Return Value:
  2271.  
  2272.                  An atom value (integer) representing the topic name.  Use
  2273.  
  2274.                  GlobalGetAtomName or DDEGetSessionTopicName to retrieve
  2275.  
  2276.                  the actual string.
  2277.  
  2278.  
  2279.  
  2280.                                                      DDEGetSessionTopicName
  2281.  
  2282.  
  2283.          Syntax:
  2284.  
  2285.                  int DDEGetSessionTopicName (hSession, lpszTopic, nSize)
  2286.  
  2287.                  Server applications use this function to determine the
  2288.  
  2289.                  topic name that the client has used to communicate with
  2290.  
  2291.                  it.  This is useful if the same callback function has
  2292.  
  2293.                  been passed to multiple calls to DDERegisterTopic.
  2294.  
  2295.  
  2296.                  _________
  2297.                  Parameter
  2298.                  _________
  2299.                  Parameter
  2300.                  _________
  2301.                  Parameter        ________________
  2302.                                   Type/Description
  2303.                                   ________________
  2304.                                   Type/Description
  2305.                                   ________________
  2306.                                   Type/Description
  2307.  
  2308.                  hSession         HWND
  2309.                                   HWND
  2310.                                   HWND  Handle that identifies a
  2311.  
  2312.                                   particular DDE session with a client
  2313.  
  2314.                                   identified as the first parameter of the
  2315.  
  2316.                                   callback function registered by
  2317.  
  2318.                                   DDERegisterTopic.  This is ___
  2319.                                                              not the
  2320.  
  2321.                                   return value from DDERegisterTopic.
  2322.  
  2323.  
  2324.                  lpszTopic        LPSTR
  2325.                                   LPSTR
  2326.                                   LPSTR  Points to a character string to
  2327.  
  2328.                                   receive the name of the topic.  The
  2329.  
  2330.                                   string will be a null terminated
  2331.  
  2332.                                   character string.
  2333.  
  2334.                  nSize            int
  2335.                                   int
  2336.                                   int  Specifies the maximum size (in
  2337.  
  2338.                                   bytes) of the buffer pointed to by
  2339.  
  2340.                                   lpszTopic.
  2341.  
  2342.  
  2343.          Return Value:
  2344.  
  2345.                  The return value specifies the actual number of bytes
  2346.  
  2347.                  copied to the buffer.
  2348.  
  2349.  
  2350.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  2351.  
  2352.          Inc.  All rights reserved.  (517) 347-0800                Page 18
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.                                                                 DDESendData
  2360.  
  2361.  
  2362.          Syntax:
  2363.  
  2364.                  HWND DDESendData (hSession, iMessage, lpszItem, hData)
  2365.  
  2366.                  Server applications use this function to send data to a
  2367.  
  2368.                  client application in direct response to a request
  2369.  
  2370.                  message or as a result of an advise circuit having been
  2371.  
  2372.                  established.  This function returns after the client has
  2373.  
  2374.                  acknowledged the data message if the bAckReq field in the
  2375.  
  2376.                  DDEDATA structure is TRUE.  Otherwise it will return
  2377.  
  2378.                  immediately after the message is sent.
  2379.  
  2380.  
  2381.                  _________
  2382.                  Parameter
  2383.                  _________
  2384.                  Parameter
  2385.                  _________
  2386.                  Parameter        ________________
  2387.                                   Type/Description
  2388.                                   ________________
  2389.                                   Type/Description
  2390.                                   ________________
  2391.                                   Type/Description
  2392.  
  2393.                  hSession         HWND
  2394.                                   HWND
  2395.                                   HWND  Handle that identifies a
  2396.  
  2397.                                   particular DDE session with a client
  2398.  
  2399.                                   identified as the first parameter of the
  2400.  
  2401.                                   callback function registered by
  2402.  
  2403.                                   DDERegisterTopic.  This is ___
  2404.                                                              not the
  2405.  
  2406.                                   return value from DDERegisterTopic.
  2407.  
  2408.  
  2409.                  iMessage         unsigned
  2410.                                   unsigned
  2411.                                   unsigned  A value indicating the reason
  2412.  
  2413.                                   the data is being sent to the client.
  2414.  
  2415.                                   Set this value to DDE_REQUEST if the
  2416.  
  2417.                                   data is in response to a request
  2418.  
  2419.                                   message, otherwise set it to DDE_ADVISE.
  2420.  
  2421.                  lpszItem         LPSTR
  2422.                                   LPSTR
  2423.                                   LPSTR  Points to a character string that
  2424.  
  2425.                                   names the item whose data is being sent.
  2426.  
  2427.                                   The string must be a null terminated
  2428.  
  2429.                                   character string.
  2430.  
  2431.  
  2432.                  hData            HANDLE
  2433.                                   HANDLE
  2434.                                   HANDLE  A handle to a global memory
  2435.  
  2436.                                   object in the form of a DDEDATA
  2437.  
  2438.                                   structure.  It must have been allocated
  2439.  
  2440.                                   with GlobalAlloc using the GMEM_DDESHARE
  2441.  
  2442.                                   flag.  See Data Structure below.
  2443.  
  2444.          Return Value:
  2445.  
  2446.  
  2447.                  A word in the format of the DDEACK structure.  See
  2448.  
  2449.                  Appendix.
  2450.  
  2451.          Data Structure:
  2452.  
  2453.  
  2454.                  If this data is sent in response to an advise message,
  2455.  
  2456.                  set fAckReq to the same value as the fAckReq field of the
  2457.  
  2458.                  DDEADVISE structure sent previously by the client.  If
  2459.  
  2460.                  this data is sent in response to a request message
  2461.  
  2462.                  fAckReq may be set to either TRUE or FALSE.  See the
  2463.  
  2464.                  appendix for more information.  Set fRelease to TRUE if
  2465.  
  2466.                  the client should free the memory object.  Otherwise, it
  2467.  
  2468.                  is the server application's responsibility to free the
  2469.  
  2470.                  memory object.  Set cfFormat to a valid clipboard format
  2471.  
  2472.                  such as CF_TEXT.
  2473.  
  2474.  
  2475.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  2476.  
  2477.          Inc.  All rights reserved.  (517) 347-0800                Page 19
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.                  Never set both fAckReq and fRelease to FALSE, since it
  2485.  
  2486.                  would be the server applications responsibility to free
  2487.  
  2488.                  the memory object but it would not have a way of knowing
  2489.  
  2490.                  when the client application had completed processing the
  2491.  
  2492.                  data.
  2493.  
  2494.  
  2495.          Comments:
  2496.  
  2497.                  Even if fRelease has been set to TRUE in the DDEDATA
  2498.  
  2499.                  structure, it is still the server application's
  2500.  
  2501.                  responsibility to free the memory object if the send
  2502.  
  2503.                  fails.  This can be determined by examining fAck in the
  2504.  
  2505.                  return value.  It will be FALSE if the send failed.
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  2548.  
  2549.          Inc.  All rights reserved.  (517) 347-0800                Page 20
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.                                                           DDERegisterAdvise
  2557.  
  2558.  
  2559.          Syntax:
  2560.  
  2561.                  HANDLE DDERegisterAdvise (hList, hSession, lpszItem,
  2562.  
  2563.                    fAckReq, fDeferUpd, cfFormat)
  2564.  
  2565.                  Server applications use this function to record
  2566.  
  2567.                  information about a new advise circuit in response to an
  2568.  
  2569.                  advise message.  This function appends the new advise
  2570.  
  2571.                  circuit information to the list indicated by hList.
  2572.  
  2573.  
  2574.                  _________
  2575.                  Parameter
  2576.                  _________
  2577.                  Parameter
  2578.                  _________
  2579.                  Parameter        ________________
  2580.                                   Type/Description
  2581.                                   ________________
  2582.                                   Type/Description
  2583.                                   ________________
  2584.                                   Type/Description
  2585.  
  2586.                  hList            HANDLE
  2587.                                   HANDLE
  2588.                                   HANDLE  Handle that identifies the list
  2589.  
  2590.                                   of advise circuits that this new advise
  2591.  
  2592.                                   should be appended to.  This is the
  2593.  
  2594.                                   return value from a previous call to
  2595.  
  2596.                                   DDERegisterAdvise or
  2597.  
  2598.                                   DDEUnregisterAdvise.  If this parameter
  2599.  
  2600.                                   is NULL a new list will be created.
  2601.  
  2602.                                   Upon return from this function, the
  2603.  
  2604.                                   value of hList will no longer be valid
  2605.  
  2606.                                   and should be replaced by the return
  2607.  
  2608.                                   value.
  2609.  
  2610.  
  2611.                  hSession         HWND
  2612.                                   HWND
  2613.                                   HWND  Handle that identifies a
  2614.  
  2615.                                   particular DDE session with a client
  2616.  
  2617.                                   identified as the first parameter of the
  2618.  
  2619.                                   callback function registered by
  2620.  
  2621.                                   DDERegisterTopic.  This is ___
  2622.                                                              not the
  2623.  
  2624.                                   return value from DDERegisterTopic.
  2625.  
  2626.                  lpszItem         LPSTR
  2627.                                   LPSTR
  2628.                                   LPSTR  Points to a character string that
  2629.  
  2630.                                   names the item of the advise circuit.
  2631.  
  2632.                                   The string must be a null terminated
  2633.  
  2634.                                   character string.
  2635.  
  2636.  
  2637.                  fAckReq          int
  2638.                                   int
  2639.                                   int  This should be set to the fAckReq
  2640.  
  2641.                                   field in the DDEADVISE structure passed
  2642.  
  2643.                                   to the callback function registered by
  2644.  
  2645.                                   DDERegisterTopic.
  2646.  
  2647.                  fDeferUpd        int
  2648.                                   int
  2649.                                   int  This should be set to the fDeferUpd
  2650.  
  2651.                                   field in the DDEADVISE structure passed
  2652.  
  2653.                                   to the callback function registered by
  2654.  
  2655.                                   DDERegisterTopic.
  2656.  
  2657.  
  2658.                  cfFormat         int
  2659.                                   int
  2660.                                   int  This should be set to the cfFormat
  2661.  
  2662.                                   field in the DDEADVISE structure passed
  2663.  
  2664.                                   to the callback function registered by
  2665.  
  2666.                                   DDERegisterTopic.
  2667.  
  2668.          Return Value:
  2669.  
  2670.  
  2671.                  A handle to the newly created advise list in the case
  2672.  
  2673.                  that hList is NULL, and a handle to the modified advise
  2674.  
  2675.                  list in the case that hList was not NULL.
  2676.  
  2677.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  2678.  
  2679.          Inc.  All rights reserved.  (517) 347-0800                Page 21
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.          Comments:
  2687.  
  2688.  
  2689.                  Make sure not to re-use the value of hList but to use the
  2690.  
  2691.                  return value from the function instead.
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  2742.  
  2743.          Inc.  All rights reserved.  (517) 347-0800                Page 22
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.                                                                DDEGetAdvise
  2751.  
  2752.  
  2753.          Syntax:
  2754.  
  2755.                  HANDLE DDEGetAdvise (hList, nItem, lphSession, lpszItem,
  2756.  
  2757.                    nItemLen, lpfAckReq, lpfDeferUpd, lpcfFormat)
  2758.  
  2759.                  Server applications use this function to recall
  2760.  
  2761.                  information about outstanding advise circuits from the
  2762.  
  2763.                  list indicated by hList.  This is useful to check if any
  2764.  
  2765.                  clients have registered an advise circuit on an item that
  2766.  
  2767.                  the server application has determined to have changed.
  2768.  
  2769.                  The return information is useful for calling DDESendData.
  2770.  
  2771.  
  2772.                  _________
  2773.                  Parameter
  2774.                  _________
  2775.                  Parameter
  2776.                  _________
  2777.                  Parameter        ________________
  2778.                                   Type/Description
  2779.                                   ________________
  2780.                                   Type/Description
  2781.                                   ________________
  2782.                                   Type/Description
  2783.  
  2784.                  hList            HANDLE
  2785.                                   HANDLE
  2786.                                   HANDLE  Handle that identifies the list
  2787.  
  2788.                                   of advise circuits to scan.  This is the
  2789.  
  2790.                                   return value from a previous call to
  2791.  
  2792.                                   DDERegisterAdvise or
  2793.  
  2794.                                   DDEUnregisterAdvise.
  2795.  
  2796.  
  2797.                  nItem            int
  2798.                                   int
  2799.                                   int  Index number of the advise circuit
  2800.  
  2801.                                   in hList.  To scan through all entries,
  2802.  
  2803.                                   repeatedly call this function with
  2804.  
  2805.                                   successively larger integer values for
  2806.  
  2807.                                   nItem, beginning at zero, until the
  2808.  
  2809.                                   return value indicates that the item
  2810.  
  2811.                                   does not exist.
  2812.  
  2813.                  lphSession       HWND FAR *
  2814.                                   HWND FAR *
  2815.                                   HWND FAR *  Pointer to variable to
  2816.  
  2817.                                   receive the hSession value previously
  2818.  
  2819.                                   passed to DDERegisterAdvise.
  2820.  
  2821.  
  2822.                  lpszItem         LPSTR
  2823.                                   LPSTR
  2824.                                   LPSTR  Pointer to variable to receive
  2825.  
  2826.                                   the lpszItem string previously passed to
  2827.  
  2828.                                   DDERegisterAdvise.
  2829.  
  2830.                  nItemLen         int
  2831.                                   int
  2832.                                   int  Specifies the maximum size (in
  2833.  
  2834.                                   bytes) of the buffer pointed to by
  2835.  
  2836.                                   lpszItem.
  2837.  
  2838.  
  2839.                  lpfAckReq        int FAR *
  2840.                                   int FAR *
  2841.                                   int FAR *  Pointer to variable to
  2842.  
  2843.                                   receive the fAckReq value previously
  2844.  
  2845.                                   passed to DDERegisterAdvise.
  2846.  
  2847.                  lpfDeferUpd      int FAR *
  2848.                                   int FAR *
  2849.                                   int FAR *  Pointer to variable to
  2850.  
  2851.                                   receive the fDeferUpd value previously
  2852.  
  2853.                                   passed to DDERegisterAdvise.
  2854.  
  2855.  
  2856.                  lpcfFormat       int FAR *
  2857.                                   int FAR *
  2858.                                   int FAR *  Pointer to variable to
  2859.  
  2860.                                   receive the cfFormat value previously
  2861.  
  2862.                                   passed to DDERegisterAdvise.
  2863.  
  2864.          Return Value:
  2865.  
  2866.  
  2867.                  The return value specifies the actual number of bytes
  2868.  
  2869.                  copied to the buffer.  It is -1 to indicate that no
  2870.  
  2871.                  advise entry exists for the specified nItem.
  2872.  
  2873.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  2874.  
  2875.          Inc.  All rights reserved.  (517) 347-0800                Page 23
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.          Comments:
  2883.  
  2884.  
  2885.                  As items are added and removed with DDERegisterAdvise and
  2886.  
  2887.                  DDEUnregisterAdvise the item number for a particular
  2888.  
  2889.                  advise will ___
  2890.                              not remain constant.
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.  
  2912.  
  2913.  
  2914.  
  2915.  
  2916.  
  2917.  
  2918.  
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.  
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938.  
  2939.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  2940.  
  2941.          Inc.  All rights reserved.  (517) 347-0800                Page 24
  2942.  
  2943.  
  2944.  
  2945.  
  2946.  
  2947.  
  2948.                                                         DDEUnregisterAdvise
  2949.  
  2950.  
  2951.          Syntax:
  2952.  
  2953.                  HANDLE DDEUnregisterAdvise (hList, hSession, lpszItem)
  2954.  
  2955.                  Server applications use this function to delete recorded
  2956.  
  2957.                  information about a terminated advise circuit in response
  2958.  
  2959.                  to an unadvise message.  This function removes the advise
  2960.  
  2961.                  circuit information from the list indicated by hList.
  2962.  
  2963.  
  2964.                  _________
  2965.                  Parameter
  2966.                  _________
  2967.                  Parameter
  2968.                  _________
  2969.                  Parameter        ________________
  2970.                                   Type/Description
  2971.                                   ________________
  2972.                                   Type/Description
  2973.                                   ________________
  2974.                                   Type/Description
  2975.  
  2976.                  hList            HANDLE
  2977.                                   HANDLE
  2978.                                   HANDLE  Handle that identifies the list
  2979.  
  2980.                                   of advise circuits that this advise
  2981.  
  2982.                                   should be removed from.  This is the
  2983.  
  2984.                                   return value from a previous call to
  2985.  
  2986.                                   DDERegisterAdvise or
  2987.  
  2988.                                   DDEUnregisterAdvise.  Upon return from
  2989.  
  2990.                                   this function, the value of hList will
  2991.  
  2992.                                   no longer be valid and should be
  2993.  
  2994.                                   replaced by the return value.
  2995.  
  2996.  
  2997.                  hSession         HWND
  2998.                                   HWND
  2999.                                   HWND  Handle that identifies a
  3000.  
  3001.                                   particular DDE session with a client
  3002.  
  3003.                                   identified as the first parameter of the
  3004.  
  3005.                                   callback function registered by
  3006.  
  3007.                                   DDERegisterTopic.  This is ___
  3008.                                                              not the
  3009.  
  3010.                                   return value from DDERegisterTopic.  If
  3011.  
  3012.                                   this value is NULL, all advise circuits
  3013.  
  3014.                                   recorded in hList will be removed and
  3015.  
  3016.                                   the list will be freed.
  3017.  
  3018.                  lpszItem         LPSTR
  3019.                                   LPSTR
  3020.                                   LPSTR  Points to a character string that
  3021.  
  3022.                                   names the item of the advise circuit.
  3023.  
  3024.                                   The string must be a null terminated
  3025.  
  3026.                                   character string.  If this value is
  3027.  
  3028.                                   NULL, all advise circuits recorded in
  3029.  
  3030.                                   hList that belong to the specified
  3031.  
  3032.                                   hSession will be removed.
  3033.  
  3034.  
  3035.          Return Value:
  3036.  
  3037.                  A handle to the modified advise list.
  3038.  
  3039.  
  3040.          Comments:
  3041.  
  3042.                  Make sure not to re-use the value of hList but to use the
  3043.  
  3044.                  return value from the function instead.
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  3056.  
  3057.          Inc.  All rights reserved.  (517) 347-0800                Page 25
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.                                                          DDEUnregisterTopic
  3065.  
  3066.  
  3067.          Syntax:
  3068.  
  3069.                  HWND DDEUnregisterTopic (hServer)
  3070.  
  3071.                  Server applications use this function to unregister its
  3072.  
  3073.                  services for a particular topic.  This function will
  3074.  
  3075.                  first terminate all currently active sessions with
  3076.  
  3077.                  clients before returning.
  3078.  
  3079.  
  3080.                  _________
  3081.                  Parameter
  3082.                  _________
  3083.                  Parameter
  3084.                  _________
  3085.                  Parameter        ________________
  3086.                                   Type/Description
  3087.                                   ________________
  3088.                                   Type/Description
  3089.                                   ________________
  3090.                                   Type/Description
  3091.  
  3092.                  hServer          HWND
  3093.                                   HWND
  3094.                                   HWND  Handle to a DDE topic server
  3095.  
  3096.                                   established with DDERegisterTopic.
  3097.  
  3098.  
  3099.          Return Value:
  3100.  
  3101.                  A word in the format of the DDEACK structure.  See
  3102.  
  3103.                  Appendix.
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138.  
  3139.  
  3140.  
  3141.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  3142.  
  3143.          Inc.  All rights reserved.  (517) 347-0800                Page 26
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.                                                                    Appendix
  3151.  
  3152.  
  3153.          The DDEACK structure:
  3154.  
  3155.                  A word in the format of the DDEACK structure is returned
  3156.  
  3157.                  by all of the DDE library functions except DDEInitiate
  3158.  
  3159.                  and DDERegisterTopic.  The fields that are packed into
  3160.  
  3161.                  this word are described in the table below.
  3162.  
  3163.  
  3164.                  _____
  3165.                  Field
  3166.                  _____
  3167.                  Field
  3168.                  _____
  3169.                  Field            ________________
  3170.                                   Type/Description
  3171.                                   ________________
  3172.                                   Type/Description
  3173.                                   ________________
  3174.                                   Type/Description
  3175.  
  3176.                  fAck             unsigned:1
  3177.                                   unsigned:1
  3178.                                   unsigned:1  Boolean flag that is TRUE
  3179.  
  3180.                                   for a positive acknowledgement and FALSE
  3181.  
  3182.                                   for a negative (nack) acknowledgement.
  3183.  
  3184.  
  3185.                  fBusy            unsigned:1
  3186.                                   unsigned:1
  3187.                                   unsigned:1  Boolean flag that indicates
  3188.  
  3189.                                   the server could not process the request
  3190.  
  3191.                                   because it is currently busy.  This
  3192.  
  3193.                                   field only has meaning only if fAck is
  3194.  
  3195.                                   FALSE.
  3196.  
  3197.                  bAppReturnCode   unsigned:8
  3198.                                   unsigned:8
  3199.                                   unsigned:8  Can be set to any value
  3200.  
  3201.                                   desired for further interprocess status
  3202.  
  3203.                                   communications.  However, the DDE
  3204.  
  3205.                                   library functions also set this return
  3206.  
  3207.                                   code to indicated failures on their part
  3208.  
  3209.                                   as well.  See the table below.
  3210.  
  3211.  
  3212.                  The following table represents the values that the DDE
  3213.  
  3214.                  library functions may supply in the bAppReturnCode of the
  3215.  
  3216.                  DDEACK structure.
  3217.  
  3218.                  _____
  3219.                  Value
  3220.                  _____
  3221.                  Value
  3222.                  _____
  3223.                  Value            _______
  3224.                                   Meaning
  3225.                                   _______
  3226.                                   Meaning
  3227.                                   _______
  3228.                                   Meaning
  3229.  
  3230.  
  3231.                  DDE_OK           Function completed ok.
  3232.  
  3233.                  DDE_NACK         A nack was received.
  3234.  
  3235.  
  3236.                  DDE_BADHANDLE    The session handle passed to the
  3237.  
  3238.                                   function is invalid.
  3239.  
  3240.                  DDE_BADSTATE     The current state of communications can
  3241.  
  3242.                                   not perform the action requested by this
  3243.  
  3244.                                   function.
  3245.  
  3246.  
  3247.                  DDE_MEMORY       A memory allocation error occurred
  3248.  
  3249.                                   during the processing of this function.
  3250.  
  3251.                  DDE_BADITEM      The item passed to the function is
  3252.  
  3253.                                   invalid.
  3254.  
  3255.  
  3256.                  DDE_BADTOPIC     The topic passed to the function is
  3257.  
  3258.                                   invalid.
  3259.  
  3260.  
  3261.  
  3262.  
  3263.  
  3264.  
  3265.  
  3266.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  3267.  
  3268.          Inc.  All rights reserved.  (517) 347-0800                Page 27
  3269.  
  3270.  
  3271.  
  3272.  
  3273.  
  3274.  
  3275.  
  3276.          The DDEADVISE Structure:
  3277.  
  3278.                  The DDEAdvise structure, sent to the server from the
  3279.  
  3280.                  client, contains the following fields.
  3281.  
  3282.  
  3283.                  _____
  3284.                  Field
  3285.                  _____
  3286.                  Field
  3287.                  _____
  3288.                  Field            ________________
  3289.                                   Type/Description
  3290.                                   ________________
  3291.                                   Type/Description
  3292.                                   ________________
  3293.                                   Type/Description
  3294.  
  3295.                  fAckReq          unsigned:1
  3296.                                   unsigned:1
  3297.                                   unsigned:1  Boolean flag that is TRUE if
  3298.  
  3299.                                   the server is required to wait for an
  3300.  
  3301.                                   acknowledgement to be returned before
  3302.  
  3303.                                   sending another advise message.  The
  3304.  
  3305.                                   fAckReq field in the DDEDATA structure
  3306.  
  3307.                                   sent as part of the data message to the
  3308.  
  3309.                                   client ____
  3310.                                          must be set equal to this field
  3311.  
  3312.                                   by the server.
  3313.  
  3314.  
  3315.                  fDeferUpd        unsigned:1
  3316.                                   unsigned:1
  3317.                                   unsigned:1  Boolean flag that indicates
  3318.  
  3319.                                   the server should not send the DDEDATA
  3320.  
  3321.                                   structure when sending a data message.
  3322.  
  3323.                                   It is assumed that the client will send
  3324.  
  3325.                                   a request message to the server when it
  3326.  
  3327.                                   requires the actual data.
  3328.  
  3329.                  cfFormat         int
  3330.                                   int
  3331.                                   int  A valid clipboard format, such as
  3332.  
  3333.                                   CF_TEXT, identifying the format of data
  3334.  
  3335.                                   requested.
  3336.  
  3337.  
  3338.          The DDEDATA Structure:
  3339.  
  3340.                  The DDEData structure, sent to the client from the
  3341.  
  3342.                  server, contains the following fields.
  3343.  
  3344.  
  3345.                  _____
  3346.                  Field
  3347.                  _____
  3348.                  Field
  3349.                  _____
  3350.                  Field            ________________
  3351.                                   Type/Description
  3352.                                   ________________
  3353.                                   Type/Description
  3354.                                   ________________
  3355.                                   Type/Description
  3356.  
  3357.                  fAckReq          unsigned:1
  3358.                                   unsigned:1
  3359.                                   unsigned:1  Boolean flag that is TRUE if
  3360.  
  3361.                                   the client is required to send an
  3362.  
  3363.                                   acknowledgement back to the server.
  3364.  
  3365.  
  3366.                  fRelease         unsigned:1
  3367.                                   unsigned:1
  3368.                                   unsigned:1  Boolean flag that is TRUE if
  3369.  
  3370.                                   the client is expected to free the
  3371.  
  3372.                                   global memory object.
  3373.  
  3374.                  fResponse        unsigned:1
  3375.                                   unsigned:1
  3376.                                   unsigned:1  Boolean flag that is TRUE if
  3377.  
  3378.                                   the data message is in response to a
  3379.  
  3380.                                   request.  FALSE if the server initiated
  3381.  
  3382.                                   the transfer as a result of an
  3383.  
  3384.                                   established advise circuit.
  3385.  
  3386.  
  3387.                  cfFormat         int
  3388.                                   int
  3389.                                   int  A valid clipboard format, such as
  3390.  
  3391.                                   CF_TEXT, identifying the format of data
  3392.  
  3393.                                   sent.
  3394.  
  3395.                  Value            BYTE[n]
  3396.                                   BYTE[n]
  3397.                                   BYTE[n]  The data.
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  3405.  
  3406.          Inc.  All rights reserved.  (517) 347-0800                Page 28
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.          The DDEPOKE Structure:
  3415.  
  3416.                  The DDEPoke structure, sent to the server from the
  3417.  
  3418.                  client, contains the following fields.
  3419.  
  3420.  
  3421.                  _____
  3422.                  Field
  3423.                  _____
  3424.                  Field
  3425.                  _____
  3426.                  Field            ________________
  3427.                                   Type/Description
  3428.                                   ________________
  3429.                                   Type/Description
  3430.                                   ________________
  3431.                                   Type/Description
  3432.  
  3433.                  fRelease         unsigned:1
  3434.                                   unsigned:1
  3435.                                   unsigned:1  Boolean flag that is TRUE if
  3436.  
  3437.                                   the server is expected to free the
  3438.  
  3439.                                   global memory object.
  3440.  
  3441.  
  3442.                  cfFormat         int
  3443.                                   int
  3444.                                   int  A valid clipboard format, such as
  3445.  
  3446.                                   CF_TEXT, identifying the format of data
  3447.  
  3448.                                   sent.
  3449.  
  3450.                  Value            BYTE[n]
  3451.                                   BYTE[n]
  3452.                                   BYTE[n]  The data.
  3453.  
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481.  
  3482.  
  3483.  
  3484.  
  3485.  
  3486.  
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.          DDELIB - Copyright (C) September 17, 1990 Horizon Technologies
  3493.  
  3494.          Inc.  All rights reserved.  (517) 347-0800                Page 29