]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/utilsexc.cpp
wxUniversal fix.
[wxWidgets.git] / src / msw / utilsexc.cpp
index ecdb0f97927f6c82338f2163d952232aa4fd7ca4..8899b5e0f128fdff2701f2b61c49e3551e9f00fa 100644 (file)
@@ -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;