terminal/src/host/ft_host
Michael Ratanapintha e6e316977d Clean up some misuses of INVALID_HANDLE_VALUE (fixes #427) (#1105)
Almost all functions in the Windows API that open or create objects and return HANDLEs to them return null on failure; only a few (mostly to do with the file system) return INVALID_HANDLE_VALUE on failure. This PR scrubs the repo of a few, but not necessarily all, cases where INVALID_HANDLE_VALUE was mistakenly used or tested against instead of null. In particular, it fixes 2 cases reported in issue #427 where the return value of CreateThread() was compared against INVALID_HANDLE_VALUE against null, causing the error handling code to run at the wrong time.

There are a lot of other uses of INVALID_HANDLE_VALUE I found that looked questionable, but which I left alone. Most of these were used to initialize HANDLE-typed variables and as a sentinel to see if those variables remained unset to a "real" value.

Fixes #427
2019-06-04 13:23:42 -07:00
..
API_AliasTests.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
API_AliasTestsHelpers.hpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
API_BufferTests.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
API_CursorTests.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
API_DimensionsTests.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
API_FileTests.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
API_FillOutputTests.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
API_FontTests.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
API_InputTests.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
API_ModeTests.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
API_OutputTests.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
API_PolicyTests.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
API_RgbColorTests.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
API_TitleTests.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
CanaryTests.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
chafa.txt Merged PR 3215853: Fix spacing/layout for block characters and many retroactively-recategorized emoji (and more!) 2019-05-02 15:29:10 -07:00
CJK_DbcsTests.cpp Clean up some misuses of INVALID_HANDLE_VALUE (fixes #427) (#1105) 2019-06-04 13:23:42 -07:00
Common.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
Common.hpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
DefaultResource.rc inbox PR 3285709: Add chafa resource into the DLL built by Windows Razzle (#912) 2019-05-20 17:06:21 -07:00
Host.FeatureTests.vcxproj Merged PR 3215853: Fix spacing/layout for block characters and many retroactively-recategorized emoji (and more!) 2019-05-02 15:29:10 -07:00
Host.FeatureTests.vcxproj.filters Merged PR 3215853: Fix spacing/layout for block characters and many retroactively-recategorized emoji (and more!) 2019-05-02 15:29:10 -07:00
Host.Tests.Feature.rc Merged PR 3215853: Fix spacing/layout for block characters and many retroactively-recategorized emoji (and more!) 2019-05-02 15:29:10 -07:00
InitTests.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
Message_KeyPressTests.cpp Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
OneCoreDelay.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
OneCoreDelay.hpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
precomp.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
precomp.h Removed using namespace directive from header files (#955) 2019-05-30 11:14:21 -07:00
product.pbxproj Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
resource.h Merged PR 3215853: Fix spacing/layout for block characters and many retroactively-recategorized emoji (and more!) 2019-05-02 15:29:10 -07:00
runtest.bat Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
sources Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
sources.dep Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
testmd.definition inbox: Reflect Windows inbox changes from 20190516 2019-05-16 16:21:33 -07:00