各位高手请教一个问题,我写了一个DLL调用时总是出错,请各位高手指点一下错在那里,源码如下:library Project1;{ 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
ShareMem,SysUtils,Forms,Controls,
Classes;{$R *.res}
Function FinDate(i:integer):string;stdcall;
var
t:TDate;
begin
Filemode:=0;
ShortDateFormat:='yyyy-mm-dd';
t:=FileDateToDateTime(FileAge(application.ExeName));
if i>10 then
Result:=datetostr(t)
else
result:='wzz';
end;begin
end.谢谢!
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
ShareMem,SysUtils,Forms,Controls,
Classes;{$R *.res}
Function FinDate(i:integer):string;stdcall;
var
t:TDate;
begin
Filemode:=0;
ShortDateFormat:='yyyy-mm-dd';
t:=FileDateToDateTime(FileAge(application.ExeName));
if i>10 then
Result:=datetostr(t)
else
result:='wzz';
end;begin
end.谢谢!
解决方案 »
- 从一个字符串中随机取出一组值?
- 如何保存以下程序所提取出的每一帧图片,最好是能保存成BMP格式的图片,不过别的格式的也行!
- 如何才能在Fasteport v3.x中画表格线,从页头一直画到页脚,没记录也画满?
- 出错了,撑不住了。。。请各位大虾帮帮忙。。。
- CloseFile Close 的区别
- SQLSERVER的错误信息放在哪里?
- Access 日期类型查询问题!!! 急!!!! 高分!!
- TMediaPlayer问题
- 关于form.print的问题,急!!!!!!!!!!!!!!!!!!!up有分!!!200分相送!!!
- 制做组件问题?
- delphi如何做BS结构的软件?
- DSPack 做DV播放器出错!
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
ShareMem,SysUtils,Forms,Controls,
Classes;{$R *.res}
Function FinDate(i:integer):string;stdcall;
var
t:TDate;
begin
Filemode:=0;
ShortDateFormat:='yyyy-mm-dd';
t:=FileDateToDateTime(FileAge(application.ExeName));
if i>10 then
Result:=datetostr(t)
else
result:='wzz';
end;
exports
FinDate ;
begin
end.