Intellisense / WIA constants and values ​​documentation

Looking at the WIA driver documentation for the WIA_IPS_DOCUMENT_HANDLING_SELECT property , the valid values ​​are listed as:

  • BACK_FIRST
  • BACK_ONLY
  • DUPLEX
  • FRONT_FIRST
  • FRONT_ONLY

Just names, no meanings.

Property documentation from an application developer's point of view ( WIA_IPS_DOCUMENT_HANDLING_SELECT looks the same.

If I want to write the following code using WIA Automation and VB.NET (could just as easily be in C #):

Dim manager = New DeviceManager
Dim deviceinfo = manager.DeviceInfos.Cast(Of DeviceInfo).First() 'Assuming there is an available device
Dim device = deviceinfo.Connect
device.Properties(WIA_IPS_DOCUMENT_HANDLING_SELECT).Value = FRONT_FIRST

      

I cannot do this because these constants are not available from the WIA automation layer and therefore are not available from Intellisense.

I can define the specific constants I need, or use magic numbers when I know them:

device.Properties(3088).Value = ???

      

How can I get these constants in Intellisense without defining them myself, or where is the documentation for the values ​​of these constants?

+3


source to share


1 answer


Do you mean this?

Public Class Const_WIA

    Public Const WIA_RESERVED_FOR_NEW_PROPS As UInt32 = 1024
    Public Const WIA_DIP_FIRST As UInt32 = 2
    Public Const WIA_DPA_FIRST As UInt32 = WIA_DIP_FIRST + WIA_RESERVED_FOR_NEW_PROPS
    Public Const WIA_DPC_FIRST As UInt32 = WIA_DPA_FIRST + WIA_RESERVED_FOR_NEW_PROPS '
    '       //
    '       // Scanner only device properties (DPS)
    '       //
    Public Const WIA_DPS_FIRST As UInt32 = WIA_DPC_FIRST + WIA_RESERVED_FOR_NEW_PROPS
    Public Const WIA_DPS_DOCUMENT_HANDLING_STATUS As UInt32 = WIA_DPS_FIRST + 13
    Public Const WIA_DPS_DOCUMENT_HANDLING_SELECT As UInt32 = WIA_DPS_FIRST + 14
End Class

      



here is a list with the corresponding values

0


source







All Articles