sxd 发表于 2009-8-11 15:12:53

dllcall的问题 delphi自己可以调用 au3不行

写了个dll delphi可以调用au3却不行 高手帮我看看

================DLL==============
function sxd(s, b: Integer): Integer; stdcall;

begin
if s > b then
    Result := s
else
    Result := b;
end;
================DLL==============

================au3==============
$a = DllCall("Project1.dll","int","sxd","int",2,"int",4)
MsgBox(262144,'Debug line ~' & @ScriptLineNumber,'Selection:' & @lf & '$a' & @lf & @lf & 'Return:' & @lf & $a & @lf & @lf & '@Error:' & @lf & @Error) ;### Debug MSGBOX
================au3==============

附件里是dll和delphi的调用

顽固不化 发表于 2009-8-11 15:28:21

老手遇到新问题啦,呵呵

sxd 发表于 2009-8-11 15:30:04

汗 别光笑嘛 dllcall也没错啊我看

gengzelei 发表于 2009-8-11 15:33:31

持续关注ing

顽固不化 发表于 2009-8-11 16:04:03

没用过DeP,从VB上看,他们的编制的Dll有些限制,自己去调用还可以,其他的去调用就不理想。

sxd 发表于 2009-8-11 20:03:54

可是调用约定都是stdcall 按道理大家都可以用

sxd 发表于 2009-8-14 17:29:00

顶上去
10字补丁.exe

sxd 发表于 2009-8-15 22:09:40

顶上去
10字补丁.exe

sanhen 发表于 2009-8-15 23:00:43

不要顶了。
function sxd(s, b: Integer): Integer; stdcall;
s的类型呢? 有时候编程语言写的DLL编程语言可以调用,但是AU3不行,很正常的现象。

冷风无泪 发表于 2009-8-16 20:05:21

参数类型不对称!~~c++中的boolean,在vb中调用要写成long类型!~

78391493 发表于 2009-8-17 08:55:55

LS胡说八道 bool跟long不是一回事

冷风无泪 发表于 2009-8-17 11:14:51

你就当我胡说八道吧!请问你用过vb调用过c++写的dll吗?

sxd 发表于 2009-10-11 15:51:51

不要顶了。
function sxd(s, b: Integer): Integer; stdcall;
s的类型呢? 有时候编程语言写的DLL编程语言可以调用,但是AU3不行,很正常的现象。
sanhen 发表于 2009-8-15 23:00 http://www.autoitx.com/images/common/back.gif
function sxd(s, b: Integer): Integer; stdcall;

function sxd(s: Integer, b: Integer): Integer; stdcall;
是一样的

sxd 发表于 2009-10-11 15:52:10

参数类型不对称!~~c++中的boolean,在vb中调用要写成long类型!~
冷风无泪 发表于 2009-8-16 20:05 http://www.autoitx.com/images/common/back.gif

请问我哪里不对称 我看不明白啊

kn007 发表于 2009-10-11 17:12:43

写了个dll delphi可以调用au3却不行 高手帮我看看

================DLL==============
function sxd(s, b: Integer): Integer; stdcall;

begin
if s > b then
    Result := s
else
    Result :=...
sxd 发表于 2009-8-11 15:12 http://www.autoitx.com/images/common/back.gif
请教下,这个dll怎么做的?什么工具
能做那种有图标的dll吗?
页: [1] 2
查看完整版本: dllcall的问题 delphi自己可以调用 au3不行