Home › Forums › TWAIN Classic › ICAP_ROTATION No effect
- This topic has 2 replies, 2 voices, and was last updated 15 years, 10 months ago by Deficiency.
- AuthorPosts
Hi all!
So i have a little problem.
I try to set the Rotation but it has no effect.
First i try to set the rotation inside, when i open my DataSource like this:
//init -rotatation
TW_CAPABILITY twCapability;
TW_INT16 rc;
TW_UINT32 NumberOfItems;
twCapability.Cap = ICAP_ROTATION; // Capability of Interest
twCapability.ConType = TWON_ONEVALUE;
pTW_ONEVALUE pvalOneValue;
TW_BOOL valueBool = true;;
twCapability.hContainer = GlobalAlloc(GHND, sizeof(TW_ONEVALUE));
pvalOneValue = (pTW_ONEVALUE)GlobalLock(twCapability.hContainer);
pvalOneValue->ItemType = TWTY_UINT16;
pvalOneValue->Item = TWOR_ROT90;
GlobalUnlock(twCapability.hContainer);
//
MSG_SET
// do{
rc = (*g_pDSM_Entry)(&g_AppID,
&g_SrcID,
DG_CONTROL,
DAT_CAPABILITY,
MSG_SET,
(TW_MEMREF)&twCapability);
GlobalFree(twCapability.hContainer);
But this has no effect. So i try the same when i scan the picture again no effect.
Is the line write?
pvalOneValue->Item = TWOR_ROT90;Do you have an hint?
thx
DeficiencyYour code looks pretty good. “Item”, also, is set correctly. Are you setting this capability in TWAIN state == 4 ???
I suppose you get rc > 0 after calling the DSM entry point.
Have you checked the TWAIN status using this triplet: DG_CONTROL, DAT_STATUS, MSG_GET ? Which is the status that you get ?
(Currently I am receiving several TWCC_BADVALUE, but just when I try to set a TW_FIX32 capability.)
@alvise wrote:
Your code looks pretty good. “Item”, also, is set correctly. Are you setting this capability in TWAIN state == 4 ???
I suppose you get rc > 0 after calling the DSM entry point.
Have you checked the TWAIN status using this triplet: DG_CONTROL, DAT_STATUS, MSG_GET ? Which is the status that you get ?
(Currently I am receiving several TWCC_BADVALUE, but just when I try to set a TW_FIX32 capability.)
thanks for you answer. I will check when i set it and which state it is. Is state 4 the right state?
Thx
- AuthorPosts