src/taesooLib/BaseLib/utility/FileEx.cpp
///////////////////////////////////////////////////////////////////////////////
//	Desc:
//		This function will write data to from a file and call a user defined
//		callback function after each segment is written. The segment size
//		can be set with SetOvSegReadWriteSize.
///////////////////////////////////////////////////////////////////////////////
This function will write data to from a file and call a user defined
callback function after each segment is written. The segment size
can be set with SetOvSegReadWriteSize.
This function will write data to from a file and call a user defined callback function after each segment is written . The segment size can be set with SetOvSegReadWriteSize .
DWORD CFileEx::WriteOv( BYTE* pBuffer, DWORD dwSize, LPFN_LRGFILEOP_PROGCALLBACK lpCallback, LPVOID pParam, BOOL bUseMsgPump )
{
	DWORD dwWrote = 0;
	IsOpenThrows();
	if( pBuffer ) {
		m_bActiveOvIO = TRUE;
		if( bUseMsgPump ) {
			dwWrote = DoFileOperationWithMsgPump( TRUE, pBuffer, dwSize, lpCallback, pParam );
		}else{
			dwWrote = DoFileOperation( TRUE, pBuffer, dwSize, lpCallback, pParam );
		}
		m_bActiveOvIO = FALSE;
		if( m_bShouldClose ) {
			Close();
		}
	}else{
		ThrowErr( FILEEX_ERR_INVALIDPARAM, TRUE );
	}
	return dwWrote;
}
DWORD CFileEx :: WriteOv ( BYTE * pBuffer , DWORD dwSize , LPFN_LRGFILEOP_PROGCALLBACK lpCallback , LPVOID pParam , BOOL bUseMsgPump ) { DWORD dwWrote = 0 ; IsOpenThrows ( ) ; if ( pBuffer ) { m_bActiveOvIO = TRUE ; if ( bUseMsgPump ) { dwWrote = DoFileOperationWithMsgPump ( TRUE , pBuffer , dwSize , lpCallback , pParam ) ; } else { dwWrote = DoFileOperation ( TRUE , pBuffer , dwSize , lpCallback , pParam ) ; } m_bActiveOvIO = FALSE ; if ( m_bShouldClose ) { Close ( ) ; } } else { ThrowErr ( FILEEX_ERR_INVALIDPARAM , TRUE ) ; } return dwWrote ; }
Desc:
This function will write data to from a file and call a user defined
callback function after each segment is written.
Desc : This function will write data to from a file and call a user defined callback function after each segment is written .
// this close rountine will now actually shut the file because  // the m_bActiveOvIo flag is false.