Reg.WriteBinaryData的参数是一个指针和一个长度
你可以这样:
var
l:integer;
p:pchar;
begin
p:='ForceActiveDesktopOn';
l:=length(p);
Reg.WriteBinaryData(p,l,sizeof(l));
你可以这样:
var
l:integer;
p:pchar;
begin
p:='ForceActiveDesktopOn';
l:=length(p);
Reg.WriteBinaryData(p,l,sizeof(l));
解决方案 »
- 用FastReport打印宿舍编排。 难办, 请高手帮忙
- 关于MSSQL的简单问题(共400分)
- 谁愿意发一个能在d7下使用的RxLib给我, QQ,MSN,E_Mail都开着等!!!
- 关于Memo控件的两个问题
- dbgrid中显示字段值的问题
- 请问TreeView中如何控制PopupMenu,使其只有在选择了树的结点后点右键才出现?
- 怎么将一个文件流转换成字符串? filestream->string ?
- 哪有支持delphi开发的isapi和cgi的免费空间!速度且较快!100分送上!不够再要!
- 老千,那个贴字太长了,换个地方吧
- 如果利用字符串,创建一个FORM
- ADOStoredProc 调用SQLServer存储过程的问题!!!
- employee.gdb的密码是什么
>>Reg.Writeinteger('ForceActiveDesktopOn',str1);
str1 : dwordReg.WriteBinaryData('ForceActiveDesktopOn',str1,sizeof(str1));
str1=1吗?我试过好象还是不行!!
Reg.RootKey:=HKEY_CURRENT_USER;
Reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Policies\Explorer',false);
Reg.WriteBinaryData('ForceActiveDesktopOn',str1,sizeof(str1));Reg.CloseKey;
Reg.Free;Systemparametersinfo(SPI_SETDESKWALLPAPER,0,nil,SPIf_SendChange);
systemparametersinfo(SPI_SETDESKWALLPAPER ,0,pchar('c:\1.htm'),SPIF_UPDATEINIFILE );
交换一下语句的顺序。还有就是不知道在你的user中是否有注册表单元