GetCapabilityEnum

#include "BiTwain.h"

 

int CALLBACK GetCapabilityEnum(DWORD dwCap, int iMsg, double* pdValue, LPDWORD dwCurIdx, LPDWORD dwDefIdx, DWORD cbBuf, LPDWORD pcbNeeded , LPDWORD pcbReturned)

Description

This function retrieves the values of the capability. You should use this function if the capability container type is TWON_ENUMERATION. If cbBuf is too small, the pcbReturned will be 0 and pcbNeeded will contain the number of valus in the array.

Parameters

DWORD

dwCap

Capability ID. For example ICAP_XRESOLUTION.

Int

IMsg

MSG_GET, MSG_GETCURRENT or MSG_GETDEFAULT

LPDWORD

dwCurIdx

The index of the current value in the enumeration.

LPDWORD

dwDefIdx

The indef of the default value in the enumeration.

double*

pdValue

This parameter stores the values of capability array as doubles

DWORD

cbBuf

Length of the pValue.

LPDWORD

pcbNeeded

Number of values in the array.

LPDWORD

pcbReturned

Number of values in the pdValues returned.

Return values

Returns TW_OK on success, otherwise the error code.

Requirements

Header :     Declared in BiTwain.h; include BiTwain.h.

Library :    Use BiTwain.lib.

DLLs :       BiTwain.dll.