ePass1000 C/C++ API Reference Manual Version 2.0

# epas_CreateContext

The epas_CreateContext return a context handle for consequent operation with an ePass1000. This function must be invoked first.

    EPAS_STATUS EPAS_API
    epas_CreateContext(
        EPAS_HANDLE* hContextHandle,      // [out]
        unsigned long ulFlags,            // [in]
        unsigned long ulApiVersion        // [in]
    );

#### Requirement

This function must be invoked first.

#### Parameters

hContextHandle
  [out]Pointer to handle of a device context.
ulFlags
  [in]Reserved for future extension, and must be set to zero.
ulApiVersion
  [in]This parameter will contain a version number of the library, that the application was intended to use. Set this parameter to EPAS_API_VERSION.

#### Return Values

If the function succeeds, FT_SUCCESS returned.

If the library failed to allocate memory for context creation, FT_NOT_ENOUGH_MEMORY returned.

If the library do not support the assigned ulApiVersion, FT_INVALID_API_VERSION returned.

For a list of all return codes, see Status Return Values.

#### Sample Code

    EPAS_STATUS epsRet;
    EPAS_HANDLE handle;

    epsRet = epas_CreateContext(&handle,0,EPAS_API_VERSION);
    if(FT_SUCCESS != epsRet)
        return ERROR;
    .
    .
    .

#### See Also

epas_DeleteContext