Hello,
Please refer to the attachment.
In the attachment, line 273 is highlighted but, it shouldn't be because LpiHandle is NOT equal to INVALID_HANDLE_VALUE. The line that should have been highlighted is line 278 (which is highlighted after single stepping.)
Attached is the project which exhibits the behavior. To make it reach that line, drag and drop any .lpr file onto the window (not .lpi nor .lps, it must be a .lpr), execution will break automatically at line 265, after which, single stepping will cause line 267 to be executed and single stepping again should highlight line 278 instead of line 273.