Home › Forums › TWAIN Classic › ICAP_BRIGHTNESS setting is ignored (?) › Reply To: ICAP_BRIGHTNESS setting is ignored (?)
January 20, 2010 at 9:59 pm #24466
An application can not force the kind of container a DS will return for a MSG_GET. The code below will not ensure you will receive a Range. Always check the kind of container returned before processing it. The Container passed to the DS to fill should be empty.
TwCapability capbright = new TwCapability(TwCap.ICAP_BRIGHTNESS, TwOn.Range, TwType.Fix32, -1);
rc = DScap(appid, srcds, TwDG.Control, TwDAT.Capability, TwMSG.Get, capbright);
Many DS do not support constraining capabilities when the UI is displayed. If they do, MSG_GET will first need to return an Enumeration or Range.
MSG_GET to get possible values.
MSG_SET using the same container type but with only the limited values.