Reasons why device open fails


Up Next

Article ID: Q400001

The information in this article applies to:

  • Direct I/O, version 4.0, 4.1, 4.2, 4.3, 4.4


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.


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.
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.

Direct I/O and Paule are registrated trademarks of Ingenieurbuero Paule. All other products mentioned are registered trademarks or trademarks of their respective owners.
Questions or problems regarding this web site should be directed to Webmaster.
Copyright 1998-2018 Ingenieurbuero Paule. All rights reserved. Impressum.
Last modified: 2018-04-24.
Printer friendly