如何判断注册表项目类型?

mjpclab 2003-08-30 07:47:12
如何判断某一项为Dword型还是binary型?
...全文
66 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
pilicat 2003-10-02
  • 打赏
  • 举报
回复
使用 GetDataType函数,请参阅Delphi的帮助:

TRegistry.GetDataType

Returns the enumerated data type of a specified data value associated with the current key.

type TRegDataType= (rdUnknown, rdString, rdExpandString, rdInteger, rdBinary);
function GetDataType(const ValueName: String): TRegDataType;

Description

Call GetDataType to determine the data type of a data value associated with the current key. ValueName is a string containing the name of the data value to query.

GetDataType returns an enumerated value of type TRegDataType. TRegDataType can be one of the following values

Value Meaning

rdUnknown Data value type is of no defined value type.
rdString Data value type is a null-terminated string. It is a Unicode or ANSI string depending on whether the application calls the Unicode or ANSI string functions.
rdExpandString Data value type is a null-terminated string that contains unexpanded references to environment variables (for example, "%PATH%"). It is a Unicode or ANSI string depending on whether the application calls the Unicode or ANSI string functions.

rdInteger Data value type is a32-bit number.
rdBinary Data value type is binary data, in any form.
mjpclab 2003-10-02
  • 打赏
  • 举报
回复
谁知道?
xiaoyuer0851 2003-08-31
  • 打赏
  • 举报
回复
不知道,请各位指教……
xly371 2003-08-31
  • 打赏
  • 举报
回复
回去找找
mjpclab 2003-08-31
  • 打赏
  • 举报
回复

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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