Home › Forums › TWAIN Classic › C# and SEHException when reading capability, any idea
- This topic has 2 replies, 2 voices, and was last updated 13 years, 3 months ago by Denis.
- AuthorPosts
hey,
i am trying to query capabilities and get SEHException with one of my scanners (HP 4700). when I query this capability with Twacker it works fine. Does anybody have any idea what i can look? any general trace or something. it seems that i send everything right (at least on many different scanners it works fine too).
i initialize TW_CAPABILITY following:
[StructLayout(LayoutKind.Sequential, Pack = 2)]
public class Tw_Capability
{
public ushort Capability;
public ushort ContainerType;
public IntPtr hContainer;
….
}t.Capability= (ushort)cap;
t.ContainerType= 0xffff;
t.hContainer = IntPtr.Zero;i really lost what i can do to investigate the issue 🙁
thank you!
DenisTry with the WIA Twain source for the scanner.
If it works, you might be facing a problem with HP’s TWAIN drivers. I’ve hit that with another model of them, see this thread in their support forums:
yes, with WIA it works fine. i barely can understand why it works with native code and does not with managed. also as i see in your thread the problem is 2-3 years old and i have new drivers. very strange…
THANK YOU VERY MUCH for this point!
- AuthorPosts