Hi,
Without the device, the driver or the documentation is very hard to spott what the problem is. My first question is what type of error do you get? is it a compiler a linker or a run-time error?
You also need to make sure that you are allocating the memory correctly. Some drivers expect you to provide the memory for storing the results froma read, other expectyou to call a function that will allocate the buffers previous to read.
I hope this helps
Regards,
Juan Carlos
N.I.