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.

186 lines
3.3 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. msgmgr.h
  5. Abstract:
  6. Declares the interface to the message manager. The message manager
  7. associates a message with a context and one or more objects (files,
  8. registry keys, or whatever). The objects can also be handled. At
  9. the end of Win9x-side processing, message manager enumerates all
  10. the messages and adds unhandled messages to the incompatibility
  11. report.
  12. This code was written by MikeCo. It does not conform to our coding
  13. standards, and is implemented inefficiently. Be very careful when
  14. fixing bugs in message manager.
  15. Author:
  16. Mike Condra (mikeco) 20-May-1997
  17. Revision History:
  18. jimschm 15-Jan-1999 Added HandleReportObject, cleaned up some formatting
  19. --*/
  20. #pragma once
  21. //
  22. // Function marks an object as "handled"
  23. //
  24. VOID
  25. HandleObject(
  26. IN PCTSTR Object,
  27. IN PCTSTR ObjectType
  28. );
  29. //
  30. // Function puts object in a list so that it appears in the short list view
  31. //
  32. VOID
  33. ElevateObject (
  34. IN PCTSTR Object
  35. );
  36. //
  37. // Function marks an object as "handled", but only for the incompatibility report
  38. //
  39. VOID
  40. HandleReportObject (
  41. IN PCTSTR Object
  42. );
  43. //
  44. // Function marks an object as "blocking"
  45. //
  46. VOID
  47. AddBlockingObject (
  48. IN PCTSTR Object
  49. );
  50. //
  51. // Function encodes a registry key and optional value name into a string
  52. // that can identify a Handleable Object.
  53. //
  54. PCTSTR
  55. EncodedObjectNameFromRegKey(
  56. PCTSTR Key,
  57. PCTSTR ValueName OPTIONAL
  58. );
  59. //
  60. // Function records a pairing between a link-target-type Handleable Object and
  61. // its description, taken from the name of a link to the target.
  62. //
  63. VOID
  64. LnkTargToDescription_Add(
  65. IN PCTSTR Target,
  66. IN PCTSTR Desc
  67. );
  68. //
  69. // PUBLIC ROUTINES: Intialization, deferred message resolution, cleanup.
  70. //
  71. //
  72. // Function allocates tables and whatever else is needed to support
  73. // deferred messaging, handled-object tracking, and contexts.
  74. //
  75. VOID
  76. MsgMgr_Init (
  77. VOID
  78. );
  79. //
  80. // Function associates a message with an object
  81. //
  82. VOID
  83. MsgMgr_ObjectMsg_Add(
  84. IN PCTSTR Object,
  85. IN PCTSTR Component,
  86. IN PCTSTR Msg
  87. );
  88. //
  89. // Function associates a message with a context. The context is created
  90. // when first mentioned in a call to this function.
  91. //
  92. VOID
  93. MsgMgr_ContextMsg_Add(
  94. IN PCTSTR Context,
  95. IN PCTSTR Component,
  96. IN PCTSTR Msg
  97. );
  98. //
  99. // Function makes a context message dependent on the handled state of an object.
  100. //
  101. VOID
  102. MsgMgr_LinkObjectWithContext(
  103. IN PCTSTR Context,
  104. IN PCTSTR Object
  105. );
  106. //
  107. // Function compares the set of handled objects with the set of deferred
  108. // messages; issues context messages if any of their objects remain unhandled:
  109. // issues object messages if the objects are unhandled.
  110. //
  111. VOID
  112. MsgMgr_Resolve (
  113. VOID
  114. );
  115. //
  116. // Function cleans up the data structures used by deferred messaging.
  117. //
  118. VOID
  119. MsgMgr_Cleanup (
  120. VOID
  121. );
  122. BOOL
  123. IsReportObjectIncompatible (
  124. IN PCTSTR Object
  125. );
  126. BOOL
  127. IsReportObjectHandled (
  128. IN PCTSTR Object
  129. );
  130. VOID
  131. MsgMgr_InitStringMap (
  132. VOID
  133. );
  134. typedef struct {
  135. BOOL Disabled;
  136. PCTSTR Object;
  137. PCTSTR Context;
  138. //
  139. // internal
  140. //
  141. INT Index;
  142. } MSGMGROBJENUM, *PMSGMGROBJENUM;
  143. BOOL
  144. MsgMgr_EnumFirstObject (
  145. OUT PMSGMGROBJENUM EnumPtr
  146. );
  147. BOOL
  148. MsgMgr_EnumNextObject (
  149. IN OUT PMSGMGROBJENUM EnumPtr
  150. );