急!十万火急 高分请教高手 怎样创建和调用带有可重用窗体的DLL(DELPHI中) 答必给分(50分)

  • 主题发起人 主题发起人 天涯海角118
  • 开始时间 开始时间

天涯海角118

Unregistered / Unconfirmed
GUEST, unregistred user!
[?][:(]问题目如下:<br>在DLL单元中所建立过程如下:<br>procedure ybyzs(H:THandle;AConn:TADOConnection);stdcall; &nbsp;//声明DLL函数<br>procedure ybyzs(H:THandle;AConn:TADOConnection);(DLL所调用过程)<br>var<br>i:integer;<br>StrAdres:string;<br>begin<br>&nbsp; Application.Handle:=H;<br>&nbsp; with TForm3.Create(Application) do try//创建密码验证窗口<br>&nbsp; ADOConnection1:=AConn;<br>&nbsp; ADOConnection1.Connected:=true;<br>&nbsp; if ShowModal=mrok then<br>&nbsp; &nbsp;begin<br>&nbsp; form3.StrAdress:=TStringList.Create;<br>&nbsp; form3.checklistbox1.Items.Clear;<br>&nbsp; ADOQuery1.Connection :=ADOConnection1;<br>&nbsp; ADOQuery1.Open;<br>&nbsp; ADOQuery1.First ;<br>&nbsp; with form3.ADOQuery1 &nbsp; do<br>&nbsp; &nbsp; &nbsp;for i:=0 to RecordCount-1 do<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; form3.checklistbox1.Items.Add(Fields[1].AsString);<br>&nbsp; &nbsp; &nbsp; form3.StrAdress.Add(Fields[0].AsString);<br>&nbsp; &nbsp; &nbsp; Next;<br>&nbsp; &nbsp; end;<br>&nbsp; end;<br>&nbsp; finally<br>&nbsp; free;//释放资源<br>&nbsp; end;<br>&nbsp; ADOQuery2.close;<br>&nbsp; ADOQuery2.Open;<br>end;<br>以上报错为:没有数据源名称<br><br>我的EM:ljylove1185@sina.com
 
后退
顶部