Request trivial sample of 2D texture...

Hi to all!
I need a simple example of a 2D array (of integers) binded to a 2D texture.
I would like the cuda function returns a 1D array of integers, where the data are taken from the 2D texture.
I tried a sample, but I get wrong results.
Can someone give me a complete example using, of necessity, the driver api? Writing code is the code that Host Kernel (Cuda)?
I would like the cuda function returns a 1D array of integers, where the data are taken from the 2D texture. The 2D texture is an integer.
I tried an example, in another programming language, but I get wrong results. It 'possible that I can not perform well fetch the data. Or I do not know.
Can someone give me a complete example using, of necessity, the driver api? Writing code is the code that Host Kernel (Cuda)?
Many thanks in advance! :-)

can anyone help me?
Is It possible that nobody knows how to show an example of a 2D texture elements with integers?

Explore gpu computing sdk, there are a lot of samples using textures there.

Yes, I saw them, but maybe I found a strange thing: if I set “cuTexRefSetFlags(cutexref, 0)” is working, but if i set with flag egual CU_TRSF_READ_AS_INTEGER or CU_TRSF_NORMALIZED_COORDINATES, it’s not working…it’s strange!!
In cuda reference, I must set CU_TRSF_READ_AS_INTEGER for my scope and not “0”.
It can be CU_TRSF_READ_AS_INTEGER (=1) or CU_TRSF_NORMALIZED_COORDINATES (=2), but not “0”.
Is it a bug???

All your code is using the driver API?

Yes…I don’t understand why it is very strange…