请问这个如何做啊。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。各位大侠看看。。。。。

gototop99 2003-04-18 04:44:35
DLL 中:

function PutIndata(s1, s2: Integer ): Boolean; stdcall;
begin
Result := False;
with dm.tbl_test do
begin
try
Open;
Append;
FieldByName('m1').Value := s1;
FieldByName('m2').Value := s2;

post;
Close;
Result := True;
except
Result := False;
end;
end;
end;

调用:

function PutIndata(s1, s2: Integer ): Boolean; stdcall; external '11.dll';

procedure TForm1.Button1Click(Sender: TObject);
begin
if PutIndata(1, 1) then ShowMessage('ok')
else ShowMessage('no');
end;
...全文
38 25 打赏 收藏 转发到动态 举报
写回复
用AI写文章
25 条回复
切换为时间正序
请发表友善的回复…
发表回复
gototop99 2003-05-14
  • 打赏
  • 举报
回复
解决啦,,,,,,,,,,,,,,,,


痛快。。。。。。。。。。。。。。。。。。。。
tttzms 2003-05-13
  • 打赏
  • 举报
回复
exports是要对每一个函都有的吧,
我不太懂,但我愿学
gototop99 2003-05-13
  • 打赏
  • 举报
回复
如果不是

with dm.tbl_test do


数据库的调用,那么就可以,比如一般的输出 a+b 的值啊。

function myadd(a,b:integer):integer;
begin
result:=a+b;
end;
gototop99 2003-05-13
  • 打赏
  • 举报
回复
exports


是有的,不然怎么调用呢。
gytyl 2003-05-08
  • 打赏
  • 举报
回复
你的dll的输出点列
就是
exports
我怎么没有看见。
yckxzjj 2003-04-25
  • 打赏
  • 举报
回复
关注一下。你可以下载一个相关的示例程序参考一下呀!
gototop99 2003-04-25
  • 打赏
  • 举报
回复
up
gototop99 2003-04-24
  • 打赏
  • 举报
回复
错误提示:

Access violation at address 002B2751 in module '11.dll'. Read of address 0000005C.

gototop99 2003-04-24
  • 打赏
  • 举报
回复
to yoic(我是一棵菠菜,菜,菜,菜,菜,菜,菜,) (

这些有的啦,,,,,

up.................
307 2003-04-24
  • 打赏
  • 举报
回复
up
yoisyois 2003-04-24
  • 打赏
  • 举报
回复
11.dll在相同目录下吗?
yoisyois 2003-04-24
  • 打赏
  • 举报
回复
Library 11
...

export
PutIndata;//你输出了吗?

begin
end.
gototop99 2003-04-24
  • 打赏
  • 举报
回复
up
gototop99 2003-04-23
  • 打赏
  • 举报
回复
错误提示:

Access violation at address 002B2751 in module '11.dll'. Read of address 0000005C.


应该怎么解决啊。。。。。。。。。。。。。。

帮帮手啊。。。。。。。。。。。。。。。
chenfeng3000 2003-04-21
  • 打赏
  • 举报
回复
又是dll阿,
我快崩溃了

出现错误提示"Invalid Pointer Operation"


网友意见:
通过参数(如:App)将主程序的Applicantion对象传递到DLL的函数中,
然后再DLL中设置Application:=App


如何实现。排错阿
blueshu 2003-04-21
  • 打赏
  • 举报
回复
up
l_xiaofeng 2003-04-21
  • 打赏
  • 举报
回复
什么错误?
DelUser 2003-04-21
  • 打赏
  • 举报
回复
抱的错误是什么?
gototop99 2003-04-21
  • 打赏
  • 举报
回复
export:
PutIndata;


肯定有的啦,不然怎么调用呢???

调用的时候地址出错,不知道是什么原因。。。。。。。。。。。
swayi21 2003-04-19
  • 打赏
  • 举报
回复

library 11
...

export:
PutIndata;
加载更多回复(5)

5,392

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧