我现在编有一个dll文件,我想将这个dll注入到 某个EXE当中(EXE没有源码)?通过LordPE等软件修改PE头方式导入DLL为什么运行不报错,但是却没实现我的功能呢? dll代码如下:(下面代码我随意写,假设下面代码功能正常,结果是我挂入进程后应该是打开IE游览器就会自动最大化)。 好像我查相关资料说是光修改PE头的EXE不得的。还得在DLL写入自运行,因为DLL在主EXE启动时限限是载入不执行代码? 如果是这样,请教各位在DLL中将怎么实现? 
library iemax; uses 
  URLMon,Windows, Messages, 
  ShellApi; var 
  hmine: THandle; //窗体的句柄 function Dtest(SourceFile, DestFile: string): Boolean; 
begin     //未使用function end; procedure down; 
begin 
hmine := FindWindow(nil ,'about:blank - Microsoft Internet Explorer');  //查找IE窗口 
if hmine <>0 then 
begin 
SendMessage(Hmine,WM_SYSCOMMAND,SC_MAXIMIZE,0);  //查找IE窗口最大化 
end; 
end; exports 
  down; end.

解决方案 »

  1.   

    你又没在dll中调用它,为什么它会执行呢
      

  2.   

    library iemax; uses 
      URLMon,Windows, Messages, 
      ShellApi; var 
      hmine: THandle; //窗体的句柄 function Dtest(SourceFile, DestFile: string): Boolean; 
    begin     //未使用function end; procedure down; 
    begin 
    hmine := FindWindow(nil ,'about:blank - Microsoft Internet Explorer');  //查找IE窗口 
    if hmine <>0 then 
    begin 
    SendMessage(Hmine,WM_SYSCOMMAND,SC_MAXIMIZE,0);  //查找IE窗口最大化 
    end; 
    end; exports 
      down; 
    begin
      down; 
    end.