- This topic has 11 replies, 2 voices, and was last updated 9 hours, 57 minutes ago by Chisymn.
July 17, 2007 at 11:26 am #22173
I tried to compare the capabilities I need for my application and the array of capabilities I get as a respond to dat_capabilities | msg_get with cap = cap_supportedcaps. the items of this array are TW_UINT16.
the only problem I have is, that I am not sure what for example
#define ICAP_XRESOLUTION 0x1118 means. I don’t think that 0x1118 is a integer is it?
thanks for helpJuly 17, 2007 at 12:29 pm #23927
its hex. when I convert those to int I use a 16 bit int,
0x1118 == 4376
.July 17, 2007 at 1:03 pm #23928
thanks, do you know by any chance if there is a command to convert between dec and hex for C respectively C99?July 17, 2007 at 1:46 pm #23929
it’s ok I solved the problem differently – still doesn’t work but I am close…. 😉July 17, 2007 at 5:49 pm #23930
what part doesn’t work for ya?July 18, 2007 at 6:13 am #23931
when I do the cap_supportedcaps msg_get operation I get an array of TW_UINT16 values but they don’t make sense because first of all these values don’t include the converted hex values form caps like XRESOLUTION, BITDEPTH,… and they are defenitely supported. Furthermore there are about 127 values in this array and half of them are listed twice or even three times which is not logical either.
My first thought was that I read the array wrong (like have the index calculated wrong) but it is a bit difficult to find out because the twacker only gives me the names of the caps and not the numbers which are behind them. So I have to find another cap which puts it’s values in an array to be able to compare the twacker result and mine.July 18, 2007 at 7:48 am #23932
what device are you using? If you are using a common device I can shoot you the values as int and hex and their names from my app.July 18, 2007 at 8:36 am #23933
thanks a lot, but I know the values of the caps in hex and int I just can’t find out why the array I get back is full of nonsence.
I tried to find another cap which also gives back an array, but there is none which is supported by my device (which is a Canon pixma MP780 by the way) so I guess I won’t use this cap_supportedcaps fkt and replace it with something that works a bit betterJuly 18, 2007 at 9:41 am #23934
could be your canon acting goofy – check if you get regular values from the sample twain source and from a kodak driver in simulation mode.
.July 18, 2007 at 10:32 am #23935
checked the Canon with Twacker -> works
checked my proram on Sample Source -> doesn’t work
I guess it is something in my prog 😡 but well it is not that important, I guess I will check every cap before I set it anyway so cap_supportedcaps is superfluously anywayJuly 18, 2007 at 10:39 am #23936
if you’re already running thru each of the caps, you may benefit from checking querysupport – it should provide you with infomation about what ops are supported for each of the caps.July 18, 2007 at 11:17 am #23937
thanks for the hint will have a look at it