The list of API error codes can be found in PixeLINK\include\PixeLINKCodes.h after installing Pixelink SDK.
NOTE: It is highly recommended that the API_SUCCESS() macro be used to test for success, rather than doing a direct comparison to ApiSuccess.
An example using the API_SUCCESS macro:
HANDLE hCamera; PXL_RETURN_CODE rc = PxLInitialize(0, hCamera); if (API_SUCCESS(rc)) { // We were able to connect to a camera }
With .NET:
int hCamera = 0; ReturnCode rc = Api.Initialize(0, ref hCamera); if(Api.IsSuccess(rc)) { // We were able to connect to a camera }
Return Code | Value | Explanation | Possible Reasons |
---|---|---|---|
ApiSuccess | 0x00000000 | The function completed successfully. | |
ApiSuccessParameterChanged | 0x00000001 | Setting a function was successful, but one or more parameters has to be changed. | |
ApiSuccessAlreadyRunning | 0x00000002 | The camera is already streaming. | |
ApiSuccessLowMemory | 0x00000003 | There is not as much memory as needed for optimum performance. Performance may be affected. | |
ApiSuccessParameter Warning | 0x00000004 | The operation completed successfully, but one or more of the parameters are suspect. | An invalid IP address was passed in. |
ApiSuccessReducedSpeed Warning | 0x00000005 | The operation completed sucessfully, but the camera is operating at a speed less than it's maximum. | For instance, this warning is returned from a PxLInitialize(Ex) if the particular camera is a USB3 camera, connected via a USB2 port. |
ApiSuccessExposure AdjustmentMade | 0x00000006 | The operation completed successfully, but the camera had to adjust exposure to accommodate. | |
ApiSuccessWhiteBalance TooDark | 0x00000007 | The Auto WhiteBalance algorithm could not achieve good results because the auto-adjust area is too dark. | |
ApiSuccessWhiteBalance TooBright | 0x00000008 | The Auto WhiteBalance algorithm could not achieve good results because the auto-adjust area has too many saturated pixels. | |
ApiSuccessWithFrameLoss | 0x00000009 | The operation completed successfully, but some frame loss occurred (the system could not keep pace with the camera. | |
ApiSuccessGainIneffective Warning | 0x0000000A | Gain operation was successful, but gain is currently not applicable. | |
ApiSuccessSuspected FirewallBlockWarning | 0x0000000B | Difficulties receiving data from the camera - suspected firewall issue. | |
ApiSuccessApiLiteWarning | 0x0000000C | Only used with PxLInitialize(Ex) -- Camera sucessfully initialized with Lite variant of the API. | |
ApiSuccessSerialPort ScanSuppressedWarning | 0x0000000D | Could not enumerate all controllers, as com port scans are suppressed via the registry SuppressSerialPortScan. | |
ApiSuccessSensors CannotSyncWhileStreaming | 0x0000000E | Sensors can only be synchronized while the stream is stopped/paused. | |
ApiFeatureDeprecatedWarning | 0x0000000F | Special camera mode (aka Fixed Frame Rate mode) is enabled even though it is deprecated. | Deprecated 'special' mode of operation (aka Fixed Frame Rate mode) is enabled on a camera that permits higher framerates with reductions in ROI. So it no longer provides any benefit. |
ApiCompressionNotPossible Warning | 0x00000010 | Compression is enabled, but current configuration does not support it. | Compression is being enabled, but the cameras ROI is not suitable for the compression strategy. Or the host processor is not capable of decompressing this type of compression. |
ApiUnknownError | 0x80000001 | Unknown error. | |
ApiInvalidHandleError | 0x80000002 | The handle parameter is invalid. | The camera was not initialized or the initialization was not successful. |
ApiInvalidParameterError | 0x80000003 | Invalid parameter. | See the appropriate function description to determine the admissible parameter values. |
ApiBufferTooSmall | 0x80000004 | A buffer passed as parameter is too small. | If possible, use the function to return the required size of the buffer before filling the buffer. |
ApiInvalidFunctionCallError | 0x80000005 | The function cannot be called at this time. | The function was called at an incorrect point in the calling sequence; another function may need to be called beforehand. |
ApiNotSupportedError | 0x80000006 | The API cannot complete the request. | This camera does not support the requested functionality. |
ApiCameraInUseError | 0x80000007 | The camera is already being used by another application. | Another application is running and using the camera. |
ApiNoCameraError | 0x80000008 | There is no response from the camera. | The camera is disconnected. |
ApiHardwareError | 0x80000009 | The camera responded with an error. | Unknown hardware error. |
ApiCameraUnknownError | 0x8000000A | The API does not recognize the camera. | Incompatible firmware, driver or API version. |
ApiOutOfBandwidthError | 0x8000000B | There is not enough 1394 bandwidth to start the stream. | Too many other devices are using the bus, or too much video data is streaming. |
ApiOutOfMemoryError | 0x8000000C | The API can not allocate the required memory. | The system is out of memory. |
ApiOSVersionError | 0x8000000D | The API cannot run on the current operating system. | The current version of the operating system is not supported by the software. |
ApiNoSerialNumberError | 0x8000000E | The serial number could not be obtained from the camera. | The camera is already in use. |
ApiInvalidSerialNumberError | 0x8000000F | A camera with that serial number could not be found. | The camera is disconnected. |
ApiDiskFullError | 0x80000010 | Not enough disk space to complete an IO operation. | Too much video data is being requested. |
ApiIOError | 0x80000011 | An error occurred during an IO operation. | |
ApiStreamStopped | 0x80000012 | Application requested streaming termination. | |
ApiNullPointerError | 0x80000013 | A parameter passed in was NULL which it shouldn't be. | The necessary memory buffer has not been allocated. |
ApiCreatePreviewWndError | 0x80000014 | Error creating the preview window. | |
ApiOutOfRangeError | 0x80000016 | Indicates that a feature set value is out of range. | The specified value is too large or too small. |
ApiNoCameraAvailableError | 0x80000017 | There is no camera available. | All cameras are in use by other applications. |
ApiInvalidCameraName | 0x80000018 | Indicated that the name specified is not a valid camera name. | |
ApiGetNextFrameBusy | 0x80000019 | PxLGetNextFrame() cannot be called at this time, there is a camera / API conflict as to how frames are delivered -- by calling PxLGetNextFrame or via a FRAME_OVERLAY callback function. | Time limit on the callback function is too long when applied to the preview window. |
ApiFrameInUseError | 0x8000001A | A frame was still in use when the buffers were deallocated. | Older versions of the Pixelink driver can report this problem. Upgrading to the latest driver will solve this. |
ApiStreamExistingError | 0x90000001 | ||
ApiEnumDoneError | 0x90000002 | ||
ApiNotEnoughResourcesError | 0x90000003 | ||
ApiBadFrameSizeError | 0x90000004 | ||
ApiNoStreamError | 0x90000005 | ||
ApiVersionError | 0x90000006 | ||
ApiNoDeviceError | 0x90000007 | ||
ApiCannotMapFrameError | 0x90000008 | ||
ApiLinkDriverError | 0x90000009 | The driver for the link to the device, reported an error. | |
ApiInvalidIoctlParameter | 0x9000000A | ||
ApiInvalidOhciDriverError | 0x9000000B | ||
ApiCameraTimeoutError | 0x9000000C | Timeout waiting for the camera to respond. | |
ApiInvalidFrameReceived Error | 0x9000000D | The camera returned an invalid frame (image). | |
ApiOSServiceError | 0x9000000E | An operating system service returned an error. | |
ApiTimeoutError | 0x9000000F | ||
ApiRequiresControlAccess | 0x90000010 | Camera operation not permitted because it requires control access. | |
ApiGevInitializationError | 0x90000011 | Error attempting to initialize for communication to GEV cameras. | |
ApiIpServicesError | 0x90000012 | Error within the IP Stack while attempting communications with a GEV camera. | |
ApiIpAddressingError | 0x90000013 | The camera's IP address is not reachable on this host. | |
ApiDriverCommunicationError | 0x90000014 | Could not communicate properly with the driver. | |
ApiInvalidXmlError | 0x90000015 | An error was encountered when accessing the (GEV) cameras XML file. | |
ApiCameraRejectedValue Error | 0x90000016 | Communications with the camera are good but the camera did not like requested value. | |
ApiSuspectedFirewallBlockError | 0x90000017 | Timeout hearing from the (GEV) camera suspected firewall issue. | |
ApiIncorrectLinkSpeed | 0x90000018 | Connected camera link is not sufficient for this camera (probably too slow). | |
ApiCameraNotReady | 0x90000019 | Camera is not in a state to perform this operation. | |
ApiInconsistentConfiguration | 0x9000001A | The requested operation could not be completed, as its operation is non consistent with the camera’s current configuration. | The camera can return this error code, if, for instance, an operation was attempted that required the stream to be started first. Or, if the user is attempting to use a feature that is not enabled. |
ApiNotPermittedWhile Streaming | 0x9000001B | You must stop the stream to perform this operation. | |
ApiOSAccessDeniedError | 0x9000001C | OS returned ERROR_ACCESS_DENIED error trying running as administrator. | |
ApiInvalidAutoRoiError | 0x9000001D | An 'auto' operation was attempted, but the auto ROI is not within the cameras ROI. | |
ApiGpiHardwareTrigger Conflict | 0x9000001E | GPI and Hardware trigger are mutually exclusive; they both can't be enabled simultaneously. | |
ApiGpioConfigurationError | 0x9000001F | Invalid configuration - Only GPIO #1 can be used as a GPI. | |
ApiUnsupportedPixelFormatError | 0x90000020 | Attempt to perform an operation while using a pixel format that is not supported. | Attempt to capture a video clip using a pixel format different from YUV422. |
ApiUnsupportedClipEncoding | 0x90000021 | Attempt to capture a video clip using an unsupported video encoding scheme. | |
ApiVideoEncodingError | 0x90000022 | The compression libraries reported an error while capturing video. | E.g. the h264 compression is used. |
ApiVideoFrameTooLargeError | 0x90000023 | The video frame is too large for the compression library. | E.g. the h264 compression is limited to 9 MegaPixels. |
ApiVideoInsufficientDataError | 0x90000024 | There was not enough data to encode. | |
ApiNoControllerError | 0x90000025 | Attempted to perform a controller operation on a non-existing controller. | |
ApiControllerAlreadyAssignedError | 0x90000026 | Attempted to assign a controller to a camera that is already assigned to a different camera. | |
ApiControllerInaccessible Error | 0x90000027 | Cannot access the specified controller. | |
ApiControllerCommunication Error | 0x90000028 | An error occurred while attempting to communicate with a controller. | |
ApiControllerTimeoutError | 0x90000029 | The controller timed out responding to a command. | |
ApiBufferTooSmallFor InterleavedError | 0x9000002A | Similar to ApiBufferTooSmall, but unique to Interleaved HDR mode. | |
ApiThisEventNotSupported | 0x9000002B | Attempted to enable a specific event on a camera that does not support it. | |
ApiFeatureConflictError | 0x9000002C | Attempt to enable a feature that uses a resource currently in use by another feature. | |
ApiGpiOnlyError | 0x9000002D | Attempt to treat a dedicated GPI as a GPO. | |
ApiGpoOnlyError | 0x9000002E | Attempt to treat a dedicated GPO as a GPI. | |
ApiInvokedFromIncorrect ThreadError | 0x9000002F | This operation cannot be done from this thread. | |
ApiNotSupportedOnLiteVersion | 0x90000030 | 'Lite' version only -- Attempt to use functionality only supported with full API. | |
ApiControllerDuplicateType | 0x90000031 | Attempt to assign a controller to a camera that already has a controller assigned of the same TypeMask. | |
ApiControllerDuplicateFeature | 0x90000032 | Attempt to assign a controller to a camera that already has native support of the controllers TypeMask. | |
ApiCompressionNotPossible Error | 0x90000033 | Attempt to enable a stream of compressed images, but the current configuration is not consistent with compression. | ROI does not meet the requirements of the compression strategy. |
ApiDecompressionNotPossible Error | 0x90000034 | Attempt to enable a stream of compressed images, but host computer processor does not meet minimum requirements. | Incompatible host processor. |
ApiOhciDriverError | ApiLinkDriverError | Defined for backwards compatibility. | |
ApiNotPermittedWhile StreamingError | ApiNotPermittedWhile Streaming | Defined for backwards compatibility, use the shorter one. | |
ApiH264EncodingError | ApiVideoEncodingError | Defined for backwards compatibility. | |
ApiH264FrameTooLargeError | ApiVideoFrameTooLargeError | Defined for backwards compatibility. | |
ApiH264InsufficientDataError | ApiVideoInsufficientDataError | Defined for backwards compatibility. |
If you have any questions about any error codes that you're seeing with your camera or application, please contact Pixelink Support by email at pixelink.support@ametek.com.