[ 1070686 ] wxOutputStream::Close()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton
2004-11-23 14:26:10 +00:00
parent 95662a8379
commit 8f0ff17851
9 changed files with 45 additions and 16 deletions

View 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;