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:
Error |
Code |
Reason |
Action |
2 |
ERROR_FILE_NOT_FOUND |
The driver is not running. |
Start the driver using the control panel or by typing NET START
DIRECTIO. |
5 |
ERROR_ACCESS_DENIED |
Your process is not allowed to access Direct I/O (see security
configuration). |
Add your process to the list of allowed processes. Check article Q400002 for possible problems. |
8 |
ERROR_NOT_ENOUGH_MEMORY |
Not enough memory to complete this operation. |
Reboot. |
317 |
ERROR_MR_MID_NOT_FOUND |
This is a misleading error because the kernel driver error is
STATUS_ILL_FORMED_SERVICE_ENTRY which exactly describes the problem:
A registry entry of Direct I/O is damaged.
But Microsoft didn't manage to translate this error to user mode. |
Reinstall
Direct I/O. |
478
1450 |
ERROR_NO_SYSTEM_RESOURCES |
The resources you selected conflict with others already in use by
Windows NT. |
Resolve the conflict using the control panel. |
1793 |
ERROR_ACCOUNT_EXPIRED |
The evaluation time of
Direct I/O is over. |
Please license your copy or uninstall
Direct I/O. |