I have some C# code that is calling CreateFile on a different physical device path each time through a loop(ie \.\PhysicalDrive1, then \.\PhysicalDrive2, ...) via pInvoke and then using the returned handle do some other low level windows stuff. At the end of the loop it calls CloseHandle on the handle.
While debugging I noticed that the int value of the handle was the same each pass through the loop. I can see this being either expected (windows is just reusing the handle) or unexpected (the handle wasn't released last pass).
So I just want to verify whether or not this is expected (or at least not incorrect) behaviour.