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.

210 lines
4.6 KiB

  1. /*++
  2. Copyright (c) 1986-1997 Microsoft Corporation
  3. Module Name:
  4. stierr.h
  5. Abstract:
  6. This module contains the user mode still image APIs error and status codes
  7. Author:
  8. Revision History:
  9. --*/
  10. #ifndef _STIERR_
  11. #define _STIERR_
  12. //
  13. // Generic test for success on any status value (non-negative numbers
  14. // indicate success).
  15. //
  16. #define NT_SUCCESS(Status) ((NTSTATUS)(Status) >= 0)
  17. //
  18. // Generic test for information on any status value.
  19. //
  20. #define NT_INFORMATION(Status) ((ULONG)(Status) >> 30 == 1)
  21. //
  22. // Generic test for warning on any status value.
  23. //
  24. #define NT_WARNING(Status) ((ULONG)(Status) >> 30 == 2)
  25. //
  26. // Generic test for error on any status value.
  27. //
  28. #define NT_ERROR(Status) ((ULONG)(Status) >> 30 == 3)
  29. //
  30. // Error codes are constructed as compound COM status codes
  31. //
  32. /*
  33. * The operation completed successfully
  34. */
  35. #define STI_OK S_OK
  36. #define STI_ERROR_NO_ERROR STI_OK
  37. /*
  38. * The device exists but not currently attached to the system
  39. */
  40. #define STI_NOTCONNECTED S_FALSE
  41. /*
  42. * The requested change in device mode settings had no effect
  43. */
  44. #define STI_CHANGENOEFFECT S_FALSE
  45. /*
  46. * The application requires newer version
  47. */
  48. #define STIERR_OLD_VERSION \
  49. MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_OLD_WIN_VERSION)
  50. /*
  51. * The application was written for pre-release version of provider DLL
  52. */
  53. #define STIERR_BETA_VERSION \
  54. MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_RMODE_APP)
  55. /*
  56. * The requested object could not be created due to incompatible or mismatched driver
  57. */
  58. #define STIERR_BADDRIVER \
  59. MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_BAD_DRIVER_LEVEL)
  60. /*
  61. * The device is not registered
  62. */
  63. #define STIERR_DEVICENOTREG REGDB_E_CLASSNOTREG
  64. /*
  65. * The requested container does not exist
  66. */
  67. #define STIERR_OBJECTNOTFOUND \
  68. MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_FILE_NOT_FOUND)
  69. /*
  70. * An invalid or not state matching parameter was passed to the API
  71. */
  72. #define STIERR_INVALID_PARAM E_INVALIDARG
  73. /*
  74. * The specified interface is not supported
  75. */
  76. #define STIERR_NOINTERFACE E_NOINTERFACE
  77. /*
  78. * The undetermined error occured
  79. */
  80. #define STIERR_GENERIC E_FAIL
  81. /*
  82. * There is not enough memory to perform requested operation
  83. */
  84. #define STIERR_OUTOFMEMORY E_OUTOFMEMORY
  85. /*
  86. * The application called unsupported (at this time)function
  87. */
  88. #define STIERR_UNSUPPORTED E_NOTIMPL
  89. /*
  90. * The application requires newer version
  91. */
  92. #define STIERR_NOT_INITIALIZED \
  93. MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_NOT_READY)
  94. /*
  95. * The application requires newer version
  96. */
  97. #define STIERR_ALREADY_INITIALIZED \
  98. MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_ALREADY_INITIALIZED)
  99. /*
  100. * The operation can not performed while device is locked
  101. */
  102. #define STIERR_DEVICE_LOCKED \
  103. MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_LOCK_VIOLATION)
  104. /*
  105. * The specified propery can not be changed for this device
  106. */
  107. #define STIERR_READONLY E_ACCESSDENIED
  108. /*
  109. * The device already has notification handle associated with it
  110. */
  111. #define STIERR_NOTINITIALIZED E_ACCESSDENIED
  112. /*
  113. * The device needs to be locked before attempting this operation
  114. */
  115. #define STIERR_NEEDS_LOCK \
  116. MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_NOT_LOCKED)
  117. /*
  118. * The device is opened by another application in data mode
  119. */
  120. #define STIERR_SHARING_VIOLATION \
  121. MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_SHARING_VIOLATION)
  122. /*
  123. * Handle already set for this context
  124. */
  125. #define STIERR_HANDLEEXISTS \
  126. MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_ALREADY_EXISTS)
  127. /*
  128. * Device name is not recognized
  129. */
  130. #define STIERR_INVALID_DEVICE_NAME \
  131. MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_INVALID_NAME)
  132. /*
  133. * Device hardware type is not valid
  134. */
  135. #define STIERR_INVALID_HW_TYPE \
  136. MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_INVALID_DATA)
  137. /*
  138. * Device hardware type is not valid
  139. */
  140. #define STIERR_INVALID_HW_TYPE \
  141. MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_INVALID_DATA)
  142. /*
  143. * No events available
  144. */
  145. #define STIERR_NOEVENTS \
  146. MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_NO_MORE_ITEMS)
  147. /*
  148. * Device appears as not ready
  149. */
  150. #define STIERR_DEVICE_NOTREADY \
  151. MAKE_HRESULT(SEVERITY_ERROR,FACILITY_WIN32,ERROR_NOT_READY)
  152. //#define STIERR_
  153. #endif // _STIERR_