I am currently creating a "driverless driver".
I just want to know the standard practice for working with driver handles, the CreateFile call creates a handle to my driver, is it ok to do that only once on program startup or is it better to create a new handle and close it for each ioctl request?
Another question is, if I accidentally don't close a driver handle and then in visual studio I "stop debugging" therefore terminating the process, what would happen to the driver? would the handle be left unclosed and cause problems or does the operating system close all the handles for me?
I couldn't find this info on google so this is the only place I thought I could ask ;)
Thanks
I just want to know the standard practice for working with driver handles, the CreateFile call creates a handle to my driver, is it ok to do that only once on program startup or is it better to create a new handle and close it for each ioctl request?
Another question is, if I accidentally don't close a driver handle and then in visual studio I "stop debugging" therefore terminating the process, what would happen to the driver? would the handle be left unclosed and cause problems or does the operating system close all the handles for me?
I couldn't find this info on google so this is the only place I thought I could ask ;)
Thanks