X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/27d2dbbccadf25bb1d892fe1c4afbf74cf76bb36..f773e9b0bbfd051a4ae316461fd241230c87e39f:/src/msw/utilsexc.cpp diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp index ecdb0f9792..8899b5e0f1 100644 --- a/src/msw/utilsexc.cpp +++ b/src/msw/utilsexc.cpp @@ -179,7 +179,8 @@ class wxPipeOutputStream: public wxOutputStream { public: wxPipeOutputStream(HANDLE hOutput); - virtual ~wxPipeOutputStream(); + virtual ~wxPipeOutputStream() { Close(); } + bool Close(); protected: size_t OnSysWrite(const void *buffer, size_t len); @@ -444,11 +445,12 @@ wxPipeOutputStream::wxPipeOutputStream(HANDLE hOutput) } } -wxPipeOutputStream::~wxPipeOutputStream() +bool wxPipeOutputStream::Close() { - ::CloseHandle(m_hOutput); + return ::CloseHandle(m_hOutput) != 0; } + size_t wxPipeOutputStream::OnSysWrite(const void *buffer, size_t len) { m_lasterror = wxSTREAM_NO_ERROR;