Windows NT 4.0 source code leak
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.

81 lines
1.3 KiB

4 years ago
  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. disccode.h
  5. Abstract:
  6. This module implements the discardable code routines for the NT redirector
  7. Author:
  8. Larry Osterman (LarryO) 12-Nov-1993
  9. Revision History:
  10. 12-Nov-1993 LarryO
  11. Created
  12. --*/
  13. #ifndef _DISCCODE_
  14. #define _DISCCODE_
  15. typedef enum {
  16. RdrFileDiscardableSection,
  17. RdrVCDiscardableSection,
  18. RdrConnectionDiscardableSection,
  19. BowserDiscardableCodeSection,
  20. BowserNetlogonDiscardableCodeSection,
  21. RdrMaxDiscardableSection
  22. } DISCARDABLE_SECTION_NAME;
  23. VOID
  24. RdrReferenceDiscardableCode(
  25. IN DISCARDABLE_SECTION_NAME SectionName
  26. );
  27. VOID
  28. RdrDereferenceDiscardableCode(
  29. IN DISCARDABLE_SECTION_NAME SectionName
  30. );
  31. VOID
  32. RdrInitializeDiscardableCode(
  33. VOID
  34. );
  35. VOID
  36. RdrUninitializeDiscardableCode(
  37. VOID
  38. );
  39. typedef struct _RDR_SECTION {
  40. LONG ReferenceCount;
  41. BOOLEAN Locked;
  42. BOOLEAN TimerCancelled;
  43. PKTIMER Timer;
  44. KEVENT TimerDoneEvent;
  45. PVOID CodeBase;
  46. PVOID CodeHandle;
  47. PVOID DataBase;
  48. PVOID DataHandle;
  49. } RDR_SECTION, *PRDR_SECTION;
  50. extern
  51. RDR_SECTION
  52. RdrSectionInfo[];
  53. #define RdrIsDiscardableCodeReferenced(SectionName) \
  54. (BOOLEAN)((RdrSectionInfo[SectionName].ReferenceCount != 0) && \
  55. RdrSectionInfo[SectionName].Locked)
  56. #endif // _DISCCODE_