急等,编写动态链接库时出现的问题.(50分)

  • 主题发起人 主题发起人 softlong
  • 开始时间 开始时间
S

softlong

Unregistered / Unconfirmed
GUEST, unregistred user!
procedure ShowCertificateEx(ModuleID, ID, CateID: string; q_view: TADOQuery; Options: string);<br>begin<br>&nbsp; Frm_Certificate := TFrm_Certificate.Create(application, ModuleID, ID, q_view,Options);<br>end;<br><br>procedure ShowExportListEx(ModuleID, ID, CateID: string; q_view: TADOQuery; Options: string);<br>begin<br>&nbsp; Frm_export_list := TFrm_export_list.Create(application, ModuleID, ID, q_view,Options);<br>end;<br><br>procedure ShowContractEx(ModuleID, ID, CateID: string; q_view: TADOQuery; Options: string);<br>begin<br>&nbsp; Frm_Contract := TFrm_Contract.Create(application, ModuleID, ID, q_view,Options);<br>end;<br><br><br>以上是三个接口,为什么最后一个老是提示实参太多的错误呢?这三个接口是显示窗体的接口.<br>麻烦帮我看看哦...急等用....
 
各位大哥们,麻烦帮小弟看看啊,找了半天的原因都没有找到......<br>以下是library的源码:<br>library Certificate;<br><br>{ Important note about DLL memory management: ShareMem must be the<br>&nbsp; first unit in your library's USES clause AND your project's (select<br>&nbsp; Project-View Source) USES clause if your DLL exports any procedures or<br>&nbsp; functions that pass strings as parameters or function results. This<br>&nbsp; applies to all strings passed to and from your DLL--even those that<br>&nbsp; are nested in records and classes. ShareMem is the interface unit to<br>&nbsp; the BORLNDMM.DLL shared memory manager, which must be deployed along<br>&nbsp; with your DLL. To avoid using BORLNDMM.DLL, pass string information<br>&nbsp; using PChar or ShortString parameters. }<br><br>uses<br>&nbsp; sharemem,<br>&nbsp; SysUtils,<br>&nbsp; Windows,<br>&nbsp; Forms,<br>&nbsp; ADODB,<br>&nbsp; UFrm_certificate in 'UFrm_certificate.pas' {Frm_certificate},<br>&nbsp; UFrm_export_list in 'UFrm_export_list.pas' {Frm_export_list},<br>&nbsp; define in '../define/define.pas',<br>&nbsp; UFrm_Contract in 'UFrm_Contract.pas' {Frm_Contract},<br>&nbsp; UFrmPasswordDlg in 'UFrmPasswordDlg.pas' {FrmPasswordDlg};<br><br>{$R *.res}<br>var<br>&nbsp; DllApplication: TApplication;<br>&nbsp; DllScreen: TScreen;<br><br>procedure ShowCertificateEx(ModuleID, ID, CateID: string; q_view: TADOQuery; Options: string);<br>begin<br>&nbsp; Frm_Certificate := TFrm_Certificate.Create(application, ModuleID, ID, q_view,Options);<br>end;<br><br>procedure ShowExportListEx(ModuleID, ID, CateID: string; q_view: TADOQuery; Options: string);<br>begin<br>&nbsp; Frm_export_list := TFrm_export_list.Create(application, ModuleID, ID, q_view,Options);<br>end;<br><br>procedure ShowContractEx(ModuleID, ID, CateID: string; q_view: TADOQuery; Options: string);<br>begin<br>&nbsp; Frm_Contract := TFrm_Contract.Create(application, ModuleID, ID, q_view,Options);<br>end;<br><br><br><br><br>procedure LibraryProc(Reason: Integer);<br>begin<br>&nbsp; if Reason = DLL_PROCESS_DETACH then<br>&nbsp; begin<br>&nbsp; &nbsp; Screen := DllScreen;<br>&nbsp; &nbsp; Application := DllApplication;<br>&nbsp; end;<br>end;<br>exports<br>&nbsp; ShowCertificateEx,ShowExportListEx,ShowContractEx; <br><br>begin<br>&nbsp; DllApplication := Application;<br>&nbsp; DllScreen := Screen;<br>&nbsp; DLLProc := @LibraryProc;<br>end.
 
后退
顶部