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.

72 lines
1.2 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. handle.c
  5. Abstract:
  6. This module implements handle checking code.
  7. Author:
  8. Silviu Calinoiu (SilviuC) 1-Mar-2001
  9. Revision History:
  10. --*/
  11. #include "pch.h"
  12. #include "verifier.h"
  13. #include "support.h"
  14. #include "faults.h"
  15. //NTSYSCALLAPI
  16. NTSTATUS
  17. NTAPI
  18. AVrfpNtClose(
  19. IN HANDLE Handle
  20. )
  21. {
  22. NTSTATUS Status;
  23. Status = NtClose (Handle);
  24. return Status;
  25. }
  26. //NTSYSCALLAPI
  27. NTSTATUS
  28. NTAPI
  29. AVrfpNtCreateEvent (
  30. OUT PHANDLE EventHandle,
  31. IN ACCESS_MASK DesiredAccess,
  32. IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
  33. IN EVENT_TYPE EventType,
  34. IN BOOLEAN InitialState
  35. )
  36. {
  37. NTSTATUS Status;
  38. BUMP_COUNTER (CNT_CREATE_EVENT_CALLS);
  39. if (SHOULD_FAULT_INJECT(CLS_EVENT_APIS)) {
  40. BUMP_COUNTER (CNT_CREATE_EVENT_FAILS);
  41. CHECK_BREAK (BRK_CREATE_EVENT_FAIL);
  42. return STATUS_NO_MEMORY;
  43. }
  44. Status = NtCreateEvent (EventHandle,
  45. DesiredAccess,
  46. ObjectAttributes,
  47. EventType,
  48. InitialState);
  49. return Status;
  50. }