Article ID: Q400001
The information in this article applies to:
- Direct I/O, version 4.0, 4.1, 4.2, 4.3,
4.4
SUMMARY
There are a number of reasons why a call to open a handle to a
Direct I/O device might fail. This article tries to give
the background info and possible actions to be taken.
MORE INFORMATION
When you are writing your own application using
Direct I/O the first thing to do is to open a device handle to
Direct I/O. This is done with a call to the Win32API
function CreateFile(). This call might fail for a number of reasons
returning you the value INVALID_HANDLE_VALUE (-1). To get a hint what failed you should
immediately call the function GetLastError() which will return an error
code.
Below you will find a table with the error codes that apply to
Direct I/O: