Source code of Windows XP (NT5)
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.

116 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. vrmisc.c
  5. Abstract:
  6. Contains miscellaneous VdmRedir (Vr) functions:
  7. VrTerminateDosProcess
  8. VrUnsupportedFunction
  9. Author:
  10. Richard L Firth (rfirth) 01-Oct-1991
  11. Environment:
  12. Flat 32-bit
  13. Revision History:
  14. 01-Oct-1991 rfirth
  15. Created
  16. --*/
  17. #include <nt.h>
  18. #include <ntrtl.h> // ASSERT, DbgPrint
  19. #include <nturtl.h>
  20. #include <windows.h>
  21. #include <softpc.h> // x86 virtual machine definitions
  22. #include <vrdlctab.h>
  23. #include <vdmredir.h> // common Vdm Redir stuff
  24. #include <vrmisc.h> // Vr miscellaneous prototypes
  25. #include <vrmslot.h> // Vr mailslot prototypes
  26. #include <vrnmpipe.h> // Vr named pipe prototypes
  27. #include "vrdebug.h" // debugging stuff
  28. VOID
  29. VrTerminateDosProcess(
  30. VOID
  31. )
  32. /*++
  33. Routine Description:
  34. When a Dos app terminates a NetResetEnvironment is sent to the redir so
  35. that it can clean up any state info left by the closing application. In
  36. our case control is passed here and we perform common cleanup operations
  37. like deleting any outstanding mailslots
  38. Arguments:
  39. AX = PDB of terminating DOS process
  40. Return Value:
  41. None.
  42. --*/
  43. {
  44. WORD DosPdb = getAX();
  45. #if DBG
  46. IF_DEBUG(NETAPI) {
  47. DbgPrint("VrTerminateDosProcess. PDB=%04x\n", DosPdb);
  48. }
  49. #endif
  50. VrTerminateMailslots(DosPdb);
  51. VrTerminateNamedPipes(DosPdb);
  52. }
  53. VOID
  54. VrUnsupportedFunction(
  55. VOID
  56. )
  57. /*++
  58. Routine Description:
  59. Default error routine for unsupported/not-yet-implemented functions
  60. Arguments:
  61. None.
  62. Return Value:
  63. None.
  64. Sets CF=1 in x86 context image and AX=ERROR_NOT_SUPPORTED (50)
  65. --*/
  66. {
  67. #if DBG
  68. DbgPrint("VrUnsupportedFunction\n");
  69. VrDumpRealMode16BitRegisters(TRUE);
  70. #endif
  71. SET_ERROR(ERROR_NOT_SUPPORTED);
  72. }