在winxp写的, 测试也没任何问题, 到win7机子里一用就报错, 程序是hook了其他程序在使用, 请问这个问题是哪方面的问题?  弹出问题窗口,以下是信息
问题签名:
  问题事件名称: APPCRASH
  应用程序名: pp.exe
  应用程序版本: 1.0.3.3316
  应用程序时间戳: 2a425e19
  故障模块名称: KERNELBASE.dll
  故障模块版本: 6.1.7601.18015
  故障模块时间戳: 50b83b16
  异常代码: 0eedfade
  异常偏移: 0000812f
  OS 版本: 6.1.7601.2.1.0.256.1
  区域设置 ID: 2052
  其他信息 1: 6e30
  其他信息 2: 6e3095608dc28e1175d12910025d0eb4
  其他信息 3: 1996
  其他信息 4: 1996b64324e2ca16577c7b922cb1cf28这个窗口关闭后, 还有个对话框
显示 Exception EInOutError in module at pp.exe
file not found

解决方案 »

  1.   

    I/O错误,是不是用了一个DLL文件,这个文件在XP有,但WIN7没有或路径出了问题。
      

  2.   

    在win7的机器上编译调试才好跟踪问题
      

  3.   

    我在执行的过程中beginthread开了个线程, 这个代码屏蔽掉就正常了
    这个线程就是执行了检查文件大小的代码
      

  4.   

    管理员账户在运行的, 运行的时候也特意点了用管理员权限运行
    不是权限的关系获取文件大小
    Function GetFileSize(fn : string): integer;
    var
      F: file of byte;
    begin
      Filemode:=0;
      Assignfile(F, fn);
      Reset(f);
      Result:= Filesize(F);
      Closefile(F);
    end;线程里用了GetFileSize(Application.ExeName)而已
      

  5.   

    Delphi syntax:var FileMode: Byte = 2;Note: Be sure to reset FileMode before calling Reset with a read-only file. Even if you are only reading from the file, the default FileMode value (Read/Write access) will cause an attempt to open a read-only file to fail.Warning:FileMode is declared as a variable, not as a threadvar. Therefore this variable is not thread-safe.重置filemode之前必须先rest(f),否则即使你以只读方式也将导致文件打开失败。再一个filemode不是线程安全的。
    另外你试试用这个方法在线程中使用是否有问题function GetExeSize: Int64;
    var
    SearchRec: TSearchRec;
    begin
    Result := -1;
    if FindFirst(Application.ExeName, faAnyFile, SearchRec) = 0 then
    Result := SearchRec.Size;
    end;
      

  6.   

    Exception EInOutError in module at pp.exe
    file not found好像是文件没找到,如果确定存在,那一般是权限不够了
      

  7.   

    考虑权限问题, win7对写文件是否有权限!
      

  8.   

    有调用需要注册的三方ocx或者dll吗?有的话以管理员权限注册下。