L LeeChange Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-15 #4 不是好块,是100块! 可今天的网络真是慢!!!
W walala Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-15 #5 当前窗口的handle,相当于一个指正。 leechange100块赚的快。
S shy_cm Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-15 #7 慢点,再加点难度。 一个DLL调用中,需返回一个当前窗口指针,应如何定义?
L LeeChange Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-15 #8 Screen.ActiveForm.Handle
S shy_cm Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-15 #9 是否是这样写 function readdata(var t:integer; s:screen.activeform.handle):longint;far;external"xxx.dll";
W www Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-15 #10 VB中是form1.hwnd delphi中是form1.handle
L LeeChange Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-15 #11 no 申明的时候这样写: function readdat(var t:integer; h :HWND):longint;far;external"xxx.dll"; 调用的时候: readdat(t,Screen.ActiveForm.Handle);
no 申明的时候这样写: function readdat(var t:integer; h :HWND):longint;far;external"xxx.dll"; 调用的时候: readdat(t,Screen.ActiveForm.Handle);
W walala Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-15 #13 sorry; s:integer; or s:hwnd;
S shy_cm Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-15 #14 下面这段当如何是好? Private Declare Function BehindCollectAndSave Lib "xxx.dll" (ByVal hDevice As Long, Parameter As PARA, ByVal SourceFileName As String, ByVal Words As Long, ByVal CallbackRoutine As Long, hwnd As Any, ByRef ErrorCode As Long) As Boolean
下面这段当如何是好? Private Declare Function BehindCollectAndSave Lib "xxx.dll" (ByVal hDevice As Long, Parameter As PARA, ByVal SourceFileName As String, ByVal Words As Long, ByVal CallbackRoutine As Long, hwnd As Any, ByRef ErrorCode As Long) As Boolean
P Pipi. Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-15 #15 在delphi: type PARA=record ... end; Function BehindCollectAndSave(hDevice:Long; ParameterARA;SourceFileNameChar;Words:Long;CallbackRoutine:Long; hwnd_ :HWND ,ErrorCode:Long):Boolean;external "xxx.dll";
在delphi: type PARA=record ... end; Function BehindCollectAndSave(hDevice:Long; ParameterARA;SourceFileNameChar;Words:Long;CallbackRoutine:Long; hwnd_ :HWND ,ErrorCode:Long):Boolean;external "xxx.dll";
P Pipi. Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-15 #16 改一点: 在delphi: type PARA=record ... end; Function BehindCollectAndSave(hDevice:Long; ParameterARA;SourceFileNameChar;Words:Long;CallbackRoutine:Long; hwnd_ :HWND ;ErrorCode:Long):Boolean;stdcall;external "xxx.dll";
改一点: 在delphi: type PARA=record ... end; Function BehindCollectAndSave(hDevice:Long; ParameterARA;SourceFileNameChar;Words:Long;CallbackRoutine:Long; hwnd_ :HWND ;ErrorCode:Long):Boolean;stdcall;external "xxx.dll";
P Pipi. Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-15 #17 上面的有问题,再改一点: 在delphi: type PARA=record ... end; type PPARA=^PARA; Function BehindCollectAndSave(hDevice:Long; ParameterPARA;SourceFileNameChar;Words:Long;CallbackRoutine:Long; hwnd_ :HWND ;ErrorCode:Long):Boolean;stdcall;external "xxx.dll"; “ParameterPARA” 和 “var ParameterARA” 都可以,编译成 汇编代码是一样的,只是写起delphi代码来有点不同。
上面的有问题,再改一点: 在delphi: type PARA=record ... end; type PPARA=^PARA; Function BehindCollectAndSave(hDevice:Long; ParameterPARA;SourceFileNameChar;Words:Long;CallbackRoutine:Long; hwnd_ :HWND ;ErrorCode:Long):Boolean;stdcall;external "xxx.dll"; “ParameterPARA” 和 “var ParameterARA” 都可以,编译成 汇编代码是一样的,只是写起delphi代码来有点不同。
P Pipi. Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-15 #18 “ParameterPARA” 和 “var ParameterARA” 都可以, 编译成汇编代码是一样的,只是写起delphi代码来有点不同。 "ParameterARA" 则是错误的
S shy_cm Unregistered / Unconfirmed GUEST, unregistred user! 2000-02-16 #19 pipi:看来真是此道高手,多谢相助。我还不懂的是,括号中的值不需要var 一下吗?值怎么返回呢?