Home › Forums › TWAIN Classic › Bad TWAIN structure definition › Reply To: Bad TWAIN structure definition
May 9, 2008 at 8:24 pm #24491
Yes Jim, the pragma directive is exactly the one that you have typed. Afterall it comes with the original twain.h, and I have no reason to change it. And in fact I haven’t.
I confirm what you say, __BORLANDC__ is the compiler identifier, and for the Borland’s compiler the directive is #pragma -a2 and not #pack (2).
And looking into the data segment, the structures appear to be word aligned (every 2 bytes, even addresses, according to the #pragma -a2 directive). But the fact is that words in the data segment appear to be swapped.
Thanks for your interest. Alvise.