一模一样的code放在DLL中去调用就会出错
直椄copy到程序中不生成DLL调用就没有问题
这是什么问题这个那个函数
Function RunTime(FileToRun : PChar; Var Flag : String; Maxtimes : Extended; Var UseTimes : Extended) : DWord; Export;出问题的应该就是这句
CreateProcess(FileToRun, nil, nil, nil,True,
CREATE_NEW_CONSOLE, nil, nil, FStartupInfo,FProcessInfo);
直椄copy到程序中不生成DLL调用就没有问题
这是什么问题这个那个函数
Function RunTime(FileToRun : PChar; Var Flag : String; Maxtimes : Extended; Var UseTimes : Extended) : DWord; Export;出问题的应该就是这句
CreateProcess(FileToRun, nil, nil, nil,True,
CREATE_NEW_CONSOLE, nil, nil, FStartupInfo,FProcessInfo);
解决方案 »
- 求助 QQ左边导航栏组件
- showmessage(FormatDateTime('yyyymmddhhmmssmmm',now));
- ClientDataSet最大字段长度不能超过31位,ADO不会有此问题,请问哪位高手能帮忙解决?
- 刚用delphi,请各位多多帮忙。。。(在线等)
- 腾讯的服务是狗屎,妈的。。。。。。。。。。。。。。
- HELP!!!
- 可以在客户端程序中动态改变AppServer上的TDataSet的字段的ProviderFlags吗?
- 金额小写转大写的问题
- 在clientdataset的oncdsCalcFields事件中这样赋值,是否会将记录的值存到数据库当中?
- 有关currency类型!
- 关于窗体的快捷键的使用
- 新手问题
帮助里查查Stdcall是什么就知道了,
它是对参数传递的控制
我在申明和调用中都加了
可还是有问题
Invaild pointer operation
同样的函数申明,stdcall,export,都有,函数返回一个字符串,可是如果result:=result+'03'就要报错了,但是如果只有一个语句:result:='';就不会报错,报错也是Invaild pointer operation
可是我根本没有指针操作啊,也向楼主一样,函数确实被执行了,就是报错,
关注中···
var
int:integer;
begin //result:='1';
int:=0;
result:=result+ inttohex(int,2);
//showmessage(cpu+ss);
result:=cpu+ss;
end;exports
aa name 'aa1';
新建一个DLL 仔细看看生成的代码里面那一大段英文说明
first unit in your library's USES clause AND your project's (select
Project-View Source) USES clause if your DLL exports any procedures or
functions that pass strings as parameters or function results. This
applies to all strings passed to and from your DLL--even those that
are nested in records and classes. ShareMem is the interface unit to
the BORLNDMM.DLL shared memory manager, which must be deployed along
with your DLL. To avoid using BORLNDMM.DLL, pass string information
using PChar or ShortString parameters. }这东东啊
算了算了 我不返回string了
还有一个问题 我还没试
不过先问一下
我传给dll中的函数一个参数如var flag: Integer;
dll中函数运行时 我在外部改变flag的值
dll中的函数中的那个flag应该也被改变了吧?
如果不能我应该怎么做呢?
这样的话用VAR传递的简单变量应该可以随之变化
试了以后来说下结果吧
,呵呵,满高兴的,