www.pudn.com > FileGuard.zip > IniFile.h


// IniFile.h: interface for the CIniFile class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_INIFILE_H__3F3E02E0_A064_11D5_A1DA_00E006F27970__INCLUDED_) 
#define AFX_INIFILE_H__3F3E02E0_A064_11D5_A1DA_00E006F27970__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
#include "..\HookShr\ComDef.h" 
 
typedef int CmpFun(LPCTSTR, LPCTSTR);	//compare function. 
 
class CIniFile   
{ 
protected: 
	CFile m_iniFile; 
	BOOL bIsOpen; 
 
protected: 
	BOOL RemoveOneItem(UINT offset, PROTECTED_FILE * pProtFile); 
	int ReadOneItem(PROTECTED_FILE * const pProtFile, UINT beginPos); 
 
public: 
	BOOL CreateFile(LPCTSTR lpszIniFilePath); 
	BOOL IsAPathIn(LPCTSTR lpszFilePath); 
	UINT m_findIndex; 
	int FindNextItem(PROTECTED_FILE * const pProtFile); 
	int FindFirstItem(PROTECTED_FILE * const pProtFile); 
	BOOL RemoveOneItem(LPCTSTR lpszProtFilePath); 
	BOOL AddOneItem(PROTECTED_FILE * const pProtFile); 
	BOOL TruncateFile(); 
	CIniFile(); 
	BOOL Open(LPCTSTR lpszIniFilePath); 
	CIniFile(LPCTSTR lpszIniFilePath); 
	virtual ~CIniFile(); 
}; 
 
#endif // !defined(AFX_INIFILE_H__3F3E02E0_A064_11D5_A1DA_00E006F27970__INCLUDED_)