关于dll的(50分)

  • 主题发起人 utilities
  • 开始时间
谢谢 gmwing

up
 
Function GBtoBIG5(as_arg:shortString ):shortstring;stdcall external 'GB2_Big5.dll';
Function BIG5toGB(as_arg:shortString ):shortstring;stdcall external 'GB2_Big5.dll';

还不行的话,把shortstring 改成 pchar
 
别忘了加上 stdcall 和 export否则很容易出错!
 
project project1.exe asised exception class EAccessViolation with message "Access
violation at addrress 00233AA6 in module 'GB2_Big5.dll'.Read of address
AABBD0CE'.Process stopped .Use Step or Run to Continue.

Vew CPU Winidow

这个是提示,
 
DLL中参数用到sting 类型或者参数的对象的属性用到String类型(还有返回值)。
你在DLL和调用DLL的工程中第一个单元要引用ShareMem,你的应用也会依赖于Borlndmm.dll
 
按照 jsxjd 兄的应该不会有错了,应尽量避免用 到string;还有你是静态调用还是动态调用,动态调用还应注意大小写。
 
顶部