Posted on 2007-03-25 18:03
张岁滔 阅读(1739)
评论(0) 编辑 收藏 引用 所属分类:
It技能
例子:backup.ini
[CONNECTION]
ServerName="myComputer"
LoginID="sa"
password="myPassword"
[CMDTIMEOUT]
TimeOut=50
///////////////////////////////////////////////////
CString ServerName;
CString Password;
CString LoginID;
int TimeOut;
GetPrivateProfileString("CONNECTION","ServerName",NULL,
ServerName.GetBuffer(MAX_PATH),MAX_PATH,".//backup.ini");
GetPrivateProfileString("CONNECTION","LoginID",NULL,
LoginID.GetBuffer(MAX_PATH),MAX_PATH,".//backup.ini");
GetPrivateProfileString("CONNECTION","Password",NULL,
password.GetBuffer(MAX_PATH),MAX_PATH,".//backup.ini");
TimeOut=GetPrivateProfileInt("CMDTIMEOUT",
"TimeOut",NULL,".//backup.ini");