51代码网ORACLEMYSQLSQL SERVER其它数据库java/jspasp/asp.netC/C++/VC++APP应用其它语言服务器应用
您现在的位置: 51代码网 >> 其它 >> 文章正文

Access violation at address 0040303F in module 'OnEyeManager.exe'. Write of address 0038003C

更新时间:2013-8-10:  来源:51代码网

Access violation at address 0040303F in module 'OnEyeManager.exe'. Write of address 0038003C

最近将一个程序从D7转换到D2010,在部分WINXP系统的电脑运行错误,错误信息为:

Access violation at address 0040303F in module 'OnEyeManager.exe'. Write of address 0038003C.

而在另外一些WINXP系统的电脑上运行正常,开始以为是操作系统版本的原因,因为不能运行电脑的操作系统都是电脑公司装的,就把其中一台的系统格了重新安装,还是运行出错。

然后就整了个虚拟机,装上D2010,编译没报错,逐步调试,发现出错的地方是Copy函数,我疯狂了......

D2009-用ANSI,2009+用Unicode,字符串编码问题

function FormatDir(aDir: string): string; begin  Result := aDir;   if Length(Trim(aDir)) > 2 then  begin    if Copy(Trim(aDir), Length(Trim(aDir)), 1) <> '\' then      Result := aDir + '\';   end; end;

if aDir[length(aDir)] <> '\' then aDir := aDir + '\'

function IncludeTrailingPathDelimiter(const S: string): string; begin  Result := S;   if not IsPathDelimiter(Result, Length(Result)) then    Result := Result + PathDelim; end;

  • 上一篇文章:
  • 下一篇文章: 没有了
  • 赞助商链接
    推荐文章
  • 此栏目下没有推荐文章
  • {
    设为首页 | 加入收藏 | 友情链接 | 网站地图 | 联系站长 |