比如它有
[Registry]
Root: HKCU; Subkey: my; ValueType: string; ValueName: ...; ValueData: {app}\my.exe;
Root: HKCU; Subkey: my; ValueType: string; ValueName: MyID; ValueData: 12345;
如果得知他有两个子项???
5 个解决方案
#1
那就把section下的所有项,然后你根据子项的特点来判断它有几个子项
#2
读出section下的所有项,然后你根据子项的特点来判断它有几个子项
#3
如何读所有项?
#4
使用下边这个函数读出所有项, 然后根据NULL的个数计算各个子项.
DWORD GetPrivateProfileSection(
LPCTSTR lpAppName,
LPTSTR lpReturnedString,
DWORD nSize,
LPCTSTR lpFileName
);
DWORD GetPrivateProfileSection(
LPCTSTR lpAppName,
LPTSTR lpReturnedString,
DWORD nSize,
LPCTSTR lpFileName
);
#5
我封装的ini 类【类似于Delphi使用习惯】
// IniFilesDef.h: interface for the CIniFile class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_INIFILES_IMP_H__810C0A02_A7DF_4D48_A32E_033ADAF59235__INCLUDED_)
#define AFX_INIFILES_IMP_H__810C0A02_A7DF_4D48_A32E_033ADAF59235__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
typedef int INT ;
typedef struct
{
} INIITEMS;
class CIniFile
{
public:
CIniFile();
CIniFile (LPCTSTR );
//viratul function , can be rewritten
virtual ~CIniFile();
virtual CString ReadStrings (const char* Section,const char* Ident,const char* Default);
virtual BOOL WriteString (const char* Section,const char* Ident,const char* Value);
virtual INT ReadInteger (const char* Section,const char* Ident,int Default);
virtual BOOL WriteInteger(const char* Section,const char* Ident,int Value);
virtual BOOL ReadBoolean (const char* Section,const char* Ident,bool Default);
virtual BOOL WriteBoolean(const char* Section,const char* Ident,bool Value);
virtual BOOL ReadSection (const char* Section,CStringList & cstLst);
virtual BOOL SectionExists(const char* Section);
virtual void UpdateFile ();
virtual BOOL EraseSection (const char* Section );
virtual BOOL DeleteKey (const char* Section ,const char* Ident);
void SetIniFileName (const char* );
protected :
LPSTR m_IniFileName;
};
#endif // !defined(AFX_INIFILES_IMP_H__810C0A02_A7DF_4D48_A32E_033ADAF59235__INCLUDED_)
+++++++++++++++++++++++++++
.cpp 文件
+++++++++++++++++++++++++++
// IniFileDef.cpp: implementation of the CIniFile class.
// Purpose: To implement myself INI file class.
// Author: Mixtrue mixtrue@hotmail.com
// Date: MAY 8 2004
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "IniFile.h"
#include "IniFilesDef.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
#define MAXSIZE 2048
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CIniFile::CIniFile() : m_IniFileName("./Configuration.ini")
{
}
CIniFile::CIniFile(LPCTSTR FileName) : m_IniFileName("./Configuration.ini")
{
m_IniFileName =(char*) FileName;
}
CIniFile::~CIniFile()
{
}
void CIniFile::SetIniFileName (const char* FileName)
{
m_IniFileName=(char*) FileName;
}
//Read a string from a configuration file
CString CIniFile::ReadStrings (const char* Section,const char* Ident,const char* Default)
{
char ReturnedString[100]="";
CString strStr="";
GetPrivateProfileString(Section,Ident,"",ReturnedString,sizeof(ReturnedString),m_IniFileName);
strStr=ReturnedString;
if (strStr.GetLength==0)
strStr=Default;
else
strStr =ReturnedString;
return strStr;
}
//Write a string to configuration file
BOOL CIniFile::WriteString (const char* Section,const char* Ident,const char* Value)
{
return WritePrivateProfileString(Section,Ident,Value,m_IniFileName);
}
//To write an integer to configuration
BOOL CIniFile::WriteInteger(const char* Section,const char* Ident,int Value)
{
char buff [9]="";
itoa(Value,buff,10);
return WriteString(Section,Ident,buff);
}
//Read an Integer value from specific section and Ident.
INT CIniFile::ReadInteger (const char* Section,const char* Ident,int Default=0)
{
CString strOut;
strOut= ReadStrings (Section,Ident,"0");
if (strOut.GetLength ()==0)
strOut="0";
return atoi(strOut.GetBuffer (strOut.GetLength ()));
}
//Read a boolean value from specific section and Ident.
BOOL CIniFile::ReadBoolean (const char* Section,const char* Ident,bool Default)
{
CString strIn,strOut;
if (Default)
strIn="TRUE";
else
strIn="FALSE";
strIn.MakeUpper ();
strOut =ReadStrings (Section,Ident,strIn.GetBuffer (strIn.GetLength ()));
strOut.MakeUpper ();
if ((strOut == "FALSE") || (strOut.GetLength ()==0))
return false;
else
return true;
}
//Write a bool value to file
BOOL CIniFile::WriteBoolean (const char* Section,const char* Ident,bool Value)
{
if (Value)
return WriteString (Section,Ident,"TRUE");
else
return WriteString (Section,Ident,"FALSE");
}
//Erase a section
BOOL CIniFile::EraseSection (const char* Section )
{
return WritePrivateProfileString(Section,NULL,NULL,m_IniFileName);
}
//Delete a key
BOOL CIniFile:eleteKey (const char* Section ,const char* Ident)
{
return WritePrivateProfileString(Section,Ident,NULL,m_IniFileName);
}
//Reflush the File .
void CIniFile::UpdateFile ()
{
WritePrivateProfileString(NULL, NULL, NULL, m_IniFileName);
}
BOOL CIniFile::SectionExists(const char* Section)
{
//LVITEM lvIm;
return true;
}
BOOL CIniFile::ReadSection (const char* Section,CStringList & cstLst)
{
char buff[MAXSIZE];
char* p=NULL;
CString strTemp;
cstLst.RemoveAll ();
int ReadSize=GetPrivateProfileString(Section, NULL, NULL, buff, MAXSIZE,m_IniFileName);
if (!ReadSize) {
TRACE0(_T("Can not read specific Section from Configuration file"));
return false;
} else {
strTemp=buff; p=buff;
while ((*p)!='\0') {
p+= strTemp.GetLength()+1;
cstLst.AddHead (p);
}
return true;
}
}
// IniFilesDef.h: interface for the CIniFile class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_INIFILES_IMP_H__810C0A02_A7DF_4D48_A32E_033ADAF59235__INCLUDED_)
#define AFX_INIFILES_IMP_H__810C0A02_A7DF_4D48_A32E_033ADAF59235__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
typedef int INT ;
typedef struct
{
} INIITEMS;
class CIniFile
{
public:
CIniFile();
CIniFile (LPCTSTR );
//viratul function , can be rewritten
virtual ~CIniFile();
virtual CString ReadStrings (const char* Section,const char* Ident,const char* Default);
virtual BOOL WriteString (const char* Section,const char* Ident,const char* Value);
virtual INT ReadInteger (const char* Section,const char* Ident,int Default);
virtual BOOL WriteInteger(const char* Section,const char* Ident,int Value);
virtual BOOL ReadBoolean (const char* Section,const char* Ident,bool Default);
virtual BOOL WriteBoolean(const char* Section,const char* Ident,bool Value);
virtual BOOL ReadSection (const char* Section,CStringList & cstLst);
virtual BOOL SectionExists(const char* Section);
virtual void UpdateFile ();
virtual BOOL EraseSection (const char* Section );
virtual BOOL DeleteKey (const char* Section ,const char* Ident);
void SetIniFileName (const char* );
protected :
LPSTR m_IniFileName;
};
#endif // !defined(AFX_INIFILES_IMP_H__810C0A02_A7DF_4D48_A32E_033ADAF59235__INCLUDED_)
+++++++++++++++++++++++++++
.cpp 文件
+++++++++++++++++++++++++++
// IniFileDef.cpp: implementation of the CIniFile class.
// Purpose: To implement myself INI file class.
// Author: Mixtrue mixtrue@hotmail.com
// Date: MAY 8 2004
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "IniFile.h"
#include "IniFilesDef.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
#define MAXSIZE 2048
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CIniFile::CIniFile() : m_IniFileName("./Configuration.ini")
{
}
CIniFile::CIniFile(LPCTSTR FileName) : m_IniFileName("./Configuration.ini")
{
m_IniFileName =(char*) FileName;
}
CIniFile::~CIniFile()
{
}
void CIniFile::SetIniFileName (const char* FileName)
{
m_IniFileName=(char*) FileName;
}
//Read a string from a configuration file
CString CIniFile::ReadStrings (const char* Section,const char* Ident,const char* Default)
{
char ReturnedString[100]="";
CString strStr="";
GetPrivateProfileString(Section,Ident,"",ReturnedString,sizeof(ReturnedString),m_IniFileName);
strStr=ReturnedString;
if (strStr.GetLength==0)
strStr=Default;
else
strStr =ReturnedString;
return strStr;
}
//Write a string to configuration file
BOOL CIniFile::WriteString (const char* Section,const char* Ident,const char* Value)
{
return WritePrivateProfileString(Section,Ident,Value,m_IniFileName);
}
//To write an integer to configuration
BOOL CIniFile::WriteInteger(const char* Section,const char* Ident,int Value)
{
char buff [9]="";
itoa(Value,buff,10);
return WriteString(Section,Ident,buff);
}
//Read an Integer value from specific section and Ident.
INT CIniFile::ReadInteger (const char* Section,const char* Ident,int Default=0)
{
CString strOut;
strOut= ReadStrings (Section,Ident,"0");
if (strOut.GetLength ()==0)
strOut="0";
return atoi(strOut.GetBuffer (strOut.GetLength ()));
}
//Read a boolean value from specific section and Ident.
BOOL CIniFile::ReadBoolean (const char* Section,const char* Ident,bool Default)
{
CString strIn,strOut;
if (Default)
strIn="TRUE";
else
strIn="FALSE";
strIn.MakeUpper ();
strOut =ReadStrings (Section,Ident,strIn.GetBuffer (strIn.GetLength ()));
strOut.MakeUpper ();
if ((strOut == "FALSE") || (strOut.GetLength ()==0))
return false;
else
return true;
}
//Write a bool value to file
BOOL CIniFile::WriteBoolean (const char* Section,const char* Ident,bool Value)
{
if (Value)
return WriteString (Section,Ident,"TRUE");
else
return WriteString (Section,Ident,"FALSE");
}
//Erase a section
BOOL CIniFile::EraseSection (const char* Section )
{
return WritePrivateProfileString(Section,NULL,NULL,m_IniFileName);
}
//Delete a key
BOOL CIniFile:eleteKey (const char* Section ,const char* Ident)
{
return WritePrivateProfileString(Section,Ident,NULL,m_IniFileName);
}
//Reflush the File .
void CIniFile::UpdateFile ()
{
WritePrivateProfileString(NULL, NULL, NULL, m_IniFileName);
}
BOOL CIniFile::SectionExists(const char* Section)
{
//LVITEM lvIm;
return true;
}
BOOL CIniFile::ReadSection (const char* Section,CStringList & cstLst)
{
char buff[MAXSIZE];
char* p=NULL;
CString strTemp;
cstLst.RemoveAll ();
int ReadSize=GetPrivateProfileString(Section, NULL, NULL, buff, MAXSIZE,m_IniFileName);
if (!ReadSize) {
TRACE0(_T("Can not read specific Section from Configuration file"));
return false;
} else {
strTemp=buff; p=buff;
while ((*p)!='\0') {
p+= strTemp.GetLength()+1;
cstLst.AddHead (p);
}
return true;
}
}
#1
那就把section下的所有项,然后你根据子项的特点来判断它有几个子项
#2
读出section下的所有项,然后你根据子项的特点来判断它有几个子项
#3
如何读所有项?
#4
使用下边这个函数读出所有项, 然后根据NULL的个数计算各个子项.
DWORD GetPrivateProfileSection(
LPCTSTR lpAppName,
LPTSTR lpReturnedString,
DWORD nSize,
LPCTSTR lpFileName
);
DWORD GetPrivateProfileSection(
LPCTSTR lpAppName,
LPTSTR lpReturnedString,
DWORD nSize,
LPCTSTR lpFileName
);
#5
我封装的ini 类【类似于Delphi使用习惯】
// IniFilesDef.h: interface for the CIniFile class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_INIFILES_IMP_H__810C0A02_A7DF_4D48_A32E_033ADAF59235__INCLUDED_)
#define AFX_INIFILES_IMP_H__810C0A02_A7DF_4D48_A32E_033ADAF59235__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
typedef int INT ;
typedef struct
{
} INIITEMS;
class CIniFile
{
public:
CIniFile();
CIniFile (LPCTSTR );
//viratul function , can be rewritten
virtual ~CIniFile();
virtual CString ReadStrings (const char* Section,const char* Ident,const char* Default);
virtual BOOL WriteString (const char* Section,const char* Ident,const char* Value);
virtual INT ReadInteger (const char* Section,const char* Ident,int Default);
virtual BOOL WriteInteger(const char* Section,const char* Ident,int Value);
virtual BOOL ReadBoolean (const char* Section,const char* Ident,bool Default);
virtual BOOL WriteBoolean(const char* Section,const char* Ident,bool Value);
virtual BOOL ReadSection (const char* Section,CStringList & cstLst);
virtual BOOL SectionExists(const char* Section);
virtual void UpdateFile ();
virtual BOOL EraseSection (const char* Section );
virtual BOOL DeleteKey (const char* Section ,const char* Ident);
void SetIniFileName (const char* );
protected :
LPSTR m_IniFileName;
};
#endif // !defined(AFX_INIFILES_IMP_H__810C0A02_A7DF_4D48_A32E_033ADAF59235__INCLUDED_)
+++++++++++++++++++++++++++
.cpp 文件
+++++++++++++++++++++++++++
// IniFileDef.cpp: implementation of the CIniFile class.
// Purpose: To implement myself INI file class.
// Author: Mixtrue mixtrue@hotmail.com
// Date: MAY 8 2004
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "IniFile.h"
#include "IniFilesDef.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
#define MAXSIZE 2048
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CIniFile::CIniFile() : m_IniFileName("./Configuration.ini")
{
}
CIniFile::CIniFile(LPCTSTR FileName) : m_IniFileName("./Configuration.ini")
{
m_IniFileName =(char*) FileName;
}
CIniFile::~CIniFile()
{
}
void CIniFile::SetIniFileName (const char* FileName)
{
m_IniFileName=(char*) FileName;
}
//Read a string from a configuration file
CString CIniFile::ReadStrings (const char* Section,const char* Ident,const char* Default)
{
char ReturnedString[100]="";
CString strStr="";
GetPrivateProfileString(Section,Ident,"",ReturnedString,sizeof(ReturnedString),m_IniFileName);
strStr=ReturnedString;
if (strStr.GetLength==0)
strStr=Default;
else
strStr =ReturnedString;
return strStr;
}
//Write a string to configuration file
BOOL CIniFile::WriteString (const char* Section,const char* Ident,const char* Value)
{
return WritePrivateProfileString(Section,Ident,Value,m_IniFileName);
}
//To write an integer to configuration
BOOL CIniFile::WriteInteger(const char* Section,const char* Ident,int Value)
{
char buff [9]="";
itoa(Value,buff,10);
return WriteString(Section,Ident,buff);
}
//Read an Integer value from specific section and Ident.
INT CIniFile::ReadInteger (const char* Section,const char* Ident,int Default=0)
{
CString strOut;
strOut= ReadStrings (Section,Ident,"0");
if (strOut.GetLength ()==0)
strOut="0";
return atoi(strOut.GetBuffer (strOut.GetLength ()));
}
//Read a boolean value from specific section and Ident.
BOOL CIniFile::ReadBoolean (const char* Section,const char* Ident,bool Default)
{
CString strIn,strOut;
if (Default)
strIn="TRUE";
else
strIn="FALSE";
strIn.MakeUpper ();
strOut =ReadStrings (Section,Ident,strIn.GetBuffer (strIn.GetLength ()));
strOut.MakeUpper ();
if ((strOut == "FALSE") || (strOut.GetLength ()==0))
return false;
else
return true;
}
//Write a bool value to file
BOOL CIniFile::WriteBoolean (const char* Section,const char* Ident,bool Value)
{
if (Value)
return WriteString (Section,Ident,"TRUE");
else
return WriteString (Section,Ident,"FALSE");
}
//Erase a section
BOOL CIniFile::EraseSection (const char* Section )
{
return WritePrivateProfileString(Section,NULL,NULL,m_IniFileName);
}
//Delete a key
BOOL CIniFile:eleteKey (const char* Section ,const char* Ident)
{
return WritePrivateProfileString(Section,Ident,NULL,m_IniFileName);
}
//Reflush the File .
void CIniFile::UpdateFile ()
{
WritePrivateProfileString(NULL, NULL, NULL, m_IniFileName);
}
BOOL CIniFile::SectionExists(const char* Section)
{
//LVITEM lvIm;
return true;
}
BOOL CIniFile::ReadSection (const char* Section,CStringList & cstLst)
{
char buff[MAXSIZE];
char* p=NULL;
CString strTemp;
cstLst.RemoveAll ();
int ReadSize=GetPrivateProfileString(Section, NULL, NULL, buff, MAXSIZE,m_IniFileName);
if (!ReadSize) {
TRACE0(_T("Can not read specific Section from Configuration file"));
return false;
} else {
strTemp=buff; p=buff;
while ((*p)!='\0') {
p+= strTemp.GetLength()+1;
cstLst.AddHead (p);
}
return true;
}
}
// IniFilesDef.h: interface for the CIniFile class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_INIFILES_IMP_H__810C0A02_A7DF_4D48_A32E_033ADAF59235__INCLUDED_)
#define AFX_INIFILES_IMP_H__810C0A02_A7DF_4D48_A32E_033ADAF59235__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
typedef int INT ;
typedef struct
{
} INIITEMS;
class CIniFile
{
public:
CIniFile();
CIniFile (LPCTSTR );
//viratul function , can be rewritten
virtual ~CIniFile();
virtual CString ReadStrings (const char* Section,const char* Ident,const char* Default);
virtual BOOL WriteString (const char* Section,const char* Ident,const char* Value);
virtual INT ReadInteger (const char* Section,const char* Ident,int Default);
virtual BOOL WriteInteger(const char* Section,const char* Ident,int Value);
virtual BOOL ReadBoolean (const char* Section,const char* Ident,bool Default);
virtual BOOL WriteBoolean(const char* Section,const char* Ident,bool Value);
virtual BOOL ReadSection (const char* Section,CStringList & cstLst);
virtual BOOL SectionExists(const char* Section);
virtual void UpdateFile ();
virtual BOOL EraseSection (const char* Section );
virtual BOOL DeleteKey (const char* Section ,const char* Ident);
void SetIniFileName (const char* );
protected :
LPSTR m_IniFileName;
};
#endif // !defined(AFX_INIFILES_IMP_H__810C0A02_A7DF_4D48_A32E_033ADAF59235__INCLUDED_)
+++++++++++++++++++++++++++
.cpp 文件
+++++++++++++++++++++++++++
// IniFileDef.cpp: implementation of the CIniFile class.
// Purpose: To implement myself INI file class.
// Author: Mixtrue mixtrue@hotmail.com
// Date: MAY 8 2004
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "IniFile.h"
#include "IniFilesDef.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
#define MAXSIZE 2048
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CIniFile::CIniFile() : m_IniFileName("./Configuration.ini")
{
}
CIniFile::CIniFile(LPCTSTR FileName) : m_IniFileName("./Configuration.ini")
{
m_IniFileName =(char*) FileName;
}
CIniFile::~CIniFile()
{
}
void CIniFile::SetIniFileName (const char* FileName)
{
m_IniFileName=(char*) FileName;
}
//Read a string from a configuration file
CString CIniFile::ReadStrings (const char* Section,const char* Ident,const char* Default)
{
char ReturnedString[100]="";
CString strStr="";
GetPrivateProfileString(Section,Ident,"",ReturnedString,sizeof(ReturnedString),m_IniFileName);
strStr=ReturnedString;
if (strStr.GetLength==0)
strStr=Default;
else
strStr =ReturnedString;
return strStr;
}
//Write a string to configuration file
BOOL CIniFile::WriteString (const char* Section,const char* Ident,const char* Value)
{
return WritePrivateProfileString(Section,Ident,Value,m_IniFileName);
}
//To write an integer to configuration
BOOL CIniFile::WriteInteger(const char* Section,const char* Ident,int Value)
{
char buff [9]="";
itoa(Value,buff,10);
return WriteString(Section,Ident,buff);
}
//Read an Integer value from specific section and Ident.
INT CIniFile::ReadInteger (const char* Section,const char* Ident,int Default=0)
{
CString strOut;
strOut= ReadStrings (Section,Ident,"0");
if (strOut.GetLength ()==0)
strOut="0";
return atoi(strOut.GetBuffer (strOut.GetLength ()));
}
//Read a boolean value from specific section and Ident.
BOOL CIniFile::ReadBoolean (const char* Section,const char* Ident,bool Default)
{
CString strIn,strOut;
if (Default)
strIn="TRUE";
else
strIn="FALSE";
strIn.MakeUpper ();
strOut =ReadStrings (Section,Ident,strIn.GetBuffer (strIn.GetLength ()));
strOut.MakeUpper ();
if ((strOut == "FALSE") || (strOut.GetLength ()==0))
return false;
else
return true;
}
//Write a bool value to file
BOOL CIniFile::WriteBoolean (const char* Section,const char* Ident,bool Value)
{
if (Value)
return WriteString (Section,Ident,"TRUE");
else
return WriteString (Section,Ident,"FALSE");
}
//Erase a section
BOOL CIniFile::EraseSection (const char* Section )
{
return WritePrivateProfileString(Section,NULL,NULL,m_IniFileName);
}
//Delete a key
BOOL CIniFile:eleteKey (const char* Section ,const char* Ident)
{
return WritePrivateProfileString(Section,Ident,NULL,m_IniFileName);
}
//Reflush the File .
void CIniFile::UpdateFile ()
{
WritePrivateProfileString(NULL, NULL, NULL, m_IniFileName);
}
BOOL CIniFile::SectionExists(const char* Section)
{
//LVITEM lvIm;
return true;
}
BOOL CIniFile::ReadSection (const char* Section,CStringList & cstLst)
{
char buff[MAXSIZE];
char* p=NULL;
CString strTemp;
cstLst.RemoveAll ();
int ReadSize=GetPrivateProfileString(Section, NULL, NULL, buff, MAXSIZE,m_IniFileName);
if (!ReadSize) {
TRACE0(_T("Can not read specific Section from Configuration file"));
return false;
} else {
strTemp=buff; p=buff;
while ((*p)!='\0') {
p+= strTemp.GetLength()+1;
cstLst.AddHead (p);
}
return true;
}
}