// File32.cpp : _xZkqqHx_iDeDiDjDiDhGiDiKiDiBiDjDiDgFiBfLiDfGiDiHiDjD_xHqqkZx_ _xZkqqHx_iDhEiDeAiDeDiDiL_xHqqkZx_
//

#include "stdafx.h"
#include "UtilFile.h"		// For FFDeleteFile.
#include "UtilMisc.h"		// For FiletimeToFdtime.
#include "UtilErr.h"		// For FFThrowFileException.
#include "File32.h"			// This header.

#ifdef _AFX

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

#endif//_AFX

/////////////////////////////////////////////////////////////////////////////
// FCFile32

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::FCFile32
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgGiDhEiDeIiDiLiDgHiDfCiDjDiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.11.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
FCFile32::FCFile32 ()
		:m_hFile(INVALID_HANDLE_VALUE),
		 m_dwDesiredAccess(0)
{
} // FCFile32::FCFile32.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::FCFile32
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDfIiDgHiDiJiDeOiDfOiBeCiDhEiDeAiDeDiDiLiCpAiKeKiCkNiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	wcpFilePath		:_xZkqqHx_iDhEiDeAiDeDiDiLjGlMiCpAiOhHjCoIiBeC_xHqqkZx_
 *			dwDesiredAccess	:_xZkqqHx_iDeJiDhFiDfHiDeGiDeOiDgHiCnGiCmMiDeBiDeOiDfKiDfIiCmMiDfOiDeDiDhGiCpAiOhHjCoIiClFiCnMiClHiBeC_xHqqkZx_
 *				0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CkKiOhHjCoIiClDiCoKiCmEiCkCiClNiCmGiJlMjCoIiClFiCmEjAfGiClFiCkCiDhEiDeAiDeDiDiLiCpA_xHqqkZx_
 *					_xZkqqHx_iNoMjAkMiClFiCnMiClHiBeC_xHqqkZx_ 
 *				TRUNCATE_EXISTING
 *					_xZkqqHx_iDhEiDeAiDeDiDiLiCpAiKeKiCkLiBeBiDhEiDeAiDeDiDiLiCmMiDfEiDeDiDfJiCpA_xHqqkZx_ 0 _xZkqqHx_iDgPiDeDiDgHiCmJiClFiCnMiClHiBeC_xHqqkZx_
 *					_xZkqqHx_iMmEiCnBiPgPiClFjBkEiDhGiDiNiDfKiDfIiCmNiBeB_xHqqkZx_dwDesiredAccess _xZkqqHx_iDhAiDiJiDiBiBfLiDfOiCmFiBeB_xHqqkZx_
 *					_xZkqqHx_iPkNiCmIiCkNiCmGiCoA_xHqqkZx_ GENERIC_WRITE _xZkqqHx_iDeBiDeOiDfKiDfIiMkAiCpAiOhHjCoIiClFiCmIiCkPiCoKiCmO_xHqqkZx_
 *					_xZkqqHx_iCmIiCoIiCnMiClJiCpBiBeCiOhHjCoIiClFiClNiDhEiDeAiDeDiDiLiCkKjBlGiNnNiClFiCmEiCkCiCmIiCkCiPoKiNiHiBeB_xHqqkZx_
 *					_xZkqqHx_iClBiCmMiKnGjAjEiCmNiOlIjEhDiClFiCnMiClHiBeC_xHqqkZx_ 
 *
 * <_xZkqqHx_jCiNiInD_xHqqkZx_>	_xZkqqHx_iOlIjEhDiClFiClNiPoKiNiHiBeBjHoBiKePiCpAjEkNjAlGiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.11.24 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
FCFile32::FCFile32 (const wchar_t* wcpFilePath,
					DWORD dwDesiredAccess,
					DWORD dwShareMode,
					DWORD dwCreationDisposition,
					DWORD dwFlagsAndAttributes)
		:m_hFile(INVALID_HANDLE_VALUE),
		 m_dwDesiredAccess(0)	// Open_xZkqqHx_iOjOiCmM_xHqqkZx_READ/WRITE_xZkqqHx_iDhEiDiJiDePiBeC_xHqqkZx_
{
	if (!Open(wcpFilePath, dwDesiredAccess, dwShareMode, dwCreationDisposition, dwFlagsAndAttributes))
// 06.03.10 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//		FFThrowFileException(CFileException::accessDenied, -1, wcpFilePath);
		FFThrowMiscUnknown();
} // FCFile32::FCFile32.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::~FCFile32
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgGiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.11.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
FCFile32::~FCFile32 ()
{
	Close();
} // FCFile32::~FCFile32.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::Open
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLiCpAiKeKiCkNiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	wcpFilePath		:_xZkqqHx_iDhEiDeAiDeDiDiLjGlMiCpAiOhHjCoIiBeC_xHqqkZx_
 *			dwDesiredAccess	:_xZkqqHx_iDeJiDhFiDfHiDeGiDeOiDgHiCnGiCmMiDeBiDeOiDfKiDfIiCmMiDfOiDeDiDhGiCpAiOhHjCoIiClFiCnMiClHiBeC_xHqqkZx_
 *				0
 *					_xZkqqHx_iDeJiDhFiDfHiDeGiDeOiDgHiCnGiCmMiDgGiDgPiDeDiDfIjGoCiCkCiNiHiCoNiClJiDeBiDeOiDfKiDfIiCpAiOhHjCoIiClFiCnMiClHiBeC_xHqqkZx_
 *					_xZkq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eGiDeOiDgHiCmMiLkEjHeMjFpLjGeAiCpAiOhHjCoIiClFiCnMiClHiBeC_xHqqkZx_
 *							 0 _xZkqqHx_iCpAiOhHjCoIiClHiCoJiCmGiBeBiDeJiDhFiDfHiDeGiDeOiDgHiCpAiLkEjHeMiCmFiCkLiCnMiClJiCpBiBeC_xHqqkZx_
 *				FILE_SHARE_READ
 *					_xZkqqHx_iClBiCoKiImIiNhOiBeBiDeJiDhFiDfHiDeGiDeOiDgHiCpAiKeKiClBiCkEiCmGiClFiClNiCmGiCkLiCmJjDmHiCnNiOoGiCoI_xHqqkZx_
 *					_xZkqqHx_iDeBiDeOiDfKiDfIiCpAjHhGiLiBiClFiClNiPoKiNiHiCmMiCnNiBeBiClLiCmMjBiAiNoMiCpAiLjGiJmCiClFiCnMiClHiBeC_xHqqkZx_ 
 *				FILE_SHARE_WRITE
 *					_xZkqqHx_iClBiCoKiImIiNhOiBeBiDeJiDhFiDfHiDeGiDeOiDgHiCpAiKeKiClBiCkEiCmGiClFiClNiCmGiCkLiCmJiPjBiCkLiNjOiCnN_xHqqkZx_
 *					_xZkqqHx_iDeBiDeOiDfKiDfIiCpAjHhGiLiBiClFiClNiPoKiNiHiCmMiCnNiBeBiClLiCmMjBiAiNoMiCpAiLjGiJmCiClFiCnMiClHiBeC_xHqqkZx_ 
 *			dwCreationDisposition:
 *							_xZkqqHx_iDhEiDeAiDeDiDiLiCkKjBlGiNnNiClHiCoJiPoKiNiHiBeBiCnMiClNiCmNjBlGiNnNiClFiCmIiCkC_xHqqkZx_
 *							_xZkqqHx_iPoKiNiHiCmMiDhEiDeAiDeDiDiLiCmMiIlFiCkCjFpLiCpAiOhHjCoIiClFiCnMiClHiBeC_xHqqkZx_
 *				CREATE_NEW
 *					_xZkqqHx_jAfGiClFiCkCiDhEiDeAiDeDiDiLiCpAiNoMjAkMiClFiCnMiClHiBeCiOhHjCoIiClFiClNiDhEiDeAiDeDiDiLiCkKiKpJiCmJ_xHqqkZx_
 *					_xZkq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UNCATE_EXISTING
 *					_xZkqqHx_iDhEiDeAiDeDiDiLiCpAiKeKiCkLiBeBiDhEiDeAiDeDiDiLiCmMiDfEiDeDiDfJiCpA_xHqqkZx_ 0 _xZkqqHx_iDgPiDeDiDgHiCmJiClFiCnMiClHiBeC_xHqqkZx_
 *					_xZkqqHx_iMmEiCnBiPgPiClFjBkEiDhGiDiNiDfKiDfIiCmNiBeB_xHqqkZx_dwDesiredAccess _xZkqqHx_iDhAiDiJiDiBiBfLiDfOiCmFiBeB_xHqqkZx_
 *					_xZkqqHx_iPkNiCmIiCkNiCmGiCoA_xHqqkZx_ GENERIC_WRITE _xZkqqHx_iDeBiDeOiDfKiDfIiMkAiCpAiOhHjCoIiClFiCmIiCkPiCoKiCmO_xHqqkZx_
 *					_xZkqqHx_iCmIiCoIiCnMiClJiCpBiBeCiOhHjCoIiClFiClNiDhEiDeAiDeDiDiLiCkKjBlGiNnNiClFiCmEiCkCiCmIiCkCiPoKiNiHiBeB_xHqqkZx_
 *					_xZkqqHx_iClBiCmMiKnGjAjEiCmNiOlIjEhDiClFiCnMiClHiBeC_xHqqkZx_ 
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAkMiMpHiClFiClNiPoKiNiHiCmN_xHqqkZx_TRUE_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.11.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL FCFile32::Open (	const wchar_t* wcpFilePath,
						DWORD dwDesiredAccess,
						DWORD dwShareMode,
						DWORD dwCreationDisposition,
						DWORD dwFlagsAndAttributes)
{
//----- 06.01.04 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//#ifdef _DEBUG
//	if (FFGetFileExtension(wcpFilePath) != L".diff~" &&
//		FFGetFileExtension(wcpFilePath) != L".control" &&
//		FFGetFileExtension(wcpFilePath) != L".tmp" &&
//		FFGetFileExtension(wcpFilePath) != L".mdwk" &&
//		FFGetFileExtension(wcpFilePath) != L".dat" &&
//		FFGetFileExtension(wcpFilePath) != L".mdcv" &&
//		FFGetFileExtension(wcpFilePath) != L".txt" &&
//		FFGetFileExtension(wcpFilePath) != L".hep" &&
//		FFGetFileExtension(wcpFilePath) != L".mdpf" &&
//		FFGetFileExtension(wcpFilePath) != L".mdwt" &&
//		FFGetFileExtension(wcpFilePath) != L".hix" &&
//		FFGetFileExtension(wcpFilePath) != L"")
//		ASSERT(g_pFileServer->IsLocked(g_pFileServer->QueryAtom(
//									FFAbnormalizePath(wcpFilePath),
//									FD_YES) ,
//									FCDynamicDb::LOCK_READ));
//#endif//_DEBUG
//----- 06.01.04 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

	ASSERT(m_hFile == INVALID_HANDLE_VALUE);
	// _xZkqqHx_jAoCjBmOiDhAiDfIiCmJjFmPiKlHiBeC_xHqqkZx_
	WString wstrFilePath = FFFullPath(wcpFilePath);
	HANDLE hFile = ::CreateFile(WStrToTStr(wstrFilePath),
								dwDesiredAccess,
								dwShareMode,
								NULL,
								dwCreationDisposition,
								dwFlagsAndAttributes,
								NULL);
	if (hFile == INVALID_HANDLE_VALUE) return FALSE;
	m_hFile = hFile;
	// _xZkqqHx_iDhEiDeAiDeDiDiLiDhAiDfIiCpAjAnNjCoIiBeC_xHqqkZx_
	m_wstrFilePath = wstrFilePath;
	// _xZkqqHx_iDhEiDeAiDeDiDiLjGlMiCpAjAnNjCoIiBeC_xHqqkZx_
	WString wstrFile;
	WString wstrExtension;
	FFSplitFileName(NULL, &wstrFile, &wstrExtension, wstrFilePath);
	m_wstrFileName = wstrFile + wstrExtension;
//----- 05.10.27 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	// Open_xZkqqHx_iOjOiCmM_xHqqkZx_READ/WRITE_xZkqqHx_iDhEiDiJiDePiBeC_xHqqkZx_
	m_dwDesiredAccess = dwDesiredAccess;
//----- 05.10.27 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
	return TRUE;
} // FCFile32::Open.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::Close
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLiCpAjFmCiClGiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.11.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCFile32::Close ()
{
	if (m_hFile != INVALID_HANDLE_VALUE)
	//----- _xZkqqHx_iDhEiDeAiDeDiDiLiCkKiKeKiCkCiCmEiCkCiCoJiPoKiNiH_xHqqkZx_ -----
	{
		// _xZkqqHx_iDgOiDjDiDgIiDiLiCpAjFmCiClGiCoJiBeC_xHqqkZx_
		CloseHandle(m_hFile);
//----- 05.10.27 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
		// Open_xZkqqHx_iOjOiCmM_xHqqkZx_READ/WRITE_xZkqqHx_iDhEiDiJiDePiBeC_xHqqkZx_
		m_dwDesiredAccess = 0;
//----- 05.10.27 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
		// _xZkqqHx_iDgOiDjDiDgIiDiLiCmJjGlDiMpIjCgMiCpAjAnNjCoIiBeC_xHqqkZx_
		m_hFile = INVALID_HANDLE_VALUE;
		// _xZkqqHx_iDhEiDeAiDeDiDiLjGlMiCpAiPmBiLiOiBeC_xHqqkZx_
		m_wstrFilePath.Empty();
		m_wstrFileName.Empty();
	}
} // FCFile32::Close.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::Flush
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLiCpAiDhEiDiJiDgCiDfGiDiFiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.11.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCFile32::Flush ()
{
//----- 06.01.04 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//#ifdef _DEBUG
//	if (FFGetFileExtension(GetFilePathW()) != L".diff~" &&
//		FFGetFileExtension(GetFilePathW()) != L".control" &&
//		FFGetFileExtension(GetFilePathW()) != L".tmp" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdwk" &&
//		FFGetFileExtension(GetFilePathW()) != L".dat" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdcv" &&
//		FFGetFileExtension(GetFilePathW()) != L".hep" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdpf" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdwt" &&
//		FFGetFileExtension(GetFilePathW()) != L".hix" &&
//		FFGetFileExtension(GetFilePathW()) != L"")
//	{
//		ASSERT(g_pFileServer->IsLocked(g_pFileServer->QueryAtom(
//									FFAbnormalizePath(GetFilePathW()),
//									FD_YES) ,
//									FCDynamicDb::LOCK_READ));
//		ASSERT(g_pFileServer->IsLocked(g_pFileServer->QueryAtom(
//									FFAbnormalizePath(GetFilePathW()),
//									FD_YES) ,
//									FCDynamicDb::LOCK_WRITE));
//	}
//#endif//_DEBUG
//----- 06.01.04 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

	ASSERT(m_hFile != INVALID_HANDLE_VALUE);
	FlushFileBuffers(m_hFile);
} // FCFile32::Flush.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::GetFilePathW
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLiCmMiDhEiDiLiDhAiDfIiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLiCmMiDhEiDiLiDhAiDfIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.11.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
const WString& FCFile32::GetFilePathW () const
{
	return m_wstrFilePath;
} // FCFile32::GetFilePathW.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::GetFileNameW
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLiCmMiDhEiDiLiDhAiDfIiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLiCmMiDhEiDiLiDhAiDfIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.11.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
const WString& FCFile32::GetFileNameW () const
{
	// _xZkqqHx_jAkLjEfMiCpAiPgPiClHiClNiCnPiCmJiBeBiClBiCmMiPoKiCmF_xHqqkZx_m_wstrFilePath_xZkqqHx_iCpAjFkKiJpAiClJiClIiBeB_xHqqkZx_
	// m_wstrFileName_xZkqqHx_jFmPjAjEiCpAjHhAiInDiClFiClNiBeC_xHqqkZx_
	// FCFile64_xZkqqHx_iCmFiCmNiBeBiClBiCmMiKnGjAjEiCmMjAkLjEfMiCkKiPgEjHhGiBeC_xHqqkZx_
	return m_wstrFileName;
} // FCFile32::GetFileNameW.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::GetPosition64
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLiImKjChFiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLiImKjChFiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.11.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
flint FCFile32::GetPosition64 () const
{
//----- 06.01.04 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//#ifdef _DEBUG
//	if (FFGetFileExtension(GetFilePathW()) != L".diff~" &&
//		FFGetFileExtension(GetFilePathW()) != L".control" &&
//		FFGetFileExtension(GetFilePathW()) != L".tmp" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdwk" &&
//		FFGetFileExtension(GetFilePathW()) != L".dat" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdcv" &&
//		FFGetFileExtension(GetFilePathW()) != L".hep" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdpf" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdwt" &&
//		FFGetFileExtension(GetFilePathW()) != L".hix" &&
//		FFGetFileExtension(GetFilePathW()) != L"")
//		ASSERT(g_pFileServer->IsLocked(g_pFileServer->QueryAtom(
//									FFAbnormalizePath(GetFilePathW()),
//									FD_YES) ,
//									FCDynamicDb::LOCK_READ));
//#endif//_DEBUG
//----- 06.01.04 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

	ASSERT(m_hFile != INVALID_HANDLE_VALUE);
	return SetFilePointer(m_hFile, 0, NULL, FILE_CURRENT);
} // FCFile32::GetPosition64.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::Seek64
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLiImKjChFiCpAiInKjDkOiClHiCoJiBeCiDiNiDjDiDePiDhEiDeAiDeDiDiLjEmFiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	fliOffset	:_xZkqqHx_iDhEiDeAiDeDiDiLiDhMiDeDiDjDiDfOiCmMiInKjDkOjAjEiBgJiDeJiDhEiDfKiDgCiDgHiBgKiCpAiOhHjCoIiBeC_xHqqkZx_
 *			dwFrom		:_xZkqqHx_iDhEiDeAiDeDiDiLiDhMiDeDiDjDiDfOiCpAiInKjDkOiClHiCoJiClNiCnPiCmMiKeKiOgOjDfPiBgJiKoOiPiAjDfPiBgK_xHqqkZx_
 *						 _xZkqqHx_iCpAiOhHjCoIiClFiCnMiClHiBeC_xHqqkZx_
 *				FILE_BEGIN
 *					_xZkqqHx_iKeKiOgOjDfPiCmN_xHqqkZx_ 0_xZkqqHx_iBeBiCmCiCnMiCoIiDhEiDeAiDeDiDiLiCmMjAoGjDkKiCmFiClHiBeC_xHqqkZx_ 
 *				FILE_CURRENT
 *					_xZkqqHx_iKeKiOgOjDfPiCmNiBeBiDhEiDeAiDeDiDiLiDhMiDeDiDjDiDfOiCmMiMlLiNnNiCmMiImKjChFiCmFiClHiBeC_xHqqkZx_ 
 *				FILE_END
 *					_xZkqqHx_iKeKiOgOjDfPiCmNiBeBiDhEiDeAiDeDiDiLiCmMiPeJiCoNiCoIiBgJ_xHqqkZx_EOF_xZkqqHx_iBgKiCmFiClHiBeC_xHqqkZx_ 
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAfGiClFiCkCiDhEiDeAiDeDiDiLiImKjChFiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.11.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
flint FCFile32::Seek64 (flint fliOffset, DWORD dwFrom)
{
//----- 06.01.04 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//#ifdef _DEBUG
//	if (FFGetFileExtension(GetFilePathW()) != L".diff~" &&
//		FFGetFileExtension(GetFilePathW()) != L".control" &&
//		FFGetFileExtension(GetFilePathW()) != L".tmp" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdwk" &&
//		FFGetFileExtension(GetFilePathW()) != L".dat" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdcv" &&
//		FFGetFileExtension(GetFilePathW()) != L".hep" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdpf" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdwt" &&
//		FFGetFileExtension(GetFilePathW()) != L".hix" &&
//		FFGetFileExtension(GetFilePathW()) != L"")
//		ASSERT(g_pFileServer->IsLocked(g_pFileServer->QueryAtom(
//									FFAbnormalizePath(GetFilePathW()),
//									FD_YES) ,
//									FCDynamicDb::LOCK_READ));
//#endif//_DEBUG
//----- 06.01.04 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

	ASSERT(m_hFile != INVALID_HANDLE_VALUE);
	return SetFilePointer(m_hFile, fliOffset, NULL, dwFrom);
} // FCFile32::Seek64.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::GetLength64
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLjClHiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLjClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.11.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
flint FCFile32::GetLength64 () const
{
//----- 06.01.04 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//#ifdef _DEBUG
//	if (FFGetFileExtension(GetFilePathW()) != L".diff~" &&
//		FFGetFileExtension(GetFilePathW()) != L".control" &&
//		FFGetFileExtension(GetFilePathW()) != L".tmp" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdwk" &&
//		FFGetFileExtension(GetFilePathW()) != L".dat" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdcv" &&
//		FFGetFileExtension(GetFilePathW()) != L".hep" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdpf" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdwt" &&
//		FFGetFileExtension(GetFilePathW()) != L".hix" &&
//		FFGetFileExtension(GetFilePathW()) != L"")
//		ASSERT(g_pFileServer->IsLocked(g_pFileServer->QueryAtom(
//									FFAbnormalizePath(GetFilePathW()),
//									FD_YES) ,
//									FCDynamicDb::LOCK_READ));
//#endif//_DEBUG
//----- 06.01.04 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

	ASSERT(m_hFile != INVALID_HANDLE_VALUE);
	return GetFileSize(m_hFile, NULL);
} // FCFile32::GetLength64.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::SetLength64
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLjClHiCpAjAnNjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	fliNewLen	:_xZkqqHx_iDhEiDeAiDeDiDiLjClHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.11.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCFile32::SetLength64 (flint fliNewLen)
{
//----- 06.01.04 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//#ifdef _DEBUG
//	if (FFGetFileExtension(GetFilePathW()) != L".diff~" &&
//		FFGetFileExtension(GetFilePathW()) != L".control" &&
//		FFGetFileExtension(GetFilePathW()) != L".tmp" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdwk" &&
//		FFGetFileExtension(GetFilePathW()) != L".dat" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdcv" &&
//		FFGetFileExtension(GetFilePathW()) != L".hep" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdpf" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdwt" &&
//		FFGetFileExtension(GetFilePathW()) != L".hix" &&
//		FFGetFileExtension(GetFilePathW()) != L"")
//	{
//		ASSERT(g_pFileServer->IsLocked(g_pFileServer->QueryAtom(
//									FFAbnormalizePath(GetFilePathW()),
//									FD_YES) ,
//									FCDynamicDb::LOCK_READ));
//		ASSERT(g_pFileServer->IsLocked(g_pFileServer->QueryAtom(
//									FFAbnormalizePath(GetFilePathW()),
//									FD_YES) ,
//									FCDynamicDb::LOCK_WRITE));
//	}
//#endif//_DEBUG
//----- 06.01.04 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

	ASSERT(m_hFile != INVALID_HANDLE_VALUE);
	ASSERT(fliNewLen <= GetLength64());
	// _xZkqqHx_iDhEiDeAiDeDiDiLiCmMiMlLiNnNiImKjChFiCpAiLeMjIfOiBeC_xHqqkZx_
	flint fliLastPosition = GetPosition64();
	// _xZkqqHx_iDhEiDeAiDeDiDiLiCmMiMlLiNnNiImKjChFiCkKjAfGiClFiCkCiDhEiDeAiDeDiDiLjClHiCpAiJhKiCkGiCoJiPoKiNiHiCmNiBeBjFoCjAlDiBeC_xHqqkZx_
	if (fliNewLen < fliLastPosition) fliLastPosition = fliNewLen;
	// _xZkqqHx_iDhEiDeAiDeDiDiLiMlLiNnNiImKjChFiCpAiBeBjAfGiClFiCkCiDhEiDeAiDeDiDiLjClHiImKjChFiCmJjAnNjCoIiBeC_xHqqkZx_
	Seek64(fliNewLen, FILE_BEGIN);
	// _xZkqqHx_iDhEiDeAiDeDiDiLiPeJjCfLiCpAiMlLiNnNiImKjChFiCmJjAnNjCoIiBeC_xHqqkZx_
	SetEndOfFile(m_hFile);
	// _xZkqqHx_iDhEiDeAiDeDiDiLiMlLiNnNiImKjChFiCpAiMlDiCmJjGnPiClHiBeC_xHqqkZx_
	Seek64(fliLastPosition, FILE_BEGIN);
} // FCFile32::SetLength64.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::Read64
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgGiBfLiDfOiCpAjDmHiCnNiPgPiClHiBeCiDiNiDjDiDePiDhEiDeAiDeDiDiLjEmFiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	lpBuf	:_xZkqqHx_iDhEiDeAiDeDiDiLiCkJiCoHjDmHiCnNiPgPiClFiClNiDgGiBfLiDfOiCpAiOpDiCkPiOoGiCoJiClNiCnPiCmMiBeB_xHqqkZx_
 *					 _xZkqqHx_iDiGiBfLiDfFiBfLiCkKjHhAiInDiClFiClNiDgPiDgCiDhEiDeAiCnGiCmMiDhMiDeDiDjDiDfOiCpAiOhHjCoIiBeC_xHqqkZx_
 *			fliCount:_xZkqqHx_iDhEiDeAiDeDiDiLiCkJiCoHjDmHiCnNiPgPiClHiNmFjBoFiDgPiDeDiDgHjAjEiCmFiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDgPiDgCiDhEiDeAiCmJjDfNjBjHiClDiCoKiClNiDgPiDeDiDgHjAjEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.11.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
flint FCFile32::Read64 (void* lpBuf, flint fliCount)
{
//----- 06.01.04 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//#ifdef _DEBUG
//	if (FFGetFileExtension(GetFilePathW()) != L".diff~" &&
//		FFGetFileExtension(GetFilePathW()) != L".control" &&
//		FFGetFileExtension(GetFilePathW()) != L".tmp" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdwk" &&
//		FFGetFileExtension(GetFilePathW()) != L".dat" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdcv" &&
//		FFGetFileExtension(GetFilePathW()) != L".hep" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdpf" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdwt" &&
//		FFGetFileExtension(GetFilePathW()) != L".hix" &&
//		FFGetFileExtension(GetFilePathW()) != L"")
//		ASSERT(g_pFileServer->IsLocked(g_pFileServer->QueryAtom(
//									FFAbnormalizePath(GetFilePathW()),
//									FD_YES) ,
//									FCDynamicDb::LOCK_READ));
//#endif//_DEBUG
//----- 06.01.04 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

	ASSERT(m_hFile != INVALID_HANDLE_VALUE);
	DWORD dwNumberOfBytesRead;
	if (ReadFile(m_hFile, lpBuf, fliCount, &dwNumberOfBytesRead, NULL))
	{
		return dwNumberOfBytesRead;
	} else
	{
		return 0;
	}
} // FCFile32::Read64.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::Write64
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgGiBfLiDfOiCpAiPjBiCkLiNjOiCnOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	lpBuf	:_xZkqqHx_iDhEiDeAiDeDiDiLiCmJiPjBiCkLiNjOiCnOiClNiCnPiCmMiDgGiBfLiDfOiCpAjFnLiOjNiClHiCoJiBeBiDiGiBfLiDfFiBfLiCkK_xHqqkZx_
 *					 _xZkqqHx_jHhAiInDiClFiClNiDgPiDgCiDhEiDeAiCnGiCmMiDhMiDeDiDjDiDfOiCpAiOhHjCoIiBeC_xHqqkZx_
 *			fliCount:_xZkqqHx_iDgPiDgCiDhEiDeAiCkJiCoHjDfNjBjHiClDiCoKiCoJiDgPiDeDiDgHjAjEiCpAiOhHjCoIiClFiCnMiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.11.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCFile32::Write64 (const void* lpBuf, flint fliCount)
{
//----- 06.01.04 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//#ifdef _DEBUG
//	if (FFGetFileExtension(GetFilePathW()) != L".diff~" &&
//		FFGetFileExtension(GetFilePathW()) != L".control" &&
//		FFGetFileExtension(GetFilePathW()) != L".tmp" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdwk" &&
//		FFGetFileExtension(GetFilePathW()) != L".dat" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdcv" &&
//		FFGetFileExtension(GetFilePathW()) != L".txt" &&
//		FFGetFileExtension(GetFilePathW()) != L".hep" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdpf" &&
//		FFGetFileExtension(GetFilePathW()) != L".mdwt" &&
//		FFGetFileExtension(GetFilePathW()) != L".hix" &&
//		FFGetFileExtension(GetFilePathW()) != L"")
//	{
//		ASSERT(g_pFileServer->IsLocked(g_pFileServer->QueryAtom(
//									FFAbnormalizePath(GetFilePathW()),
//									FD_YES) ,
//									FCDynamicDb::LOCK_READ));
//		ASSERT(g_pFileServer->IsLocked(g_pFileServer->QueryAtom(
//									FFAbnormalizePath(GetFilePathW()),
//									FD_YES) ,
//									FCDynamicDb::LOCK_WRITE));
//	}
//#endif//_DEBUG
//----- 06.01.04 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

	ASSERT(m_hFile != INVALID_HANDLE_VALUE);
	DWORD dwNumberOfBytesWritten;
	WriteFile(m_hFile, lpBuf, fliCount, &dwNumberOfBytesWritten, NULL);
} // FCFile32::Write64.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::GetFileKind
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iClBiCmMiDeOiDiJiDfIiCmFiIlFiCkEiDhEiDeAiDeDiDiLiCmMiOoNjHnOiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLiCmMiOoNjHnOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	FCBufferFile_xZkqqHx_iCmFiBeBiDhEiDeAiDeDiDiLiCmMiPiIjHjNiCmMjElLjCoIiCmJjHjIjHhAiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.11.26 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
FTFileKind FCFile32::GetFileKind () const
{
	// 32_xZkqqHx_iDhCiDgCiDgHiDhEiDeAiDeDiDiLiBeC_xHqqkZx_
	return FD_FILE_32;
} // FCFile32::GetFileKind.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::IsFileOpened
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLiCkKiKeKiCkCiCmEiCkCiCoJiCkJiCmHiCkEiCkJiCpAjClCiCnHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLiCkKiKeKiCkCiCmEiCkCiCoJiPoKiNiHiCmN_xHqqkZx_ TRUE_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	04.08.26 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL FCFile32::IsFileOpened () const
{
	return (m_hFile != INVALID_HANDLE_VALUE);
} // FCFile32::IsFileOpened.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::GetDesiredAccess
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	Open_xZkqqHx_iOjOiCmMiDeBiDeOiDfKiDfIiDhEiDiJiDePiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDeBiDeOiDfKiDfIiDhEiDiJiDePiBeC_xHqqkZx_
 *				GENERIC_READ
 *					_xZkqqHx_iDeJiDhFiDfHiDeGiDeOiDgHiCnGiCmMjDmHiCnNiOoGiCoIiDeBiDeOiDfKiDfIiCpAiOhHjCoIiClFiCnMiClHiBeC_xHqqkZx_
 *					_xZkqqHx_iDgGiBfLiDfOiCmMjDmHiCnNiOoGiCoIiCmGiDhEiDeAiDeDiDiLiDhMiDeDiDjDiDfOiCmMiInKjDkOiCkKiCmFiCkLiCnMiClHiBeC_xHqqkZx_
 *					_xZkqqHx_jDmHiCnNiPjBiCkLiDeBiDeOiDfKiDfIiCpAiNhDiCkEiCmJiCmNiBeB_xHqqkZx_GENERIC_WRITE _xZkqqHx_iCmGiLkEiCmJiOhHjCoIiClFiCnMiClHiBeC_xHqqkZx_ 
 *				GENERIC_WRITE
 *					_xZkqqHx_iDeJiDhFiDfHiDeGiDeOiDgHiCnGiCmMiPjBiCkLiNjOiCnNiDeBiDeOiDfKiDfIiCpAiOhHjCoIiClFiCnMiClHiBeC_xHqqkZx_
 *					_xZkqqHx_iDgGiBfLiDfOiCmMiPjBiCkLiNjOiCnNiCmGiDhEiDeAiDeDiDiLiDhMiDeDiDjDiDfOiCmMiInKjDkOiCkKiCmFiCkLiCnMiClHiBeC_xHqqkZx_
 *					_xZkqqHx_jDmHiCnNiPjBiCkLiDeBiDeOiDfKiDfIiCpAiNhDiCkEiCmJiCmNiBeB_xHqqkZx_GENERIC_READ _xZkqqHx_iCmGiLkEiCmJiOhHjCoIiClFiCnMiClHiBeC_xHqqkZx_ 
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.10.27 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
DWORD FCFile32::GetDesiredAccess () const
{
	return m_dwDesiredAccess;
} // FCFile32::GetDesiredAccess.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::GetFileTime
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLiCmMiNoMjAkMiOjOiKnEiBeBiDeBiDeOiDfKiDfIiOjOiKnEiBeBiNfIjAfGiOjOiKnEiCpAiOoGjDlOiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	lpCreationTime		:_xZkqqHx_iNoMjAkMiOjOiKnEiCpAiOoGjDlOiBeCjFhDjHhGiCmMiPoKiNiHiCmN_xHqqkZx_NULL_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			lpLastAccessTime	:_xZkqqHx_iDeBiDeOiDfKiDfIiOjOiKnEiCpAiOoGjDlOiBeCjFhDjHhGiCmMiPoKiNiHiCmN_xHqqkZx_NULL_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			lpLastWriteTime		:_xZkqqHx_iNfIjAfGiOjOiKnEiCpAiOoGjDlOiBeCjFhDjHhGiCmMiPoKiNiHiCmN_xHqqkZx_NULL_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iOoGjDlOiCmFiCkLiClNiPoKiNiHiCmN_xHqqkZx_TRUE_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.01.14 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL FCFile32::GetFileTime (FDTIME* lpCreationTime,
							FDTIME* lpLastAccessTime,
							FDTIME* lpLastWriteTime) const
{
	// _xZkqqHx_iNmFiMoDiCmJiPjBiCkLiNjOiCnNiCkKiClDiCoKiClNiOjOiKnEiCpAiLiBiCnPiCoJiBeC_xHqqkZx_
	FILETIME ftCreationTime;
	FILETIME ftLastAccessTime;
	FILETIME ftLastWriteTime;
	if (::GetFileTime(	m_hFile,
						&ftCreationTime,
						&ftLastAccessTime,
						&ftLastWriteTime))
	//----- _xZkqqHx_iOjOiKnEiCpAiOoGjDlOiCmFiCkLiClNiPoKiNiH_xHqqkZx_ -----
	{
		if (lpCreationTime != NULL)
			*lpCreationTime = FiletimeToFdtime(ftCreationTime);
		if (lpLastAccessTime != NULL)
			*lpLastAccessTime = FiletimeToFdtime(ftLastAccessTime);
		if (lpLastWriteTime != NULL)
			*lpLastWriteTime = FiletimeToFdtime(ftLastWriteTime);
		return TRUE;
	} else
	//----- _xZkqqHx_iOjOiKnEiCpAiOoGjDlOiCmFiCkLiCmIiCkCiPoKiNiH_xHqqkZx_ -----
	{
		return FALSE;
	}
} // FCFile32::GetFileTime.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::Remove
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLiCpAiKkOjBfDiCmJiNoNiPjMiClHiCoJiBeCiDhEiDeAiDeDiDiLiCmNjFmCiClGiCmEiCkCiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkCiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	wcpFile	:_xZkqqHx_iDhEiDeAiDeDiDiLjGlMiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jCiNiInD_xHqqkZx_>	static_xZkqqHx_iKnGjAjEiBeCiDeHiDiJiBfLiCmMiPoKiNiHiCmNiBeBjHoBiKePiCpAjEkNjAlGiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.11.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCFile32::Remove (const wchar_t* wcpFile)
{
//----- 04.10.24 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//	if (!FFDeleteFile(wcpFile))
//		FFThrowFileException(CFileException::accessDenied, ::GetLastError(), wcpFile);
//----- 04.10.24 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	FFDeleteFile(wcpFile);
//----- 04.10.24 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
} // FCFile32::Remove.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::Rename
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	32_xZkqqHx_iDhCiDgCiDgHiDhEiDeAiDeDiDiLiCmMiDhEiDeAiDeDiDiLjGlMiCpAjFmPiNfIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	wcpFileFrom	:_xZkqqHx_jFmPiNfIjBePiDhEiDeAiDeDiDiLiCmMiDhAiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			wcpFileTo	:_xZkqqHx_jFmPiNfIiMoDiDhEiDeAiDeDiDiLiCmMiDhAiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.12.26 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCFile32::Rename (	const wchar_t* wcpFileFrom,
						const wchar_t* wcpFileTo)
{
	mywrename(wcpFileFrom, wcpFileTo);
} // FCFile32::Rename.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCFile32::Copy
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	32_xZkqqHx_iDhCiDgCiDgHiDhEiDeAiDeDiDiLiCpAiDfCiDhDiBfLiClHiCoJiBeCiKpJjBlGiCmMiDhEiDeAiDeDiDiLiCkKjBlGiNnNiClHiCoJiPoKiNiHiCmN_xHqqkZx_
 *			_xZkqqHx_iPoDiPjBiCkLiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	wcpFileFrom	:_xZkqqHx_iDfCiDhDiBfLiMlDiDhEiDeAiDeDiDiLiCmMiDhAiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			wcpFileTo	:_xZkqqHx_iDfCiDhDiBfLjAoGiDhEiDeAiDeDiDiLiCmMiDhAiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAkMiMpHiClFiClNiPoKiNiHiCmN_xHqqkZx_TRUE_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.12.22 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL FCFile32::Copy (	const wchar_t* wcpFileFrom,
						const wchar_t* wcpFileTo)
{
	return ::CopyFile(WStrToTStr(wcpFileFrom), WStrToTStr(wcpFileTo), FALSE);
} // FCFile32::Copy.
