ImageGear for C and C++ on Windows v19.9 - Updated
IG_TWAIN_cap_create
API Reference Guide > TWAIN Component API Reference > TWAIN Component Functions Reference > Capability Functions > IG_TWAIN_cap_create

This function creates a new capability container.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_TWAIN_cap_create(
        AT_LMODE nCap,
        AT_MODE nContainerType,
        AT_MODE nItemType,
        LPHTWAINCAP lphTWAINCap
);

Arguments:

Name Type Description
nCap AT_LMODE The numeric designator of the capability (of the form IG_TW_CAP_xxxx, IG_TW_ICAP_xxxx, or IG_TW_ACAP_xxxx).
nContainerType AT_MODE

Capability container type. Can be one of the following values:

  • IG_TW_ON_ONEVALUE - A single value whose current and default values are coincident. The range of available values for this type of capability is simply this single value. For example, a capability that indicates the presence of a document feeder could be of this type.
  • IG_TW_ON_ARRAY - A rectangular array of values that describe a logical item. It is similar to the IG_TW_ON_ONEVALUE because the current and default values are the same and there are no other values from which to select. For example, a list of the names, such as the supported capabilities list returned by the IG_TW_CAP_SUPPORTEDCAPS capability, would use this type of container.
  • IG_TW_ON_ENUMERATION - This is the most general type because it defines a list of values from which the Current Value can be chosen. The values do not progress uniformly through a range and there is not a consistent step size between the values. For example, if a Source's resolution options did not occur in even step sizes then an enumeration would be used (for example, 150, 400, and 600).
  • IG_TW_ON_RANGE - Many capabilities allow users to select their current value from a range of regularly spaced values. The capability can specify the minimum and maximum acceptable values and the incremental step size between values. For example, resolution might be supported from 100 to 600 in steps of 50 (100, 150, 200, ..., 550, 600).
nItemType AT_MODE

Capability data type. Can be one of the following values:

  • AM_TID_META_INT8
  • AM_TID_META_UINT8
  • AM_TID_META_INT16
  • AM_TID_META_UINT16
  • AM_TID_META_INT32
  • AM_TID_META_UINT32
  • AM_TID_META_BOOL
  • AM_TID_META_DOUBLE
  • AM_TID_META_STRING32
  • AM_TID_META_STRING64
  • AM_TID_META_STRING128
  • AM_TID_META_STRING255
  • AM_TID_META_STRING1024
  • AM_TID_META_STRING_UNICODE512
  • AM_TID_META_DRECT
lphTWAINCap LPHTWAINCAP Handle to the created capability container. References the container structure where detailed information about the capability is stored.

Return Value:

Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

This function does not process image pixels.