怎么写一个供调用的dll函数啊
一般的unit代码中是uses后面是type语句,type语句都是窗体中的组件的定义,我写的是dll,只是一个被调用的函数,也没有窗体,没有组件,type语句一个写些什么呢?
还有我写好的代码怎么有错误呢,好像系统根本不识别我写的东西,好像无法进入我写的函数似的呢?
这是我的代码,大家帮我看看百.
uses
ShareMem,
SysUtils,
Classes;
{$R *.res}
procedure SetPoint(x, y : Integer; s : PChar) StdCall; Exports SetPoint;
Var
tr : TRect;
DrawStyle: DWORD;
begin
DrawStyle := DrawStyle or DT_WORDBREAK or DT_EDITCONTROL
or DT_EXPANDTABS or DT_NOPREFIX;
tr.left := x;
tr.top := y;
//Windows.DrawText(Canvas.Handle,PChar(s),Length(s),tr,DrawStyle);
end;