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.

239 lines
11 KiB

  1. /*
  2. - mperror.h
  3. -
  4. * Microsoft Internet Phone
  5. * Common error codes
  6. *
  7. * Revision History:
  8. *
  9. * When Who What
  10. * -------- ------------------ ---------------------------------------
  11. * 11.20.95 Yoram Yaacovi Created
  12. * 11.30.95 Lon-Chan Chu Added MAKE_AVC_ERROR and MAKE_AVC_WARNING.
  13. * 12.02.95 Lon-Chan Chu Added datapump error codes.
  14. */
  15. #ifndef _AVC_ERROR_H_
  16. #define _AVC_ERROR_H_
  17. #include <winerror.h>
  18. #include <pshpack8.h> /* Assume 8 byte packing throughout */
  19. /*
  20. * Macros
  21. */
  22. #define HR_SUCCEEDED(_hr) SUCCEEDED((SCODE)(_hr))
  23. #define HR_FAILED(_hr) FAILED((SCODE)(_hr))
  24. #define MakeResult(_s) ResultFromScode(_s)
  25. /*
  26. * Error codes
  27. *
  28. * error codes for hResults are in winerror.h
  29. */
  30. #define hrSuccess 0
  31. //
  32. // Common macros
  33. //
  34. #define AVC_FACILITY 0x100 // facility code for audio/video communications
  35. #define MAKE_AVC_ERROR(z,e) MAKE_HRESULT(1,AVC_FACILITY,(((z)&0xF000)|(e)))
  36. #define MAKE_AVC_WARNING(z,w) MAKE_HRESULT(0,AVC_FACILITY,(((z)&0xF000)|(w)))
  37. #define AVC_APP_ZONE 0x0000 // ui and application
  38. #define AVC_DP_ZONE 0x1000 // datapump
  39. #define AVC_NAC_ZONE 0x2000 // nac
  40. #define AVC_CONN_ZONE 0x3000 // conn
  41. #define AVC_NRES_ZONE 0x4000 // name resolution
  42. #define AVC_UI_ZONE 0x5000 // ui
  43. #define AVC_CAP_ZONE 0x6000
  44. #define AVC_CCO_ZONE 0x7000
  45. #define AVC_CADV_ZONE 0x8000
  46. #define AVC_PC_ZONE 0x9000
  47. #define AVC_CHAN_ZONE 0xA000
  48. #define AVC_WIN32_ZONE 0xF000 // Win32 error code
  49. #define Win32ErrToHR(e) MAKE_AVC_ERROR (AVC_WIN32_ZONE, e)
  50. #define GetLastHR() Win32ErrToHR (GetLastError ())
  51. //
  52. // NAC return codes
  53. //
  54. #define H323CC_E_INVALID_PARAM MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x0000)
  55. #define H323CC_E_INSUFFICIENT_MEMORY MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x0001)
  56. #define H323CC_E_MORE_CONNECTIONS MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x0004)
  57. #define H323CC_E_NOACTIVELINE MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x0005)
  58. #define H323CC_E_INIT_FAILURE MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x0006)
  59. #define H323CC_E_CREATE_FAILURE MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x0007)
  60. #define H323CC_E_DATAPUMP_ERROR MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x0008)
  61. #define H323CC_E_REGISTRY_ERROR MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x0009)
  62. #define H323CC_E_NO_AUDIOHW MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x000A)
  63. #define H323CC_E_NETWORK_ERROR MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x000B)
  64. #define H323CC_E_NOT_INITIALIZED MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x000C)
  65. #define H323CC_E_CONNECTION_NOT_FOUND MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x000D)
  66. //
  67. // IConfAdvise interface error codes
  68. //
  69. #define CADV_E_INVALID_PARAM MAKE_AVC_ERROR(AVC_CADV_ZONE, 0x0000)
  70. #define CADV_E_NOT_INITIALIZED MAKE_AVC_ERROR(AVC_CADV_ZONE, 0x0001)
  71. #define CADV_E_NOT_SUPPORTED MAKE_AVC_ERROR(AVC_CADV_ZONE, 0x0002)
  72. //
  73. // connection object error codes
  74. //
  75. #define CONN_E_INVALID_PARAM MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0000)
  76. #define CONN_E_NOT_IDLE MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0001)
  77. #define CONN_E_BAD_ADDRESS MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0002)
  78. #define CONN_E_CONNECT_FAILED MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0003)
  79. #define CONN_E_INIT_FAILED MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0004)
  80. #define CONN_E_OUT_OF_MEMORY MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0005)
  81. #define CONN_E_MANDATORY_CHAN_OPEN_FAILED MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0006)
  82. #define CONN_E_SYSTEM_ERROR MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0007)
  83. #define CONN_E_NOT_INITIALIZED MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0008)
  84. #define CONN_E_ALREADY_INITIALIZED MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0009)
  85. #define CONN_E_GK_NOT_REGISTERED MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x000A)
  86. //
  87. // control channel object error codes
  88. //
  89. #define CCO_E_INVALID_PARAM MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0000)
  90. #define CCO_E_NOT_IDLE MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0001)
  91. #define CCO_E_BAD_ADDRESS MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0002)
  92. #define CCO_E_CONNECT_FAILED MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0003)
  93. #define CCO_E_INIT_FAILED MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0004)
  94. #define CCO_E_OUT_OF_MEMORY MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0005)
  95. #define CCO_E_MANDATORY_CHAN_OPEN_FAILED MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0006)
  96. #define CCO_E_NODEFAULT_CHANNEL MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0007)
  97. #define CCO_E_INVALID_CAPABILITY MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0008)
  98. #define CCO_E_UNSUPPORTED_MEDIA_TYPE MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0009)
  99. #define CCO_E_SYSTEM_ERROR MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x000a)
  100. #define CCO_E_NOT_LISTENING MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x000b)
  101. #define CCO_E_NOT_SUPPORTED MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x000c)
  102. //
  103. // channel (ICommChannel) error codes
  104. //
  105. #define CHAN_E_INVALID_PARAM MAKE_AVC_ERROR(AVC_CHAN_ZONE, 0x0000)
  106. #define CHAN_E_NOT_OPEN MAKE_AVC_ERROR(AVC_CHAN_ZONE, 0x0001)
  107. //
  108. // capability object error codes
  109. //
  110. #define AUDCAPS_W_MORE_FORMATS MAKE_AVC_WARNING(AVC_CAP_ZONE,0x0001)
  111. #define CAPS_W_NO_MORE_FORMATS MAKE_AVC_WARNING(AVC_CAP_ZONE,0x0002)
  112. #define CAPS_E_NOCAPS MAKE_AVC_ERROR(AVC_CAP_ZONE,0x0001)
  113. #define CAPS_E_NOMATCH MAKE_AVC_ERROR(AVC_CAP_ZONE,0x0002)
  114. #define CAPS_E_NOMEM MAKE_AVC_ERROR(AVC_CAP_ZONE,0x0003)
  115. #define CAPS_E_NOT_SUPPORTED MAKE_AVC_ERROR(AVC_CAP_ZONE,0x0005)
  116. #define CAPS_E_BUFFER_TOO_SMALL MAKE_AVC_ERROR(AVC_CAP_ZONE,0x0006)
  117. #define CAPS_E_SYSTEM_ERROR MAKE_AVC_ERROR(AVC_CAP_ZONE,0x0007)
  118. #define CAPS_E_INVALID_PARAM MAKE_AVC_ERROR(AVC_CAP_ZONE,0x000F)
  119. //
  120. // datapump error codes
  121. //
  122. #define DPR_SUCCESS 0
  123. #define DPR_INVALID_PARAMETER MAKE_AVC_ERROR (AVC_DP_ZONE, 0x1)
  124. #define DPR_INVALID_PROP_ID MAKE_AVC_ERROR (AVC_DP_ZONE, 0x2)
  125. #define DPR_INVALID_PROP_VAL MAKE_AVC_ERROR (AVC_DP_ZONE, 0x3)
  126. #define DPR_INVALID_PLATFORM MAKE_AVC_ERROR (AVC_DP_ZONE, 0x4)
  127. #define DPR_CANT_PREPARE_HEADER MAKE_AVC_ERROR (AVC_DP_ZONE, 0x5)
  128. #define DPR_CANT_UNPREPARE_HEADER MAKE_AVC_ERROR (AVC_DP_ZONE, 0x6)
  129. #define DPR_CANT_GET_BUF_SIZE MAKE_AVC_ERROR (AVC_DP_ZONE, 0x7)
  130. #define DPR_IMPOSSIBLE_SET_PROP MAKE_AVC_ERROR (AVC_DP_ZONE, 0x8)
  131. #define DPR_CANT_ADD_BUFFER MAKE_AVC_ERROR (AVC_DP_ZONE, 0x9)
  132. #define DPR_CANT_WRITE_WAVE_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0xA)
  133. #define DPR_CANT_OPEN_CODEC MAKE_AVC_ERROR (AVC_DP_ZONE, 0xB)
  134. #define DPR_CANT_OPEN_WAVE_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0xC)
  135. #define DPR_CANT_SET_VOLUME MAKE_AVC_ERROR (AVC_DP_ZONE, 0xD)
  136. #define DPR_CANT_INITIALIZE_AGAIN MAKE_AVC_ERROR (AVC_DP_ZONE, 0xE)
  137. #define DPR_OUT_OF_MEMORY MAKE_AVC_ERROR (AVC_DP_ZONE, 0xF)
  138. #define DPR_OUT_OF_SEQUENCE MAKE_AVC_ERROR (AVC_DP_ZONE, 0x10)
  139. #define DPR_CONVERSION_FAILED MAKE_AVC_ERROR (AVC_DP_ZONE, 0x11)
  140. #define DPR_CANT_CREATE_EVENT MAKE_AVC_ERROR (AVC_DP_ZONE, 0x12)
  141. #define DPR_NET_SEND_ERROR MAKE_AVC_ERROR (AVC_DP_ZONE, 0x13)
  142. #define DPR_NET_RECV_ERROR MAKE_AVC_ERROR (AVC_DP_ZONE, 0x14)
  143. #define DPR_LATE_PACKET MAKE_AVC_ERROR (AVC_DP_ZONE, 0x15)
  144. #define DPR_DUPLICATE_PACKET MAKE_AVC_ERROR (AVC_DP_ZONE, 0x16)
  145. #define DPR_CANT_START_WAVE_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x17)
  146. #define DPR_CANT_STOP_WAVE_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x18)
  147. #define DPR_INVALID_MEDIA_TYPE MAKE_AVC_ERROR (AVC_DP_ZONE, 0x1A)
  148. #define DPR_NOT_INITIALIZED MAKE_AVC_ERROR (AVC_DP_ZONE, 0x1B)
  149. #define DPR_NOT_CONFIGURED MAKE_AVC_ERROR (AVC_DP_ZONE, 0x1C)
  150. #define DPR_INVALID_FORMAT MAKE_AVC_ERROR (AVC_DP_ZONE, 0x1D)
  151. #define DPR_NO_PLAY_CAP MAKE_AVC_ERROR (AVC_DP_ZONE, 0x1E)
  152. #define DPR_NO_RECORD_CAP MAKE_AVC_ERROR (AVC_DP_ZONE, 0x1F)
  153. #define DPR_CANT_RESET_WAVE_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x2B)
  154. #define DPR_INVALID_HANDLE MAKE_AVC_ERROR (AVC_DP_ZONE, 0x2C)
  155. #define DPR_CANT_CLOSE_WAVE_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x2D)
  156. #define DPR_CANT_INIT_RX_STREAM MAKE_AVC_ERROR (AVC_DP_ZONE, 0x2E)
  157. #define DPR_CANT_INIT_TX_STREAM MAKE_AVC_ERROR (AVC_DP_ZONE, 0x2F)
  158. #define DPR_NOT_YET_IMPLEMENTED MAKE_AVC_ERROR (AVC_DP_ZONE, 0x30)
  159. #define DPR_PROPERTY_NOT_AVAILABLE MAKE_AVC_ERROR (AVC_DP_ZONE, 0x31)
  160. #define DPR_CANT_INTERPOLATE MAKE_AVC_ERROR (AVC_DP_ZONE, 0x32)
  161. #define DPR_CANT_WRITE_VIDEO_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x33)
  162. #define DPR_CANT_OPEN_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x34)
  163. #define DPR_CANT_CLOSE_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x35)
  164. #define DPR_CANT_START_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x36)
  165. #define DPR_CANT_STOP_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x37)
  166. #define DPR_CANT_RESET_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x38)
  167. #define DPR_CANT_PAUSE_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x39)
  168. #define DPR_CANT_RESTART_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x3A)
  169. #define DPR_CANT_INIT_RXV_STREAM MAKE_AVC_ERROR (AVC_DP_ZONE, 0x3B)
  170. #define DPR_CANT_INIT_TXV_STREAM MAKE_AVC_ERROR (AVC_DP_ZONE, 0x3C)
  171. #define DPR_CANT_REGISTER_WND_CLASS MAKE_AVC_ERROR (AVC_DP_ZONE, 0x3D)
  172. #define DPR_CANT_CREATE_WINDOW MAKE_AVC_ERROR (AVC_DP_ZONE, 0x3E)
  173. // Datapump warning
  174. #define DPR_NO_PACKET_READY MAKE_AVC_WARNING (AVC_DP_ZONE, 0x1)
  175. #define DPR_IO_PENDING MAKE_AVC_WARNING (AVC_DP_ZONE, 0x2)
  176. //name resolution errors
  177. #define NMRES_E_INVALIDARG MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0001)
  178. #define NMRES_E_OUTOFMEMORY MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0002)
  179. #define NMRES_E_INETAPIFAILED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0003)
  180. #define NMRES_E_SERVERUNKNOWN MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0004)
  181. #define NMRES_E_SERVNOTINITIALIZED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0005)
  182. #define NMRES_E_SOCKCALLFAILED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0006)
  183. #define NMRES_E_IPAFILEPARSEFAILED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0007)
  184. #define NMRES_E_UNEXPECTEDIPAREPLY MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0008)
  185. #define NMRES_E_IPALINEPARSEFAILED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0009)
  186. #define NMRES_E_IPAQUERYFAILED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x000A)
  187. #define NMRES_E_HTMLFILEPARSEFAILED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x000B)
  188. #define NMRES_E_IPARESULTCONVFAILED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x000C)
  189. #define NMRES_E_DLGERROR MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x000D)
  190. #define NMRES_E_NOUSERDETAILS MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x000E)
  191. #define NMRES_E_INETOPENURLFAILED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x000F)
  192. //name resolution warnings
  193. #define NMRES_W_HTMLFILEIMPERFECT MAKE_AVC_WARNING(AVC_NRES_ZONE,0x0001)
  194. //
  195. // Codec Performance error codes
  196. //
  197. #define PERFCODEC_SUCCESS 0
  198. #define PERFCODEC_INVALID_PARAMETER MAKE_AVC_ERROR(AVC_PC_ZONE,0x0001)
  199. #define PERFCODEC_OUT_OF_MEMORY MAKE_AVC_ERROR(AVC_PC_ZONE,0x0002)
  200. #define PERFCODEC_CANT_OPEN_CODEC MAKE_AVC_ERROR(AVC_PC_ZONE,0x0003)
  201. #define PERFCODEC_CANT_GET_BUF_SIZE MAKE_AVC_ERROR(AVC_PC_ZONE,0x0004)
  202. #define PERFCODEC_CANT_PREPARE_HEADER MAKE_AVC_ERROR(AVC_PC_ZONE,0x0005)
  203. #define PERFCODEC_CANT_CONVERT MAKE_AVC_ERROR(AVC_PC_ZONE,0x0006)
  204. #define PERFCODEC_CANT_UNPREPARE_HEADER MAKE_AVC_ERROR(AVC_PC_ZONE,0x0007)
  205. #define PERFCODEC_CANT_CLOSE_CODEC MAKE_AVC_ERROR(AVC_PC_ZONE,0x0008)
  206. #define PERFCODEC_CREATE_FAILED MAKE_AVC_ERROR(AVC_PC_ZONE,0x0009)
  207. #define PERFCODEC_DELETE_FAILED MAKE_AVC_ERROR(AVC_PC_ZONE,0x000A)
  208. #include <poppack.h> /* End byte packing */
  209. #endif // _AVC_ERROR_H_