我这儿有个例子,发你看看吧。留个e-mail。

解决方案 »

  1.   

    修改注册表这是PEDUMP的一段代码procedure AssocExeDllFile(Add_Del:Boolean);
    var
      Reg:TRegistry;
      Key1,Key2:String;
    begin
      Reg:=TRegistry.Create;
      try
        Reg.RootKey:=HKEY_CLASSES_ROOT;
        Key1:='\exefile\Shell\用 PEDUMP 分析';
        Key2:='\dllfile\Shell\用 PEDUMP 分析';
        if Add_Del then
        begin{Add}
          Reg.OpenKey(Key1+'\Command',True);
          Reg.WriteString('',Application.ExeName+' "%1"');
          Reg.OpenKey(Key2+'\Command',True);
          Reg.WriteString('',Application.ExeName+' "%1"');
        end else
        begin{Delete}
          Reg.OpenKey(Key1+'\Command',True);
          Reg.DeleteKey(Key1);
          Reg.OpenKey(Key2+'\Command',True);
          Reg.DeleteKey(Key2);
        end;
        Reg.CloseKey;
      finally
        Reg.Free;
      end;
    end;
      

  2.   

    UP,我的E_MAILE:[email protected],给我一份吧,谢谢。