Pros and Corns of WriteFile n DeviceIoControl in usb driver

My USB driver code is such that user can write data to device using WriteFile as well as by passing IOCTL_BULK_WRITE in DeviceIoControl. I am planning to expose only one kind of interface to the user for writing to device. Please suggest which will be a better option and why ?

Outside of file systems, ReadFile/WriteFile is a bit of a rarity. Typically drivers use IOCTLs for the same purposes b/c you can add more contextual information (since you have 2 buffers) and you can use a different IOCTL value to do a different type of read/write than another IOCTL.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Wednesday, August 27, 2008 11:46 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Pros and Corns of WriteFile n DeviceIoControl in usb driver

My USB driver code is such that user can write data to device using WriteFile as well as by passing IOCTL_BULK_WRITE in DeviceIoControl. I am planning to expose only one kind of interface to the user for writing to device. Please suggest which will be a better option and why ?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer