在win2K&XP下用的好好的函数,在Vista下WriteString时出错不知是何原因????
function RegWriteValue(key,value: string):integer;
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_LOCAL_MACHINE;
if Reg.OpenKey(Key, True) then
Reg.WriteString('', Value);//在这里提示出错,写不了数据
finally
Reg.CloseKey;
Reg.Free;
end;
result := 1;
end;
function RegWriteValue(key,value: string):integer;
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_LOCAL_MACHINE;
if Reg.OpenKey(Key, True) then
Reg.WriteString('', Value);//在这里提示出错,写不了数据
finally
Reg.CloseKey;
Reg.Free;
end;
result := 1;
end;
解决方案 »
- 如何让滚动条(tscrollbar)跟着鼠标移上,移下呢....
- how can I use the date which in one table to change other tables
- DELPHI能否动态定义变量?
- 关于image控件显示不规则图片的问题,求助
- 如何从access数据库导到excel表格,delphi如何来实现~
- 命令行方式下如何编译问题
- 怎么样设置如同网页一样的链接
- 怎么样判断光驱是否是准备就绪哪
- 通过API获得某个窗体的HANDLE,再通过TCANVAS向该窗体画图,但该窗体不会AUTOREDRAW(该窗体只知道他的HANDLE)
- 关于Web Service的这个wizard哪里可下到?????
- 求助
- 如何把图片复制到表格中
在vista下,不管为不为空,都写不了
大家现在有没有在vista下做程序???这个问题应比较常见吧帮帮我吧
可我用管理员用户登陆后,手工可以修改regedit,但程序WriteString仍出错