社区
C++ Builder
帖子详情
无法使用ReadIniString
zzgzzgzz
2003-10-09 11:56:13
我加了<Inifiles.hpp>,为何还不行?
...全文
66
5
打赏
收藏
无法使用ReadIniString
我加了,为何还不行?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
zzgzzgzz
2003-10-28
打赏
举报
回复
AnsiString FilePath = ExtractFilePath(Application->ExeName)+"\\Agent.ini";
if(FileExists(FilePath))
{
AnsiString strOpt;
strOpt=ReadIniString(FilePath,"AccountPorperty","BillOption","");
if(strOpt!="")
SoftPhone->BillOption=StrToInt(strOpt);
strOpt=ReadIniString(FilePath,"AccountPorperty","PlatformOpt","");
if(strOpt!="")
SoftPhone->PlatformOpt=StrToInt(strOpt);
AnsiString strUserDB,strAutoAnswer;
strUserDB = ReadIniString(FilePath,"IsUserDB","IsUse","");
if(strUserDB == "true")
{
m_bUserDB = true;
}else
{
m_bUserDB = false;
}
这是我见过的源程序
我在以前的一台机器也可以用ReadIniString,但现在不行了.
ccrun.com
2003-10-09
打赏
举报
回复
#include "inifiles.hpp"
void __fastcall TForm1::Button1Click(TObject *Sender)
{
TIniFile *ini=new TIniFile("C:\\windows\\system.ini");
String strShell=ini->ReadString("boot","Shell","");
if(strShell.Length()>0)
ShowMessage(strShell);
delete ini;
}
ljianq
2003-10-09
打赏
举报
回复
TIniFile的方法应该是ReadString();
coolbcb2
2003-10-09
打赏
举报
回复
是ReadString而不是ReadIniString,当然不行了。
zihan
2003-10-09
打赏
举报
回复
这样的代码最好不要自己写,用ide的提示,就是写了-》过后他会有一个提示,你选择就可以了,不然很容易除错,
BCB读取
ini
文件
T
Ini
File *Data
Ini
; Ansi
String
zport; Ansi
String
e = ExpandFileName("..//Server.
ini
"); if(FileExists("..//Server.
ini
")) { Data
Ini
= new T
Ini
File(e); SqlServer = Data
Ini
->
C++
string
类常用函数
当构造的
string
太长而
无法
表达时会抛出length_error异常
string
类的字符操作: const char &operator[](int n)const; const char &at(int n)const; char &operator[](int n); char &at(int n); operator[]和at...
用BCB读写文本文件及
ini
配置文件
ShowMessage("
无法
打开新文件"); return; } DWORD BytesWritten; char theText[MAX_PATH]="你想往文本文件中写入的内容!"; //将theText数组的内容写入程序目录下的nei.txt文件中 if (::WriteFile(hFile,theText,...
python win32转pdf 横版_.doc
使用
python转换为pdf
在查看了如何在
使用
虚拟PDF打印机时禁用对话框之后,我遇到了Bullzip PDF Printer,并且其功能给我留下了深刻的印象。现在,它取代了我以前
使用
的其他虚拟打印机。您可以在他们的下载页面上找到“免费社区版”。该...
使用
临界区读取
INI
配置文件
CRITICAL_SECTION结构对象必须经过
Ini
tializeCriticalSection()的初始化后才能
使用
class BaseTool//抽象类(含有虚函数的类) { private: // 类内声明静态变量,定义临界区句柄,所有对象共享 static CRITICAL_...
C++ Builder
13,826
社区成员
102,678
社区内容
发帖
与我相关
我的任务
C++ Builder
C++ Builder相关内容讨论区
复制链接
扫一扫
分享
社区描述
C++ Builder相关内容讨论区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章