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.

54 lines
1.9 KiB

  1. /****************************************************************************/
  2. // tssdshrd.h
  3. //
  4. // Terminal Server Session Directory Interface header. Contains constants
  5. // common between tssdjet and SD.
  6. //
  7. // Copyright (C) 2000 Microsoft Corporation
  8. /****************************************************************************/
  9. #define MY_STATUS_COMMITMENT_LIMIT (0xC000012DL)
  10. #define MAX_INSTANCE_MEMORYERR 20
  11. /****************************************************************************/
  12. // Static RPC Exception Filter structure and function, based on
  13. // I_RpcExceptionFilter in \nt\com\rpc\runtime\mtrt\clntapip.cxx.
  14. /****************************************************************************/
  15. // windows.h includes windef.h includes winnt.h, which defines some exceptions
  16. // but not others. ntstatus.h contains the two extra we want,
  17. // STATUS_POSSIBLE_DEADLOCK and STATUS_INSTRUCTION_MISALIGNMENT, but it would
  18. // be very difficult to get the right #includes in without a lot of trouble.
  19. #define STATUS_POSSIBLE_DEADLOCK 0xC0000194L
  20. #define STATUS_INSTRUCTION_MISALIGNMENT 0xC00000AAL
  21. const ULONG FatalExceptions[] =
  22. {
  23. STATUS_ACCESS_VIOLATION,
  24. STATUS_POSSIBLE_DEADLOCK,
  25. STATUS_INSTRUCTION_MISALIGNMENT,
  26. STATUS_DATATYPE_MISALIGNMENT,
  27. STATUS_PRIVILEGED_INSTRUCTION,
  28. STATUS_ILLEGAL_INSTRUCTION,
  29. STATUS_BREAKPOINT,
  30. STATUS_STACK_OVERFLOW
  31. };
  32. const int FATAL_EXCEPTIONS_ARRAY_SIZE = sizeof(FatalExceptions) /
  33. sizeof(FatalExceptions[0]);
  34. static int TSSDRpcExceptionFilter (unsigned long ExceptionCode)
  35. {
  36. int i;
  37. for (i = 0; i < FATAL_EXCEPTIONS_ARRAY_SIZE; i++) {
  38. if (ExceptionCode == FatalExceptions[i])
  39. return EXCEPTION_CONTINUE_SEARCH;
  40. }
  41. return EXCEPTION_EXECUTE_HANDLER;
  42. }