Q

ToupCam SDK error code description?

A

ToupCam SDK returns error codes in two ways: first, through direct return values of API functions; second, through EVENT events to notify the host computer.

Method one is the primary solution, method two is a supplement to method one.

  1. Through direct return values HRESULT of API functions

Except for a few functions without return values in ToupCam SDK, other API return values are all HRESULT, using Windows standard error codes. The following are error codes used by ToupCam SDK:

Error Code

Macro Definition

Meaning

0x00000000

S_OK

Operation completed successfully

0x00000001

S_FALSE

Operation failed

0x8000ffff

E_UNEXPECTED

Catastrophic failure

0x80004001

E_NOTIMPL

Not implemented

0x80004002

E_NOINTERFACE

Interface not supported

0x80070005

E_ACCESSDENIED

Access denied

0x8007000e

E_OUTOFMEMORY

Insufficient memory resources to complete this operation

0x80070057

E_INVALIDARG

Invalid parameter

0x80004003

E_POINTER

Invalid pointer

0x80004005

E_FAIL

Unspecified error

0x8001010e

E_WRONG_THREAD

Application called an interface marshaled for another thread

0x8007001f

E_GEN_FAILURE

Device attached to the system is not functioning

0x800700aa

E_BUSY

Requested resource is in use

0x8000000a

E_PENDING

Data necessary to complete this operation is not yet available

0x8001011f

E_TIMEOUT

Operation returned because timeout period expired

Others

Unknown error

Based on the API function name and its return value, you can determine what problem occurred. For example, if Toupcam_put_Size returns 0x80070057 error, it indicates parameter error when setting resolution.

  1. Through EVENT events

Mainly the following four events (passed through messages in Toupcam_StartPullModeWithWndMsg or callback functions in Toupcam_StartPullModeWithCallback or callback functions in Toupcam_StartPushMode V3, V4):

Error Code

Macro Definition

Meaning

0x0080

TOUPCAM_EVENT_ERROR

Unknown error

0x0081

TOUPCAM_EVENT_DISCONNECTED

Camera disconnected

0x0082

TOUPCAM_EVENT_NOFRAMETIMEOUT

No data frame received

0x0085

TOUPCAM_EVENT_NOPACKETTIMEOUT

No data packet received

Have Other Questions?

If your questions remain unanswered, please feel free to contact our technical support team at any time.