This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

35XX MADC driver embedded pointer w/CE 6?

I was looking to use the MADC driver from the A8_1.0.0 35XX BSP.

I wanted to pass some ADC reading to my user space application.

I noticed they are using embedded pointers to user space buffers in the IOCTRL calls. I was under the impression this is a big time no-no under CE 6.

Are my assumptions correct?

  • I suppose you are talking about pOutBuffer used in IOCTL_MADC_READVALUE. This is not exactly an "embedded pointer" as defined under WinCE, and which we should be very careful of as you pointed out. An embedded pointer would be the case where pOutbuffer points to a structure which contains a pointer to a user space memory location. In that case, you have to manually "marshall" this second pointer to properly use it inside your kernel mode driver. Pointers such as pOutbuffer and pInbuffer in drivers are automatically marshalled by the kernel before the XXX_IoControl function is called, and can be used safely as done in the MADC driver.

  • Thank you for "pointing" out the difference. I knew it had something to do with pointers ...this is clear now.