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 / FWTaskG / Sources / FWWep.cpp < prev   
Encoding:
C/C++ Source or Header  |  1994-04-21  |  1.8 KB  |  72 lines  |  [TEXT/MPS ]

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