Returning Status

A file system filter driver's DriverEntry routine normally returns STATUS_SUCCESS. However, if driver initialization fails, the DriverEntry routine should return an appropriate error status value.

If the DriverEntry routine returns a status value that is not a success status value, the system responds by unloading the driver. For this reason, the DriverEntry routine must always free any memory that was allocated for system resources, such as device objects, before returning a status value that is not a success status value.

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft