Registry and AdvstringGrid
来源:互联网 发布:windows airplay工具 编辑:程序博客网 时间:2024/06/05 12:41
var sBuf: array[1..1024] of byte;begin sBuf[1] := 128; sBuf[2] := 00; sBuf[3] := 00; sBuf[4] := 00; sBuf[5] := 00; sBuf[6] := 126; sBuf[7] := 00; sBuf[8] := 00; sBuf[9] := 00; sBuf[10] := 00; sBuf[11] := 00; sBuf[12] := 00; reg := Tregistry.Create; reg.RootKey := HKEY_LOCAL_MACHINE; reg.OpenKey('SYSTEM/MountedDevices' + Drv, false); //reg.CloseKey; //reg.Free;end;//---------------------------------------读取注册表过程//---------------------------------------procedure TForm1.Button1Click(Sender: TObject);var sBuf: array[1..255] of byte; List: TStringlist; //子键列表 d, t, i, k, j: integer; s, Drv: string;begin Drv := ComboBoxEx1.SelText; List := TstringList.Create; reg := Tregistry.Create; reg.RootKey := HKEY_LOCAL_MACHINE; reg.OpenKey('SYSTEM/MountedDevices', false); reg.GetValueNames(List); //读取所有子键 d := List.Count; //读取子键的行数 //showmessage(inttostr(list.count)); for k := 0 to d - 1 do begin begin reg.ReadBinaryData(list[k], sBUf, SizeOf(sBuf)); //showmessage(inttostr(sBuf[1])); AdvStringGrid1.Cells[3, k] := LowerCase(s); AdvStringGrid1.Cells[3, d] := LowerCase(s); //showmessage(s); end; s := ''; for i := 1 to 16 do begin s := s + ' ' + (inttohex((Sbuf[i]), 2)); //showmessage(s); //------------------------------------ 创建表格过程 AdvStringGrid1.Cells[0, 0] := '序号'; AdvStringGrid1.Cells[1, 0] := '名称'; AdvStringGrid1.Cells[2, 0] := '类型'; AdvStringGrid1.Cells[3, 0] := '数据数值'; d := List.Count; AdvStringGrid1.RowCount := d + 1; //AdvStringGrid1.Cells[3, i] := s; for t := 1 to d do begin //AdvStringGrid1.Cells[3, i] := s; AdvStringGrid1.Cells[0, t] := inttostr(t); AdvStringGrid1.Cells[1, t] := list[t - 1]; AdvStringGrid1.Cells[2, t] := 'Reg_Binary'; //AdvStringGrid1.AddImageIdx(1,t,0,haBeforeText,vatop); 添加图标 //showmessage(inttostr(t)); end end; end; //showmessage(inttostr(i)); AdvStringGrid1.AddRow; AdvStringGrid1.Cells[0, d + 1] := inttostr(d + 1); AdvStringGrid1.Cells[1, d + 1] := '/DosDevices/' + Drv; AdvStringGrid1.Cells[2, d + 1] := 'Reg_Binary'; AdvStringGrid1.Cells[3, d + 1] := 'fc 57 b2 d9 4e 68 cb 4d ab 79 03 cf a2 f6 b7 50'; AdvStringGrid1.FontColors[0, d + 1] := clRed; AdvStringGrid1.FontColors[1, d + 1] := clRed; AdvStringGrid1.FontColors[2, d + 1] := clRed; AdvStringGrid1.FontColors[3, d + 1] := clRed; //AdvStringGrid1.FontStyles[1, d + 1] := AdvStringGrid1.FontStyles[i, 0] + [fsBold]; //字体加粗 //reg.WriteBinaryData('/DosDevices/' + Drv, sbuf, SizeOf(sBuf)); //reg.CloseKey; //reg.Free;end;
- AdvstringGrid and Registry Demo
- Registry and AdvstringGrid
- AdvStringGrid
- AdvStringGrid
- Registry key and Registry value
- Docker Images and Registry
- about uddi root registry and affiliate registry
- Kernel File and registry API
- Registry on "Programs and Features"
- TMS AdvStringGrid
- advstringgrid排序
- advstringgrid 使用
- Windows CE: Save and Restore the Registry
- OS updates and the hive-based registry
- Registry
- Registry
- Registry
- Registry
- IEEE 802.3和以太网
- GetSystemDirectory
- 揭露丑恶:不出事不管,一出事就禁——又见懒政
- 暂时解决PHP连接SQLserver2005乱码问题.
- 用access会碰到Provider 错误 '80004005'
- Registry and AdvstringGrid
- 英伦之旅——行前
- jquery实现无刷新提交
- DLL学习——使用DLL里的导出函数
- onshow
- Jquery 局部刷新及 表单取值赋值 处理返回json数据
- Jquery实例2:可收缩展开的级联菜单与局部刷新
- jquery实例1:淡入淡出窗口
- jquery重新设置超链接