现在我有一个dll是用vc写的,他里边的函数声明方式为
extern "C" __declspec(dllexport) int SetIp(CString oldip, CString newip)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
gIpAddr = oldip;
gNewIpAddr = newip;
CDialogSetIp dlg;
dlg.DoModal();
return ResltValue;
}
我在delphi里应该怎样调用这个函数阿?清说具体一点!

解决方案 »

  1.   

    这样
    先声明该函数:
    function SetIp(oldip, newip: string): Integer;stdcall;
    然后加载调用就可以了呀.
      

  2.   

    function SetIp(oldip, newip: string): integer; StdCall External '文件名.dll';
      

  3.   

    用safecall,cdecl都不行。我考虑是不是dll的声明方式不对或者少了东西了。
      

  4.   

    我知道了,谢谢大家。http://community.csdn.net/expert/FAQ/FAQ_Index.asp?id=195669
      

  5.   

    你的VC dll 中最好不要用CString...这是属于MFC的 用char* 很好