DELPHI和注册表

花小喵她爹

花小喵她爹

2016-01-29 14:01

DELPHI和注册表,DELPHI和注册表
 

0. DISCLAIMER:
1. What is the registry?
2. What does the registry look like?
3. How to read and write data to the registry
    3.1 RegCreateKey()
    3.2 RegOpenKey()
    3.3 RegSetValue()
    3.4 RegQueryValue()
    3.5 RegDeleteKey()
    3.6 RegEnumKey()
4. An Example
5. Win95 features
6. REGDLL.DLL

The source code corresponding to this article is available for download as
registry.zip.
 
 

0. DISCLAIMER:

This article reflects my personal experiences with the registry and Delphi.
I had no 'real' documentation on this, except what shipped with Delphi. I
will not take any responsibility that occurs from the usage of the
procedures described in this article. The same applies to the usage of the
accompanying REGDLL.DLL and its interface. USE AT YOUR OWN RISK.

Suggestions and Comments are welcome. Please send them to:
Christian.Feichtner@jk.uni-linz.ac.at.

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/delphi/)

This article describes how to use the registry-database as an 'INI file'.
Especially with the advent of Windows 95 every 'good' windows application
should use the registry database to store its information.

Note that the described API routines are from the 16bit API. They work well
with the registry of Windows 95, but are not capable of using the special
new features of Windows 95.
 
 

1. What is the registry?

The registry is a heirarchical database, which is used to store information
for the whole system. OLE-apps made frequent use of the registry in Win31.
In Windows 95 the registry has grown to more than that. It not only stores
system information but has become a total replacement for the old-style INI
files. The INI files are only supported to maintain compatibility for 'old'
16bit Apps.
 
 

2. What does the registry look like?

As mentioned above, the registry is a heirarchical database. It is
organized as a tree. The most interesting key (and the only one accessable
from Delphi with the 16bit version) is the HKEY_CLASSES_ROOT.

This key can be used to store application settings. (Thus, I think there is
another key for Windows 95 apps. Since Delphi can only access this key, you
can use it until Delphi-32 becomes avaliable).

Example:

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/delphi/)

 + HKEY_CLASSES_ROOT      This is what a key could look like. Assume an
 |                        application named Information Manager (which I'm
 +--+-.IFM                currently developing) which saves its files with the
    |  

展开更多 50%)
分享

猜你喜欢

DELPHI和注册表

Delphi
DELPHI和注册表

Delphi编程访问注册表

Delphi
Delphi编程访问注册表

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

用注册表对delphi程序加密

编程语言 网络编程
用注册表对delphi程序加密

注册表简易入门:揭开注册表的神秘面纱

电脑入门
注册表简易入门:揭开注册表的神秘面纱

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

注册表从入门到精通之注册表基础

windows 操作系统
注册表从入门到精通之注册表基础

注册表优化方法

电脑入门
注册表优化方法

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

Delphi面向对象的编程方法(一)

Delphi面向对象的编程方法(一)

文件管理(一)

文件管理(一)
下拉加载更多内容 ↓