src/taesooLib/BaseLib/utility/FileEx.cpp
void CFileEx::Close()
{
	if( m_bActiveOvIO ) {
			// just set the stop event.  The IO routine will recall this function
			// on its way out to do the proper close.
		::SetEvent( m_hStop );
		m_bShouldClose = TRUE;
	}else{
		::CloseHandle( m_hFile );
		m_hFile			= NULL;
		m_bOpen			= FALSE;
		m_bShouldClose	= FALSE;
	}

	return;
}
///////////////////////////////////////////////////////////////////////////////
//	Desc:
//		Shuts down all current IO and closes the file.  Calling this rountine
//		is necessary for overlapped IO operations because unpredicatable
//		behavior will occurr if CloseHandle is used directly on m_hFile while
//		an Overlapped I/O operation is in progress.
///////////////////////////////////////////////////////////////////////////////
Shuts down all current IO and closes the file.  Calling this rountine
is necessary for overlapped IO operations because unpredicatable
behavior will occurr if CloseHandle is used directly on m_hFile while
an Overlapped I/O operation is in progress.
Shuts down all current IO and closes the file . Calling this rountine is necessary for overlapped IO operations because unpredicatable behavior will occurr if CloseHandle is used directly on m_hFile while an Overlapped I / O operation is in progress .
void CFileEx::Close()
{
	if( m_bActiveOvIO ) {
		::SetEvent( m_hStop );
		m_bShouldClose = TRUE;
	}else{
		::CloseHandle( m_hFile );
		m_hFile			= NULL;
		m_bOpen			= FALSE;
		m_bShouldClose	= FALSE;
	}
	return;
}
void CFileEx :: Close ( ) { if ( m_bActiveOvIO ) { :: SetEvent ( m_hStop ) ; m_bShouldClose = TRUE ; } else { :: CloseHandle ( m_hFile ) ; m_hFile = NULL ; m_bOpen = FALSE ; m_bShouldClose = FALSE ; } return ; }
Desc:
Shuts down all current IO and closes the file.
Desc : Shuts down all current IO and closes the file .
// just set the stop event.  The IO routine will recall this function // on its way out to do the proper close.