GetCapabilityOneValue

#include "BiTwain.h"

 

int CALLBACK GetCapabilityOneValue(DWORD dwCap, int iMsg, LPSTR szValue, DWORD cbBuf, LPDWORD pcbNeeded , LPDWORD pcbReturned)

Description

This function retrieves the value of the capability. You should use this function if the capability type is TWON_ONEVALUE. If cbBuf is too small, the pcbReturned will be 0 and pcbNeeded will contain the bytes required to store the value of capability.

Parameters

DWORD

dwCap

Capability ID. For example CAP_FEEDERENABLED.

Int

IMsg

MSG_GET, MSG_GETCURRENT or MSG_GETDEFAULT

LPSTR

szValue

This parameter stores the value of capability as text.

DWORD

cbBuf

Length in bytes of szValue

LPDWORD

pcbNeeded

Legth in bytes of szValue required.

LPDWORD

pcbReturned

Length in bytes of text 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.