I finally found an answer to this : The affected applications contained a bit of code-hooking that randomly damaged parts of System.dcu! (FYI : We're using a Delphi 2009 beta version of madshi's madCodeHook library). As soon as we switched to another code-hooking library, these symptoms disapeared... I guess that's what happens when you use beta-software. Anyway, sorry for bothering you with this. Problem solved!
This may be overly simplistic, but have you tried changing the order in which the relevant units are listed in your uses clause? Sometimes this helps in these situations.
I think it could be problem with Ansi/Unicode calls of Win32 API (including WinSock API). Check if code using AnsiString/AnsiPchar call XxxA functions (eg MessageBoxA), and String/Pchar call xxW function (eg MessageBoxW). In previous versions of Delphi String was alias to AnsiString and XxxA Win API function was used, but now String is unicode by default and XxxW functions should be used.
发布评论
评论(3)
我终于找到了答案:受影响的应用程序包含一些代码挂钩,会随机损坏 System.dcu 的部分内容! (仅供参考:我们使用的是 madshi 的 madCodeHook 库的 Delphi 2009 beta 版本)。 一旦我们切换到另一个代码挂钩库,这些症状就消失了......我想这就是当您使用测试版软件时会发生的情况。 不管怎样,很抱歉打扰你了。 问题解决了!
I finally found an answer to this : The affected applications contained a bit of code-hooking that randomly damaged parts of System.dcu! (FYI : We're using a Delphi 2009 beta version of madshi's madCodeHook library). As soon as we switched to another code-hooking library, these symptoms disapeared... I guess that's what happens when you use beta-software. Anyway, sorry for bothering you with this. Problem solved!
这可能过于简单化,但是您是否尝试过更改使用条款中列出相关单位的顺序? 有时这在这些情况下会有所帮助。
This may be overly simplistic, but have you tried changing the order in which the relevant units are listed in your uses clause? Sometimes this helps in these situations.
我认为 Win32 API(包括 WinSock API)的 Ansi/Unicode 调用可能有问题。 检查使用AnsiString/AnsiPchar 的代码是否调用XxxA 函数(例如MessageBoxA),以及String/Pchar 是否调用xxW 函数(例如MessageBoxW)。 在以前版本的Delphi中,String是AnsiString的别名,并使用XxxA Win API函数,但现在String默认为unicode,应使用XxxW函数。
I think it could be problem with Ansi/Unicode calls of Win32 API (including WinSock API). Check if code using AnsiString/AnsiPchar call XxxA functions (eg MessageBoxA), and String/Pchar call xxW function (eg MessageBoxW). In previous versions of Delphi String was alias to AnsiString and XxxA Win API function was used, but now String is unicode by default and XxxW functions should be used.