c# - WIA 2.0 WIA_DPS_DOCUMENT_HANDLING_STATUS doesn't seem to be updating - scanner specific? -


i have hp officejet pro 8600 plus all-in-one , using wia 2.0 implement own scanning ui , logic.

if read documentation here (https://msdn.microsoft.com/en-us/library/windows/hardware/ff551386(v=vs.85).aspx) correctly, looks feed_ready should update pages being scanned. seems people using check. have found following sample code in several posts:

                    //determine if there more pages waiting                     wia.property documenthandlingselect = null;                     wia.property documenthandlingstatus = null;                     foreach (wia.property prop in device.properties)                     {                     if (prop.propertyid == wia_properties.wia_dps_document_handling_select)                             documenthandlingselect = prop;                     if (prop.propertyid == wia_properties.wia_dps_document_handling_status)                             documenthandlingstatus = prop;                     }                     // assume there no more pages                     hasmorepages = false;                     // may not exist on flatbed scanner required feeder                     if (documenthandlingselect != null)                     {                         // check document feeder                         if ((convert.touint32(documenthandlingselect.get_value()) &                          wia_dps_document_handling_select.feeder) != 0)                         {                             hasmorepages = ((convert.touint32(documenthandlingstatus.get_value()) &                              wia_dps_document_handling_status.feed_ready) != 0);                         }                     } 

in code following check (which similar sample code above doing):

                ...connect _scanner                  foreach (property p in _scanner.properties)                 {                     if (p.name == wia_dps_document_handling_status)                     {                         value = p.get_value();                     }                 }                  images.add(dialog.showtransfer(_scanner.items[1], formatid.wiaformatjpeg, false) imagefile);                  foreach (property p in _scanner.properties)                 {                     if (p.name == wia_dps_document_handling_status)                     {                         value = p.get_value();                     }                 } 

here's seeing:

  1. if have loaded page in scanner before connecting it, both get_value() return feed_ready.
  2. if have not loaded page before connecting it, before first foreach loop (mimicking user might do), both get_value() not return feed_ready

in either case, i'd expect first foreach loop return feed_ready , second not return feed_ready since page has correctly been scanned.

is scanner specific? i.e. bad driver implementation hp? couldn't find sort of 'refresh' capability. also, samples have found seem indicate should work.

i tried set front_first | duplex handle duplex scanning wia_ips_document_handling_select, got out of range error. instead set feeder | duplex documentation seem feeder used on xp , obsolete on newer oses.

any insights? scanner specific, i.e. based on how implement driver? struck me sample code might have worked wia 1.0 not wia 2.0.


Comments

  1. Really its very useful information that you have shared and thanks for sharing the information with us.
    123 HP Deskjet 2513

    ReplyDelete

Post a Comment

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -