如果你注册了该dll,并且正确的引用了dll文件,调用她应该是不会出错
解决方案 »
- 遍历两个panel上的控件
- 小弟,请教如何把 DBGrid 中的数据倒入到EXCEL 中
- dll 中包含 adoconnection 后 不能调用的问题
- 请教 VBA转化为DELPHI代码
- ftp用list命令,为什么提示:425 Can't open data connection?
- 请教TIWServerController控件中属性ComInitialization的问题
- 按住label拖动就象按住标题一样可以拖动,怎么实现?
- Delphi做的ActiveX为何在本机的浏览器中能用,而在其他机器上出错????/
- 100分求教,如何让自己的程序支持插件
- 如何写代码控制DBGRID游标.....
- 我希望用程序实现如下的功能:
- 有没有sql语句对带有一定格式的txt文件导入表中?
好象delphi生成的dll
If you want your DLL to be available to applications written in other languages, it抯 safest to specify stdcall in the declarations of exported functions. Other languages may not support Object Pascal抯 default register calling convention.
您可以看一下你的delphi技术文档中的writing dll 部分。
好象delphi生成的dll
If you want your DLL to be available to applications written in other languages, it抯 safest to specify stdcall in the declarations of exported functions. Other languages may not support Object Pascal抯 default register calling convention.
您可以看一下你的delphi技术文档中的writing dll 部分。
2、要么缺少一个BORLNDMM.DLL文件,调用时如果要传递字符串为参数,就要用它。
你可以试一试。
unit main;interfaceuses
forms,Windows,Db, ADODB, Graphics, Classes, Controls,
StdCtrls, ExtCtrls,ReportControl;
type
TfrmRepView = class(TForm)
ReportRunTime1: TReportRunTime;
Label1: TLabel;
Image1: TImage;
ADOQuery1: TADOQuery;
DataSource1: TDataSource;
procedure FormActivate(Sender: TObject);
procedure FormPaint(Sender: TObject);
procedure FormCreate(Sender: TObject);
private public end;var
frmRepView: TfrmRepView;
ADOConn:WideString;
ADOSQL:String;
function cRepView (conn:PChar;SQL:PChar):Boolean;stdcall;
implementation{$R *.DFM}function cRepView (conn:PChar;SQL:PChar):Boolean;begin
ADOConn:= conn;
ADOSQL:=SQL;
frmRepView:=TfrmRepView.Create(nil);
try
Result:=(frmRepView.ShowModal=mrOK);
finally
frmRepView.Free;
end;
end;procedure TfrmRepView.FormActivate(Sender: TObject);
begin
Application.ProcessMessages;
ReportRunTime1.SetDataset('d1',ADOQuery1);
ReportRunTime1.printpreview(true);
end;
procedure TfrmRepView.FormPaint(Sender: TObject);
begin
close;
end;procedure TfrmRepView.FormCreate(Sender: TObject);
begin
with ADOQuery1 do
begin
SQL.Clear;
Close;
ConnectionString:= ADOConn;
SQL.Text:= ADOSQL;
ADOQuery1.Open;
end;
With ReportRunTime1 Do
begin
setdataset('d1',ADOQuery1);
reportfile:='c:\temp\meitong.ept';
enableedit:=true;
end;
end;
在vb中的调用正确吗?
'声名部分
Private Declare Function cRepView Lib "cRepView.dll" (ByVal conn As String, ByVal SQL As String)'调用
Call cRepView("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Temp\nanwei.mdb;Persist Security Info=False", _
"Select * From aa")
Private Declare Function cRepView Lib "cRepView.dll" (ByVal conn As String, ByVal SQL As String) AS BOOLEAN