I have to enumerate DPI's supported by scanner via TWAIN interface.
// after Acquire is called...
TW_CAPABILITY twCap;
GetCapability(twCap, ICAP_XRESOLUTION)
if (twCap.ConType == TWON_ENUMERATION) {
pTW_ENUMERATION en = (pTW_ENUMERATION) GlobalLock(twCap.hContainer);
for(int i = 0; i < en->NumItems; i++) {
if (en->ItemType == TWTY_FIX32) {
TW_UINT32 res = (TW_UINT32)(en->ItemList[i*4]);
// print res...
}
That works fine but output sequence is strange:
50 100 150 44 88 176
I know exactly that my scanner supports 300 DPI but this value doesn't returned. What I do wrong here? Why "300" is not returned in sequence though I can set it programmatically?