Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
904 B

  1. /*
  2. * dem.c - Main Module of DOS Emulation DLL.
  3. *
  4. * Sudeepb 09-Apr-1991 Craeted
  5. */
  6. #include "io.h"
  7. #include "dem.h"
  8. /* DemInit - DEM Initialiazation routine. (This name may change when DEM is
  9. * converted to DLL).
  10. *
  11. * Entry
  12. * None
  13. *
  14. * Exit
  15. * None
  16. */
  17. extern VOID dempInitLFNSupport(VOID);
  18. CHAR demDebugBuffer [256];
  19. #if DBG
  20. BOOL ToDebugOnF11 = FALSE;
  21. #endif
  22. VOID DemInit (VOID)
  23. {
  24. DWORD dw;
  25. // Modify default hard error handling
  26. // - turn off all file io related popups
  27. // - keep GP fault popups from system
  28. //
  29. SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
  30. dempInitLFNSupport();
  31. #if DBG
  32. if (!VDMForWOW) {
  33. #ifndef i386
  34. if( getenv( "YODA" ) != 0 )
  35. #else
  36. if( getenv( "DEBUGDOS" ) != 0 )
  37. #endif
  38. ToDebugOnF11 = TRUE;
  39. }
  40. #endif
  41. }