外部dll如下:Function long getpsw(REF string pwd,REF string newpsw) library "psw.dll"在delphi中,如下调用:
function getpsw(str0,str1: string):longint;stdcall;//cdecl?
far;external 'psw.dll'name 'getpsw';编译已经没有问题,但是在运行时,出现如下提示:project project1.exe raised exception class EAccessViolation with message 'Access violation at address 1000D9C8' in module 'psw.dll'.write of address 000000'.process stopped.use step or run to continue.求教解决方法。在此先行致谢。
function getpsw(str0,str1: string):longint;stdcall;//cdecl?
far;external 'psw.dll'name 'getpsw';编译已经没有问题,但是在运行时,出现如下提示:project project1.exe raised exception class EAccessViolation with message 'Access violation at address 1000D9C8' in module 'psw.dll'.write of address 000000'.process stopped.use step or run to continue.求教解决方法。在此先行致谢。
解决方案 »
- delphi 中 if语句 两个并列的条件语句怎么写啊 ?
- ReportMachine 求和字段?
- 各位高手...请问如何获得本地机sql server服务器名称...在delphi里用的.......
- 在线等
- 关于打开文件夹的问题,还望大家多多指教!
- 如何取得状态栏的信息
- 我该如何办?有个美国女孩爱上我了!
- 小弟问了一个mdi的问题.
- 怎样对dbgrid 添加纪录,但是不把这条纪录存到库中?急急急急!
- 我有一堆Label,如何判断是哪一个Label,例如这样的Label(2+i)(j).Caption应该怎样写?
- 如何使用fastreport动态改变报表中显示的字段和记录???
- DBExpress怎样连接SQL Server数据库,在SQLConnection组件里找不到SQL Server的连接!!
function getpsw(str0, str1: pchar): Longint; stdcall external 'psw.dll';
最终我的声明为:
function getpsw(str0:tring;str1:pchar):longint;stdcall;//cdecl?
far;external 'psw.dll'name 'getpsw';(str0的值我是在delphi的窗口传入的,进入dll后,最后生成str1的值。此前str1为string时,数值未有变化(而且奇怪的是,如果我没给str1分配定额内存,就会提示内存的问题),改成pchar数值就能返回。)多谢诸位关注。都给分