INativeCnf Usage: [INative]

The INativeCnf interface is an additional means to access scanner parameters, that are not covered by the generic interface. Before you try to set parameters you should consult the scanner manual to find out which parameters you need to set. Please bear in mind that setting parameters 'manually' might interfere with the generic interface.

This interface as opposed to the generic one is strictly synchronous, so you need to take extra care not to lock up your interface thread. Every function has a uTimeout parameter that will set the time you expect the command to finish. The function will return with an error when the timeout has expired. When setting multiple parameters please keep in mind that you should abort your procedure after the first failed parameter, since otherwise timeouts will accumulate, as the interface is in a disconnected state after the first error.
To retrieve the cause of the error use the functions of the generic interface.

Before you can set or get scanner parameters you will need to call the Open function of the generic interface as usual.

GetString [INative]

SYNOPSIS
GetString( BSTR* pbstrVal, BSTR bstrName, unsigned int uTimeout);

PARAMETERS
pbstrVal
A pointer to a BSTR that will receive the result.
bstrName
The name of the scanner parameter.
uTimeout
A timeout value, specified in milliseconds.

REMARKS
The function allocates a string with the WindowsAPI function SysAllocString. The string will be allocated even in the case, the function fails. So you should call SysFreeString in either case to release the memory associated with the string.

SEE ALSO
Open
PutString


PutString [INative]

SYNOPSIS
PutString( BSTR bstrVal, BSTR bstrName, unsigned int uTimeout);

PARAMETERS
bstrVal
A BSTR that holds the string value to be set.
bstrName
The name of the scanner parameter.
uTimeout
A timeout value, specified in milliseconds.

REMARKS
none

SEE ALSO
Open
GetString


GetInt [INative]

SYNOPSIS
GetInt( int* pnVal, BSTR bstrName, unsigned int uTimeout);

PARAMETERS
pnVal
A pointer to an integer that will receive the result.
bstrName
The name of the scanner parameter.
uTimeout
A timeout value, specified in milliseconds.

REMARKS
none

SEE ALSO
Open
PutInt


PutInt [INative]

SYNOPSIS
PutInt( int nVal, BSTR bstrName, unsigned int uTimeout);

PARAMETERS
nVal
An integer value that is to be set.
bstrName
The name of the scanner parameter.
uTimeout
A timeout value, specified in milliseconds.

REMARKS
none

SEE ALSO
Open
GetInt


Command [INative]

SYNOPSIS
Command( BSTR bstrName, unsigned int uTimeout);

PARAMETERS
bstrName
The name of the scanner command to be executed.
uTimeout
A timeout value, specified in milliseconds.

REMARKS
This function behave idebtically as SetString with an empty value string.

SEE ALSO
Open