home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / Found / FWDebug / Sources / FWWep.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-21  |  1.7 KB  |  69 lines  |  [TEXT/MPS ]

  1. #if defined(FW_BUILD_WIN) && !defined(FW_BUILD_WIN32S) && !defined(FW_BUILD_WINNT)
  2. //========================================================================================
  3. //
  4. //    File:                FWWep.h
  5. //    Release Version:    $ 1.0d1 $
  6. //
  7. //    Creation Date:        3/28/94
  8. //
  9. //    Copyright:    © 1994 by Apple Computer, Inc., all rights reserved.
  10. //
  11. //========================================================================================
  12. /*
  13.  
  14. Some notes on WEP's that are not in the manuals:
  15.  
  16.  o    Some of the examples in the documentastion include the RESIDENTNAME
  17.     attribute on the WEP exports.  Althought documentation does not say so,
  18.     this is required.
  19.  
  20.  o    Although the documentation says that WEP's have no return valus, they really
  21.     do.  WEP's return a sucess/failure code: 1 of OK, 0 if failed.  What windows
  22.     does if a WEP fails is unknown.
  23.  
  24.  o    When a WEP is called when that calling application terminates (as opposed to
  25.     an UnloadLibrary call) it is called on a very small kernel stack.  There is
  26.     not enough space on this stack for the kernel to swap in a new segment.  Can
  27.     you say "kernel bug"?  Therefore WEP's must be in FIXED PRELOAD segments and
  28.     must be *extremly* cautious with stack usage.  The actual amount of stack
  29.     remaining is not known.
  30.  
  31. This information is from Microsoft technical support.
  32. */
  33.  
  34.  
  35. #ifdef CCOVER
  36. #  pragma cov-
  37. #endif
  38.  
  39. // Make sure WEP doesn't get mangled
  40.  
  41. extern "C"
  42. {
  43.   int  _far _pascal  WEP(int sys_exit);
  44.  
  45. #ifdef CCOVER
  46.   int  _far _cdecl   atexit(void);
  47.   void _far _cdecl   cov_write(void);
  48. #endif
  49. };
  50.  
  51.  
  52. int _far _pascal WEP(int sys_exit)
  53. {
  54. #ifdef CCOVER
  55.     cov_write();
  56. #endif
  57.  
  58.     return(1);
  59. }
  60.  
  61. #ifdef CCOVER
  62. int _far _cdecl atexit(void)
  63. {
  64.     return(0);
  65. }
  66. #endif
  67.  
  68. #endif
  69.