关于DLL的问题!!!!!!!!!!!!!!!!!Dll的原代码:library dllProject1;
uses
SysUtils,
Classes;{$R *.res}function GetStr(X,Y:string):string; begin Result:=X+Y; end; exports
GetStr;
begin
end.
下面是调用的代码 type
TForm1 = class(TForm)....
.....
....
..... end;var
Form1: TForm1;
function GetStr(x,y:string):string;stdcall;external 'dllProject1.dll';implementation...
...
...
//下面是按钮事件
procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage(GetStr('Hello','world'));end;上面的代码都能正常编译,DLL的路径也没有错,但是当按下按钮时调用DLL时出错,错误提示"
application-defined exception (code oxc000001e)....." ,环境为WIN2000 ,DELPHI6
uses
SysUtils,
Classes;{$R *.res}function GetStr(X,Y:string):string; begin Result:=X+Y; end; exports
GetStr;
begin
end.
下面是调用的代码 type
TForm1 = class(TForm)....
.....
....
..... end;var
Form1: TForm1;
function GetStr(x,y:string):string;stdcall;external 'dllProject1.dll';implementation...
...
...
//下面是按钮事件
procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage(GetStr('Hello','world'));end;上面的代码都能正常编译,DLL的路径也没有错,但是当按下按钮时调用DLL时出错,错误提示"
application-defined exception (code oxc000001e)....." ,环境为WIN2000 ,DELPHI6
解决方案 »
- TWebBrowser组建返回结果问题
- 如何返回由getmem分配的内存大小。
- 想学下SQL,求教
- 如何才能打开加密的paradox数据库,我忘记口令了,请高手给指点了。
- 项目合作,需要用openGL做三维地形环境(成都)
- 怎样在Dlphi中做加减成除运算 请发代码告诉我谢谢各位
- ListBox受限于64K的问题
- 谁能告诉我,关于数据库有什么好书,thanks a lot!(mm)
- 如何通过窗体的名字调用其实例?
- 请教启动NT的服务的Windows API 函数是什么?谁能提供查找API函数的站点?谢谢了!
- 关于RICHEDIT控件插入图片的问题!!!!!!!!???
- 请问如何修改windows里的颜色值?
-种方法:则在uses 语句中包抱 ShareMem 单元,且要将 ShareMem 单元 放在第一个.
二种方法:利用PChar 或 ShortString 类型来传送字符串信息,则可以不加ShareMem 单元..----OVER