如题, 谢谢!

解决方案 »

  1.   


    声明:
        function ExeCommand(CreateCardScriptName,IndidataName,LogDateName:pChar; nExcuteFlag,Index:longint;szName:pchar):longint;stdcall; external 'ScriptExcute.dll' name 'ExeCommand';调用:
    logfile:='C:\执行Log' + inttostr(ThreadID) + '.txt';
     nRet:=ExeCommand(pChar(g_ScriptName),pChar(form1.g_CardInfo[ThreadID].UserConstData),pChar(logfile),1,ThreadID,pCharfor); 
      

  2.   

    函数调用约定(stdcall/cdecl)是否一致?
      

  3.   

    我的程序如下:声明:
        function ExeCommand(CreateCardScriptName,IndidataName,LogDateName:pChar; nExcuteFlag,Index:longint;szName:pchar):longint;stdcall; external 'ScriptExcute.dll' name 'ExeCommand';调用:
    logfile:='C:\执行Log' + inttostr(ThreadID) + '.txt';
     nRet:=ExeCommand(pChar(g_ScriptName),pChar(form1.g_CardInfo[ThreadID].UserConstData),pChar(logfile),1,ThreadID,pCharfor); 调了它后就不返回了
      

  4.   

    VC动态库约定为:WINAPI  
    Delphi: stdcall
     
    一致
      

  5.   

    vb 调 Delphi 的Dll也出过类似的事