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.

191 lines
4.9 KiB

  1. /***************************************************************************\
  2. *
  3. * File: DUserError.h
  4. *
  5. * Description:
  6. * DUserError.h defines the DirectUser error values common across all of
  7. * DirectUser.
  8. *
  9. * Copyright (C) 2000 by Microsoft Corporation. All rights reserved.
  10. *
  11. \***************************************************************************/
  12. #if !defined(INC__DUserError_h__INCLUDED)
  13. #define INC__DUserError_h__INCLUDED
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #ifdef DUSER_EXPORTS
  18. #define DUSER_API
  19. #else
  20. #define DUSER_API __declspec(dllimport)
  21. #endif
  22. #define FACILITY_DUSER FACILITY_ITF
  23. #define MAKE_DUSUCCESS(code) MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_DUSER, code)
  24. #define MAKE_DUERROR(code) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_DUSER, code)
  25. /***************************************************************************\
  26. *
  27. * Error codes
  28. *
  29. \***************************************************************************/
  30. // Callback function definitions
  31. /*
  32. * Message was not handled at all.
  33. */
  34. #define DU_S_NOTHANDLED MAKE_DUSUCCESS(0)
  35. /*
  36. * Message was completely handled (stop bubbling).
  37. */
  38. #define DU_S_COMPLETE MAKE_DUSUCCESS(1)
  39. /*
  40. * Message was partially handled (continue bubbling).
  41. */
  42. #define DU_S_PARTIAL MAKE_DUSUCCESS(2)
  43. /*
  44. * Enumeration was successful but prematurely stopped by the enumeration
  45. * function
  46. */
  47. #define DU_S_STOPPEDENUMERATION MAKE_DUSUCCESS(10)
  48. /*
  49. * The operation was successful, but the object was already created.
  50. */
  51. #define DU_S_ALREADYEXISTS MAKE_DUSUCCESS(20)
  52. /*
  53. * There are not enough Kernel resources to perform the operation
  54. */
  55. #define DU_E_OUTOFKERNELRESOURCES MAKE_DUERROR(1)
  56. /*
  57. * There are not enough GDI resources to perform the operation
  58. */
  59. #define DU_E_OUTOFGDIRESOURCES MAKE_DUERROR(2)
  60. /*
  61. * Generic failure.
  62. */
  63. #define DU_E_GENERIC MAKE_DUERROR(10)
  64. /*
  65. * Generic failure.
  66. */
  67. #define DU_E_BUSY MAKE_DUERROR(11)
  68. /*
  69. * The Context has not been initialized with InitGadgets().
  70. */
  71. #define DU_E_NOCONTEXT MAKE_DUERROR(20)
  72. /*
  73. * The object was used in the incorrect context.
  74. */
  75. #define DU_E_INVALIDCONTEXT MAKE_DUERROR(30)
  76. /*
  77. * The Context has been marked to only allow read-only operations. For example,
  78. * this may be in the middle of a read-only callback.
  79. */
  80. #define DU_E_READONLYCONTEXT MAKE_DUERROR(31)
  81. /*
  82. * The threading model has already be determined by a previous call to
  83. * InitGadgets() and can no longer be changed.
  84. */
  85. #define DU_E_THREADINGALREADYSET MAKE_DUERROR(32)
  86. /*
  87. * Unable to use the IGMM_STANDARD messaging model because it is either
  88. * unsupported or cannot be installed.
  89. */
  90. #define DU_E_CANNOTUSESTANDARDMESSAGING MAKE_DUERROR(33)
  91. /*
  92. * Can not mix an invalid coordinate mapping, for example having a non-relative
  93. * child of a relative parent.
  94. */
  95. #define DU_E_BADCOORDINATEMAP MAKE_DUERROR(40)
  96. /*
  97. * Could not find a MSGID for one of the requested messages. This will be
  98. * represented by a '0' in the MSGID field for that message.
  99. */
  100. #define DU_E_CANNOTFINDMSGID MAKE_DUERROR(50)
  101. /*
  102. * The operation is not legal because the specified Gadget does not have a
  103. * GS_BUFFERED style.
  104. */
  105. #define DU_E_NOTBUFFERED MAKE_DUERROR(60)
  106. /*
  107. * The specific Gadget has started the destruction and can not be be modified
  108. * in this manner.
  109. */
  110. #define DU_E_STARTDESTROY MAKE_DUERROR(70)
  111. /*
  112. * The specified DirectUser optional component has not yet been initialized with
  113. * InitGadgetComponent().
  114. */
  115. #define DU_E_NOTINITIALIZED MAKE_DUERROR(80)
  116. /*
  117. * The specified DirectUser object was not found.
  118. */
  119. #define DU_E_NOTFOUND MAKE_DUERROR(90)
  120. /*
  121. * The specified parmeters are mismatched for the current object state. For
  122. * example, the object is specified to use GDI HANDLE's, but the parameter was
  123. * a GDI+ Object.
  124. */
  125. #define DU_E_MISMATCHEDTYPES MAKE_DUERROR(100)
  126. /*
  127. * GDI+ was unable to be loaded. It may not be installed on the system or may
  128. * not be properly initialized.
  129. */
  130. #define DU_E_CANNOTLOADGDIPLUS MAKE_DUERROR(110)
  131. /*
  132. * The specified class was already registered.
  133. */
  134. #define DU_E_CLASSALREADYREGISTERED MAKE_DUERROR(120)
  135. /*
  136. * The specified message was not found during class registration.
  137. */
  138. #define DU_E_MESSAGENOTFOUND MAKE_DUERROR(121)
  139. /*
  140. * The specified message was not implemented during class registration.
  141. */
  142. #define DU_E_MESSAGENOTIMPLEMENTED MAKE_DUERROR(122)
  143. /*
  144. * The implementation of the specific class has not yet been registered.
  145. */
  146. #define DU_E_CLASSNOTIMPLEMENTED MAKE_DUERROR(123)
  147. /*
  148. * Sending the message failed.
  149. */
  150. #define DU_E_MESSAGEFAILED MAKE_DUERROR(124)
  151. #ifdef __cplusplus
  152. }; // extern "C"
  153. #endif
  154. #endif // INC__DUserCore_h__INCLUDED