<p>the windows nt equivalent of Lucky Star episode 1 is a 15 minute discussion i&#39;ve just had on whether you should be using</p><p> if (hFile != INVALID_HANDLE_VALUE)<br /> CloseHandle(hFile);</p><p>or </p><p> CloseHandle(hFile);</p><p>which involved disassembling kernelbase.dll and ntoskrnl.exe</p><p>(the answer is that you should use the former because CloseHandle retains last error code iff the result is STATUS_SUCCESS)</p>
Reply