Home › Forums › TWAIN Classic › How to set Automatic border detection
- This topic has 1 reply, 2 voices, and was last updated 17 years, 3 months ago by Dark Angel.
- AuthorPosts
Hi,
I’m writing a win32C++ twain application to operate EPSON 10000XL flatbed scanner. I have been able to open and scan images successfully. But I’m struggling to change the capabilities.
Specillay I want to set the following two boolean capabilities to TRUE.
ICAP_AUTOMATICBORDERDETECTION
ICAP_AUTOMATICROTATEI tried it in the following manner.
– Load the TWAIN DLL and collect DSM Entry Proc.
– Send triplet (DG_CONTROL,DAT_PARENT,MSG_OPENDSM):
received success.– Send triplet (DG_CONTROL,DAT_IDENTITY,MSG_USERSELECT):
received success. Selected 10000XL.– Send triplet (DG_CONTROL,DAT_IDENTITY,MSG_OPENDS):
received success.– Send triplet (DG_CONTROL,DAT_CAPABILITY,MSG_SET):
twCapability.Cap = CAP_XFERCOUNT;
twCapability.ConType = TWON_ONEVALUE;
value is set to 1
received success.– Send triplet (DG_CONTROL,DAT_CAPABILITY,MSG_SET):
twCapability.Cap = ICAP_UNDEFINEDIMAGESIZE;
twCapability.ConType = TWON_ONEVALUE;
value is set to TRUE (1)
received failure– Send triplet (DG_CONTROL,DAT_CAPABILITY,MSG_SET):
twCapability.Cap = ICAP_AUTOMATICBORDERDETECTION;
twCapability.ConType = TWON_ONEVALUE;
value is set to TRUE (1)
received failurePlease help me to find out what causes my last two calls to fail.
Thanking you in advance.
Best Regards,
FF
maybe the source doesn’t support this capability
try to negotiate the source about the capability if it’s supported.
DG_Control/ DAT_Capability/ MSG_QuerySupport
if it returns 0 then the capability is not supported
if it returns 13 the capability is readonly
if it returns 31 the capability is supported- AuthorPosts