/* - mperror.h - * Microsoft Internet Phone * Common error codes * * Revision History: * * When Who What * -------- ------------------ --------------------------------------- * 11.20.95 Yoram Yaacovi Created * 11.30.95 Lon-Chan Chu Added MAKE_AVC_ERROR and MAKE_AVC_WARNING. * 12.02.95 Lon-Chan Chu Added datapump error codes. */ #ifndef _AVC_ERROR_H_ #define _AVC_ERROR_H_ #include #include /* Assume 8 byte packing throughout */ /* * Macros */ #define HR_SUCCEEDED(_hr) SUCCEEDED((SCODE)(_hr)) #define HR_FAILED(_hr) FAILED((SCODE)(_hr)) #define MakeResult(_s) ResultFromScode(_s) /* * Error codes * * error codes for hResults are in winerror.h */ #define hrSuccess 0 // // Common macros // #define AVC_FACILITY 0x100 // facility code for audio/video communications #define MAKE_AVC_ERROR(z,e) MAKE_HRESULT(1,AVC_FACILITY,(((z)&0xF000)|(e))) #define MAKE_AVC_WARNING(z,w) MAKE_HRESULT(0,AVC_FACILITY,(((z)&0xF000)|(w))) #define AVC_APP_ZONE 0x0000 // ui and application #define AVC_DP_ZONE 0x1000 // datapump #define AVC_NAC_ZONE 0x2000 // nac #define AVC_CONN_ZONE 0x3000 // conn #define AVC_NRES_ZONE 0x4000 // name resolution #define AVC_UI_ZONE 0x5000 // ui #define AVC_CAP_ZONE 0x6000 #define AVC_CCO_ZONE 0x7000 #define AVC_CADV_ZONE 0x8000 #define AVC_PC_ZONE 0x9000 #define AVC_CHAN_ZONE 0xA000 #define AVC_WIN32_ZONE 0xF000 // Win32 error code #define Win32ErrToHR(e) MAKE_AVC_ERROR (AVC_WIN32_ZONE, e) #define GetLastHR() Win32ErrToHR (GetLastError ()) // // NAC return codes // #define H323CC_E_INVALID_PARAM MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x0000) #define H323CC_E_INSUFFICIENT_MEMORY MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x0001) #define H323CC_E_MORE_CONNECTIONS MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x0004) #define H323CC_E_NOACTIVELINE MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x0005) #define H323CC_E_INIT_FAILURE MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x0006) #define H323CC_E_CREATE_FAILURE MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x0007) #define H323CC_E_DATAPUMP_ERROR MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x0008) #define H323CC_E_REGISTRY_ERROR MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x0009) #define H323CC_E_NO_AUDIOHW MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x000A) #define H323CC_E_NETWORK_ERROR MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x000B) #define H323CC_E_NOT_INITIALIZED MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x000C) #define H323CC_E_CONNECTION_NOT_FOUND MAKE_AVC_ERROR(AVC_NAC_ZONE, 0x000D) // // IConfAdvise interface error codes // #define CADV_E_INVALID_PARAM MAKE_AVC_ERROR(AVC_CADV_ZONE, 0x0000) #define CADV_E_NOT_INITIALIZED MAKE_AVC_ERROR(AVC_CADV_ZONE, 0x0001) #define CADV_E_NOT_SUPPORTED MAKE_AVC_ERROR(AVC_CADV_ZONE, 0x0002) // // connection object error codes // #define CONN_E_INVALID_PARAM MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0000) #define CONN_E_NOT_IDLE MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0001) #define CONN_E_BAD_ADDRESS MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0002) #define CONN_E_CONNECT_FAILED MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0003) #define CONN_E_INIT_FAILED MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0004) #define CONN_E_OUT_OF_MEMORY MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0005) #define CONN_E_MANDATORY_CHAN_OPEN_FAILED MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0006) #define CONN_E_SYSTEM_ERROR MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0007) #define CONN_E_NOT_INITIALIZED MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0008) #define CONN_E_ALREADY_INITIALIZED MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x0009) #define CONN_E_GK_NOT_REGISTERED MAKE_AVC_ERROR(AVC_CONN_ZONE, 0x000A) // // control channel object error codes // #define CCO_E_INVALID_PARAM MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0000) #define CCO_E_NOT_IDLE MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0001) #define CCO_E_BAD_ADDRESS MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0002) #define CCO_E_CONNECT_FAILED MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0003) #define CCO_E_INIT_FAILED MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0004) #define CCO_E_OUT_OF_MEMORY MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0005) #define CCO_E_MANDATORY_CHAN_OPEN_FAILED MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0006) #define CCO_E_NODEFAULT_CHANNEL MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0007) #define CCO_E_INVALID_CAPABILITY MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0008) #define CCO_E_UNSUPPORTED_MEDIA_TYPE MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x0009) #define CCO_E_SYSTEM_ERROR MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x000a) #define CCO_E_NOT_LISTENING MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x000b) #define CCO_E_NOT_SUPPORTED MAKE_AVC_ERROR(AVC_CCO_ZONE, 0x000c) // // channel (ICommChannel) error codes // #define CHAN_E_INVALID_PARAM MAKE_AVC_ERROR(AVC_CHAN_ZONE, 0x0000) #define CHAN_E_NOT_OPEN MAKE_AVC_ERROR(AVC_CHAN_ZONE, 0x0001) // // capability object error codes // #define AUDCAPS_W_MORE_FORMATS MAKE_AVC_WARNING(AVC_CAP_ZONE,0x0001) #define CAPS_W_NO_MORE_FORMATS MAKE_AVC_WARNING(AVC_CAP_ZONE,0x0002) #define CAPS_E_NOCAPS MAKE_AVC_ERROR(AVC_CAP_ZONE,0x0001) #define CAPS_E_NOMATCH MAKE_AVC_ERROR(AVC_CAP_ZONE,0x0002) #define CAPS_E_NOMEM MAKE_AVC_ERROR(AVC_CAP_ZONE,0x0003) #define CAPS_E_NOT_SUPPORTED MAKE_AVC_ERROR(AVC_CAP_ZONE,0x0005) #define CAPS_E_BUFFER_TOO_SMALL MAKE_AVC_ERROR(AVC_CAP_ZONE,0x0006) #define CAPS_E_SYSTEM_ERROR MAKE_AVC_ERROR(AVC_CAP_ZONE,0x0007) #define CAPS_E_INVALID_PARAM MAKE_AVC_ERROR(AVC_CAP_ZONE,0x000F) // // datapump error codes // #define DPR_SUCCESS 0 #define DPR_INVALID_PARAMETER MAKE_AVC_ERROR (AVC_DP_ZONE, 0x1) #define DPR_INVALID_PROP_ID MAKE_AVC_ERROR (AVC_DP_ZONE, 0x2) #define DPR_INVALID_PROP_VAL MAKE_AVC_ERROR (AVC_DP_ZONE, 0x3) #define DPR_INVALID_PLATFORM MAKE_AVC_ERROR (AVC_DP_ZONE, 0x4) #define DPR_CANT_PREPARE_HEADER MAKE_AVC_ERROR (AVC_DP_ZONE, 0x5) #define DPR_CANT_UNPREPARE_HEADER MAKE_AVC_ERROR (AVC_DP_ZONE, 0x6) #define DPR_CANT_GET_BUF_SIZE MAKE_AVC_ERROR (AVC_DP_ZONE, 0x7) #define DPR_IMPOSSIBLE_SET_PROP MAKE_AVC_ERROR (AVC_DP_ZONE, 0x8) #define DPR_CANT_ADD_BUFFER MAKE_AVC_ERROR (AVC_DP_ZONE, 0x9) #define DPR_CANT_WRITE_WAVE_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0xA) #define DPR_CANT_OPEN_CODEC MAKE_AVC_ERROR (AVC_DP_ZONE, 0xB) #define DPR_CANT_OPEN_WAVE_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0xC) #define DPR_CANT_SET_VOLUME MAKE_AVC_ERROR (AVC_DP_ZONE, 0xD) #define DPR_CANT_INITIALIZE_AGAIN MAKE_AVC_ERROR (AVC_DP_ZONE, 0xE) #define DPR_OUT_OF_MEMORY MAKE_AVC_ERROR (AVC_DP_ZONE, 0xF) #define DPR_OUT_OF_SEQUENCE MAKE_AVC_ERROR (AVC_DP_ZONE, 0x10) #define DPR_CONVERSION_FAILED MAKE_AVC_ERROR (AVC_DP_ZONE, 0x11) #define DPR_CANT_CREATE_EVENT MAKE_AVC_ERROR (AVC_DP_ZONE, 0x12) #define DPR_NET_SEND_ERROR MAKE_AVC_ERROR (AVC_DP_ZONE, 0x13) #define DPR_NET_RECV_ERROR MAKE_AVC_ERROR (AVC_DP_ZONE, 0x14) #define DPR_LATE_PACKET MAKE_AVC_ERROR (AVC_DP_ZONE, 0x15) #define DPR_DUPLICATE_PACKET MAKE_AVC_ERROR (AVC_DP_ZONE, 0x16) #define DPR_CANT_START_WAVE_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x17) #define DPR_CANT_STOP_WAVE_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x18) #define DPR_INVALID_MEDIA_TYPE MAKE_AVC_ERROR (AVC_DP_ZONE, 0x1A) #define DPR_NOT_INITIALIZED MAKE_AVC_ERROR (AVC_DP_ZONE, 0x1B) #define DPR_NOT_CONFIGURED MAKE_AVC_ERROR (AVC_DP_ZONE, 0x1C) #define DPR_INVALID_FORMAT MAKE_AVC_ERROR (AVC_DP_ZONE, 0x1D) #define DPR_NO_PLAY_CAP MAKE_AVC_ERROR (AVC_DP_ZONE, 0x1E) #define DPR_NO_RECORD_CAP MAKE_AVC_ERROR (AVC_DP_ZONE, 0x1F) #define DPR_CANT_RESET_WAVE_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x2B) #define DPR_INVALID_HANDLE MAKE_AVC_ERROR (AVC_DP_ZONE, 0x2C) #define DPR_CANT_CLOSE_WAVE_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x2D) #define DPR_CANT_INIT_RX_STREAM MAKE_AVC_ERROR (AVC_DP_ZONE, 0x2E) #define DPR_CANT_INIT_TX_STREAM MAKE_AVC_ERROR (AVC_DP_ZONE, 0x2F) #define DPR_NOT_YET_IMPLEMENTED MAKE_AVC_ERROR (AVC_DP_ZONE, 0x30) #define DPR_PROPERTY_NOT_AVAILABLE MAKE_AVC_ERROR (AVC_DP_ZONE, 0x31) #define DPR_CANT_INTERPOLATE MAKE_AVC_ERROR (AVC_DP_ZONE, 0x32) #define DPR_CANT_WRITE_VIDEO_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x33) #define DPR_CANT_OPEN_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x34) #define DPR_CANT_CLOSE_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x35) #define DPR_CANT_START_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x36) #define DPR_CANT_STOP_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x37) #define DPR_CANT_RESET_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x38) #define DPR_CANT_PAUSE_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x39) #define DPR_CANT_RESTART_DEV MAKE_AVC_ERROR (AVC_DP_ZONE, 0x3A) #define DPR_CANT_INIT_RXV_STREAM MAKE_AVC_ERROR (AVC_DP_ZONE, 0x3B) #define DPR_CANT_INIT_TXV_STREAM MAKE_AVC_ERROR (AVC_DP_ZONE, 0x3C) #define DPR_CANT_REGISTER_WND_CLASS MAKE_AVC_ERROR (AVC_DP_ZONE, 0x3D) #define DPR_CANT_CREATE_WINDOW MAKE_AVC_ERROR (AVC_DP_ZONE, 0x3E) // Datapump warning #define DPR_NO_PACKET_READY MAKE_AVC_WARNING (AVC_DP_ZONE, 0x1) #define DPR_IO_PENDING MAKE_AVC_WARNING (AVC_DP_ZONE, 0x2) //name resolution errors #define NMRES_E_INVALIDARG MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0001) #define NMRES_E_OUTOFMEMORY MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0002) #define NMRES_E_INETAPIFAILED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0003) #define NMRES_E_SERVERUNKNOWN MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0004) #define NMRES_E_SERVNOTINITIALIZED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0005) #define NMRES_E_SOCKCALLFAILED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0006) #define NMRES_E_IPAFILEPARSEFAILED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0007) #define NMRES_E_UNEXPECTEDIPAREPLY MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0008) #define NMRES_E_IPALINEPARSEFAILED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x0009) #define NMRES_E_IPAQUERYFAILED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x000A) #define NMRES_E_HTMLFILEPARSEFAILED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x000B) #define NMRES_E_IPARESULTCONVFAILED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x000C) #define NMRES_E_DLGERROR MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x000D) #define NMRES_E_NOUSERDETAILS MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x000E) #define NMRES_E_INETOPENURLFAILED MAKE_AVC_ERROR(AVC_NRES_ZONE, 0x000F) //name resolution warnings #define NMRES_W_HTMLFILEIMPERFECT MAKE_AVC_WARNING(AVC_NRES_ZONE,0x0001) // // Codec Performance error codes // #define PERFCODEC_SUCCESS 0 #define PERFCODEC_INVALID_PARAMETER MAKE_AVC_ERROR(AVC_PC_ZONE,0x0001) #define PERFCODEC_OUT_OF_MEMORY MAKE_AVC_ERROR(AVC_PC_ZONE,0x0002) #define PERFCODEC_CANT_OPEN_CODEC MAKE_AVC_ERROR(AVC_PC_ZONE,0x0003) #define PERFCODEC_CANT_GET_BUF_SIZE MAKE_AVC_ERROR(AVC_PC_ZONE,0x0004) #define PERFCODEC_CANT_PREPARE_HEADER MAKE_AVC_ERROR(AVC_PC_ZONE,0x0005) #define PERFCODEC_CANT_CONVERT MAKE_AVC_ERROR(AVC_PC_ZONE,0x0006) #define PERFCODEC_CANT_UNPREPARE_HEADER MAKE_AVC_ERROR(AVC_PC_ZONE,0x0007) #define PERFCODEC_CANT_CLOSE_CODEC MAKE_AVC_ERROR(AVC_PC_ZONE,0x0008) #define PERFCODEC_CREATE_FAILED MAKE_AVC_ERROR(AVC_PC_ZONE,0x0009) #define PERFCODEC_DELETE_FAILED MAKE_AVC_ERROR(AVC_PC_ZONE,0x000A) #include /* End byte packing */ #endif // _AVC_ERROR_H_