===谁帮我解释一下这个dll===(40分)

C

coolsun

Unregistered / Unconfirmed
GUEST, unregistred user!



{
模块名称:Jycs.dll
文件名称:Jycs.pas
*****************}
library Jycs;

{ Important note about DLL memory management: ShareMem must be the
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. }

uses
SysUtils,
Classes,
ADODB,
ScktComp,
ActiveX,
XMLDoc,
untConfig,
untJycsManage in 'untJycsManage.pas',
untPubStruct in '../../Public/untPubStruct.pas',
untBaseClass in '../../Public/untBaseClass.pas',
untPubDbHandle in '../../Public/untPubDbHandle.pas',
defsocket in '../../Public/defsocket.pas';

{$R *.res}

{
2551交易参数修改|2553查询资金归集关系|
}
function SubTransProcess(TransCode: string; RecvStr: string; RecvLen: Integer; ConnectModule: TConnectModule;
NodeClass: TXMLDocument; SocketConnect: TServerClientWinSocket;
LocalDbConnection: TAdoConnection): TBaseTransClass; stdcall;
begin
CoInitialize(nil);
Result := nil;

if Pos(TransCode, '2551|2553|') <> 0 then
Result := TJycsClass.Create(TransCode, RecvStr, RecvLen, ConnectModule, NodeClass, SocketConnect, LocalDbConnection);
end;

exports
SubTransProcess;
end.
我的问题是这样:
1.这个dll定义的function是个TBaseTransClass类型,请问这是个什么类型?
2.这个方法里面有个ConnectModule: TConnectModule属性,请问这个TConnectModule又是个什么类型?好像没有这个组件啊
3.CoInitialize(nil)是什么意思?好像不是系统函数啊
4.假如有一个服务器端,当客户端有请求发过来的时候,动态调用相应的dll进行应答处理,那请问我调用的时候是不是一定要存在那个dll文件,如果没有编译产生dll文件,而我又想动态去调用,是否可以实现?
小弟刚学,见笑了,希望大家能拉我一把!//bow

 
那几中类型应该是在其他单元定义 的。
一定要存在Dll.
 
1.TBaseTransClass 应该是自定义类,你在uses中的几个pas中找找(我猜再'../../Public/untBaseClass.pas'中)
2、同上。
3、CoInitialize(nil)是初始化ado再activex中
4、不可以吧
 
1,2 估计是上面哪个单元自定义的类型,你找一下它的定义copy到你的单元就可以了
3 在非主线程中调用COM时应该先调用CoInitialize过程
4 当然是需要Dll的,或者说你用Package,不过这个又比dll复杂多了
 
谢谢各位,明白多了。还有一点:
来自:迷糊, 时间:2003-7-4 17:29:00, ID:2003673

3、CoInitialize(nil)是初始化ado再activex中
以及

来自:pihome, 时间:2003-7-4 17:29:00, ID:2003676
3 在非主线程中调用COM时应该先调用CoInitialize过程

这两句话还是不太明白。能稍微说得详细些吗?以前从来没用过CoInitialize过程,谢谢大家再解释解释!!3x

 
多人接受答案了。
 

Similar threads

I
回复
0
查看
584
import
I
I
回复
0
查看
577
import
I
I
回复
0
查看
603
import
I
I
回复
0
查看
615
import
I
顶部