| 发表于:2007-11-27 14:16:25 楼主 |
在c#中调用delph编写的dll的函数时,老是出现未将对象引用到实例的错误: delphi编写的dll中函数声明:function deliverfromesm(var smtype, content,caller:pchar):integer; 我在c#中声明: [dllimport("esmapi.dll",charset = charset.ansi,callingconvention = callingconvention.stdcall)] static extern int deliverfromesm(ref string smtype,ref string content,ref string caller); 调用: string smtype=""; string content=""; string caller=""; int reportval=deliverfromesm( ref smtype,ref content,ref caller); 出现未将对象引用到实例的错误,请问我该如何正确调用? |
|
|
|
|