怎么看都看不懂TRegistry::ReadString(const AnsiString Name)里面的Name的作用.

wenminghu 2003-09-14 04:21:07
Retrieves a string value from a specified data value associated with the current key.

AnsiString __fastcall ReadString(const AnsiString Name);

Description

Call ReadString to read a string value from a specified data value associated with the current key. Name is the name of the data value to read.

If there is no Registry entry with the specified name, ReadString returns an empty string. If the Registry entry contains something other than a string, an exception is thrown.

Note: ReadString retrieves data stored by either the WriteString or WriteExpandString method.
...全文
88 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
kingcaiyao 2003-09-14
  • 打赏
  • 举报
回复
Name是键的名称。
freeia 2003-09-14
  • 打赏
  • 举报
回复
顶!
wenminghu 2003-09-14
  • 打赏
  • 举报
回复
楼上是个mm?
linxiaoping 2003-09-14
  • 打赏
  • 举报
回复
up
wenminghu 2003-09-14
  • 打赏
  • 举报
回复
这段代码又是什么意思呢?

TRegistry *pRegistry = new TRegistry;
pRegistry->RootKey = HKEY_CLASSES_ROOT;

try
{
pRegistry->OpenKeyReadOnly(strFileExtName);
AnsiString strFileType = pRegistry->ReadString("");
pRegistry->CloseKey();
pRegistry->OpenKeyReadOnly(strFileType + "\\DefaultIcon");
strDefaultIcon = Registry->ReadString("").Trim();
pRegistry->CloseKey();
pRegistry->OpenKeyReadOnly(strFileType + "\\shell\\open\\command");
strOpenProgram = pRegistry->ReadString("").Trim();
}
catch(...)
{
}
__finally
{
delete pRegistry;
pRegistry = 0;
}

13,824

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧