From: bilm on
I use create file to get a handle for DVD devices. For the 1st parameter
(lpFileName) I use the actual device
(setupdi GUID_DEVINTERFACE_CDROM/DeviceInterfaceDetailData/DevicePath).
This is what is recommended by MS.
I don't use the volume (\\.\Cdrom1) or letter (\\.\D:).

Do createfile's flags (dwFlagsAndAttributes parameter)
FILE_FLAG_NO_BUFFERING, FILE_FLAG_RANDOM_ACCESS, FILE_FLAG_SEQUENTIAL_SCAN
and FILE_FLAG_WRITE_THROUGH
have any effect on a device with such a handle ?

If so, which combination would result in the fastest read & write speed ?

Info about these devices:
DVD drives have a built-in cache buffer usually around 2MB although the
programmer can by-pass it and read directly from or write directly to the
disc. It's critical to maintain an uninterrupted flow of data to or from the
disc during a read or write operation and for this reason I always use the
cache and include a ring buffer for insurance. During a write, data is read
up from the harddrive into the ring buffer and from there into the device's
cache buffer which feeds it to the disc.

bilm