home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / datatl25.zip / DABOOK.Z / ejrexit.c < prev    next >
C/C++ Source or Header  |  1997-09-12  |  6KB  |  123 lines

  1. /*****************************************************************
  2. *
  3. *      IBM Confidential (IBM Confidential-Restricted when Combined
  4. *      with the Aggregated OCO Source Modules for this Program)
  5. *
  6. *      OCO Source Materials
  7. *
  8. *      IBM VisualAge DataAtlas
  9. *
  10. *      5648-A48
  11. *
  12. *      (C) COPYRIGHT IBM CORP 1996,1997
  13. *
  14. *      The source code for this program is not published or otherwise
  15. *      divested of its trade secrets, irrespective of what has been
  16. *      deposited with the U.S. Copyright Office.
  17. *
  18. ******************************************************************/
  19. /*==========================================================================*/
  20. /* EJREXIT.C           IBM BookManager Read for Windows                     */
  21. /*                                                                          */    
  22. /* USER EXIT ROUTINES - this "C" file is supplied as sample code for use    */
  23. /* with BookManager Read for Windows.  This code was used in the creation of*/    
  24. /* the user exit DLL - EJREXIT.DLL. As shipped this DLL will accept a call  */    
  25. /* to the user exit and provide a valid return code.  There is NO FUNCTION  */    
  26. /* provided.  Users that do not wish to use user exits must keep the        */    
  27. /* EJREXIT.DLL as Read for Windows will call the exits, but do not need     */    
  28. /* EJREXIT.H or EJREXIT.C which are only used to change the EJREXIT.DLL.    */    
  29. /*                                                                          */    
  30. /* Users wishing to make use of the supplied user exits must alter or       */    
  31. /* replace this file and use EJREXIT.H to create a Windows DLL file.  The   */    
  32. /* DLL MUST be named EJREXIT.DLL, must reside in the same directory as the  */
  33. /* original EJREXIT.DLL, and must provide valid entry points and valid      */
  34. /* return codes for each exit that exits in the original EJREXIT.DLL.       */
  35. /* Also, each user exit may have specific restrictions and/or requirements  */
  36. /* which should be fully understood before altering the code and rebuilding */
  37. /* the DLL.  IBM does not support user created or user altered code.        */
  38. /*                                                                          */    
  39. /*                                                                          */    
  40. /* See the documentation for complete information on creating and using     */    
  41. /* user exits with Read for Windows.                                        */    
  42. /*                                                                          */    
  43. /* MDW94                                                                    */    
  44. /*==========================================================================*/
  45. #include <windows.h>
  46. #include "ejrexit.h"
  47.  
  48. /* The WEP and LibMain functions below are required for DLL support and */
  49. /* should be left in place unless they will provided for by some other  */
  50. /* place unless the user intends to provide for these functions by some */
  51. /* other method.                                                        */
  52. int FAR PASCAL _export WEP (int);
  53.  
  54. int FAR PASCAL LibMain (HANDLE hInstance, WORD wDataSeg, 
  55.                         WORD wHeapSize, LPSTR lpszCmdLine)
  56.     {
  57.     if (wHeapSize > 0)
  58.         UnlockData (0);
  59.     return 1;
  60.     }
  61.  
  62. int FAR PASCAL _export WEP (int nParam)
  63.     {
  64.     return 1;
  65.     }
  66.         
  67. /* User exits are defined below.  The entry points are required to remain */
  68. /* as provided to insure compatibility with Read for Windows.  The        */
  69. /* functional code is open to the user.  Please note the requirements     */
  70. /* and see the user documentation for further information.                */
  71.  
  72. /* EJROpenBookExit - this exit is called whenever a book is opened for    */
  73. /*                   reading.  This exit accepts an EJRBOOKINFO struct    */
  74. /*                   as input, but provides only a return code to the     */
  75. /*                   caller.  The contents of pBookDataParm are static.   */
  76. /* NOTE: Though a valid value must be provided as a return, it will not   */
  77. /*     be used for any significant processing in this release of Read for */
  78. /*     Windows.                                                           */
  79. short FAR PASCAL _export EJROpenBookExit (struct EJRBOOKINFO pBookDataParm)
  80. {
  81.  
  82.     /* User Code is placed here */
  83.  
  84.     return 0;   /* A valid return value is required. */
  85. }
  86.  
  87.  
  88. /* EJRCloseBookExit - this exit is called whenever an open book is closed.*/
  89. /*                   This exit accepts an EJRBOOKINFO struct as input,    */
  90. /*                   but provides only a return code to the caller.       */
  91. /*                   The contents of pBookDataParm are static.            */
  92. /* NOTE: Though a valid value must be provided as a return, it will not   */
  93. /*    be used for any significant processing in this release of Read for  */
  94. /*    Windows.                                                            */
  95. short FAR PASCAL _export EJRCloseBookExit (struct EJRBOOKINFO pBookDataParm)
  96. {
  97.     /* User Code is placed here */
  98.  
  99.     return 0;   /* A valid return value is required. */
  100. }
  101.  
  102.  
  103. /* EJRSearchExit - this exit is called whenever a search is executed from */
  104. /*                 within a book.  It accepts an EJRSEARCHINFO struct     */
  105. /*                 as input, the values of which CAN BE ALTERED by this   */
  106. /*                 routine and are then returned to the caller along with */
  107. /*                 a return code.  NOTE: Read will use the returned       */
  108. /*                 search argument AS IS.  Only valid search strings      */
  109. /*                 should be returned.  The user is responsible for       */
  110. /*                 insuring the validity of the returned value.           */
  111. /* NOTE: Though a valid value must be provided as a return, it will not   */
  112. /*       used for any significant processing in this release of Read for  */
  113. /*       Windows.                                                         */
  114. short FAR PASCAL _export EJRSearchExit (struct EJRSEARCHINFO far * pSearchParm)
  115. {
  116.     /* User Code is placed here */
  117.  
  118.     return 0;   /* A valid return value is required. */
  119. }
  120.     
  121.     
  122.                    
  123.