Update tslvcl.tsf

windows 注册表常量
This commit is contained in:
tslediter 2023-11-14 17:13:39 +08:00
parent 8928201744
commit 6b0f01b352
1 changed files with 13 additions and 33 deletions

View File

@ -4778,13 +4778,15 @@ type TRegKey = class
{** {**
@explan(说明) windows注册表操作类 %% @explan(说明) windows注册表操作类 %%
**} **}
static HKEY_CLASSES_ROOT; static const HKEY_CLASSES_ROOT = 0x80000000;
static HKEY_CURRENT_USER; static const HKEY_CURRENT_USER = 0x80000001;
static HKEY_LOCAL_MACHINE; static const HKEY_LOCAL_MACHINE = 0x80000002;
static HKEY_USERS; static const HKEY_USERS = 0x80000003;
static HKEY_PERFORMANCE_DATA; static const HKEY_PERFORMANCE_DATA = 0x80000004;
static HKEY_PERFORMANCE_TEXT; static const HKEY_PERFORMANCE_TEXT = 0x80000050;
static HKEY_PERFORMANCE_NLSTEXT; static const HKEY_PERFORMANCE_NLSTEXT = 0x80000060;
static const KEY_WOW64_32KEY = 0x0200;
static const KEY_WOW64_64KEY = 0x0100;
{$ifdef linux} {$ifdef linux}
class function RegEnumValueA(hKey:pointer;dwIndex:integer;var lpValueName:string;var lpcchValueName:integer;lpReserved:pointer;lpType:pointer;lpData:pointer;lpcbData:pointer):integer; class function RegEnumValueA(hKey:pointer;dwIndex:integer;var lpValueName:string;var lpcchValueName:integer;lpReserved:pointer;lpType:pointer;lpData:pointer;lpcbData:pointer):integer;
class function RegEnumKeyA(hKey:pointer;dwindex:integer;var lpName:string;ccname:integer):integer; class function RegEnumKeyA(hKey:pointer;dwindex:integer;var lpName:string;ccname:integer):integer;
@ -4822,7 +4824,6 @@ type TRegKey = class
@explan(说明) 获得HKEY_CLASSES_ROOT的key %% @explan(说明) 获得HKEY_CLASSES_ROOT的key %%
@return(TRegKey|integer) 如果成功返回 key 对象 %% @return(TRegKey|integer) 如果成功返回 key 对象 %%
**} **}
sinit();
return new TRegKey(HKEY_CLASSES_ROOT); return new TRegKey(HKEY_CLASSES_ROOT);
end end
class function GetRegKeyUser(); class function GetRegKeyUser();
@ -4831,7 +4832,6 @@ type TRegKey = class
@explan(说明) 获得HKEY_CURRENT_USER的key %% @explan(说明) 获得HKEY_CURRENT_USER的key %%
@return(TRegKey|integer) 如果成功返回 key 对象 %% @return(TRegKey|integer) 如果成功返回 key 对象 %%
**} **}
sinit();
return new TRegKey(HKEY_CURRENT_USER); return new TRegKey(HKEY_CURRENT_USER);
end end
class function GetRegKeyMachine(); class function GetRegKeyMachine();
@ -4840,7 +4840,6 @@ type TRegKey = class
@explan(说明) 获得HKEY_LOCAL_MACHINE的key %% @explan(说明) 获得HKEY_LOCAL_MACHINE的key %%
@return(TRegKey|integer) 如果成功返回 key 对象 %% @return(TRegKey|integer) 如果成功返回 key 对象 %%
**} **}
sinit();
return new TRegKey(HKEY_LOCAL_MACHINE); return new TRegKey(HKEY_LOCAL_MACHINE);
end end
class function GetEnviromentKey(); class function GetEnviromentKey();
@ -4849,7 +4848,6 @@ type TRegKey = class
@explan(说明) 获得环境变量的key %% @explan(说明) 获得环境变量的key %%
@return(TRegKey|integer) 如果成功返回 key 对象 %% @return(TRegKey|integer) 如果成功返回 key 对象 %%
**} **}
sinit();
k1 := new TRegKey(HKEY_LOCAL_MACHINE); k1 := new TRegKey(HKEY_LOCAL_MACHINE);
return k1.openKeyA("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment"); return k1.openKeyA("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment");
end end
@ -4889,7 +4887,6 @@ type TRegKey = class
public public
function create(h); function create(h);
begin begin
if not HKEY_CLASSES_ROOT then sinit();
SetHandle(h); SetHandle(h);
end end
function Destroy(); function Destroy();
@ -5047,23 +5044,6 @@ type TRegKey = class
end end
return r; return r;
end end
class function sinit();override;
begin
{**
@explan(˵Ã÷) ³õʼ»¯ %%
**}
if not HKEY_CLASSES_ROOT then
begin
HKEY_CLASSES_ROOT := 0x80000000;
HKEY_CURRENT_USER := 0x80000001;
HKEY_LOCAL_MACHINE := 0x80000002;
HKEY_USERS := 0x80000003;
HKEY_PERFORMANCE_DATA := 0x80000004;
HKEY_PERFORMANCE_TEXT := 0x80000050;
HKEY_PERFORMANCE_NLSTEXT := 0x80000060;
end
inherited;
end
property Handle read FHandle write SetHandle; property Handle read FHandle write SetHandle;
{** {**
@param(Handle)(pointer) regkey句柄 %% @param(Handle)(pointer) regkey句柄 %%