library Project2;
{$define pennieslib}{ 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
  SysUtils,
  Classes;
  penniesint;
  function penniestocoins(toppennies:word;coinsrec:pcoinsrec):word;stdcall;
  begin
        result:=toppennies;
        with  coinsrec^ do
          begin
          quarters:=toppennies div 25;
          toppennies:=toppennies-quarters*25;
          dimes:=toppennies div 10;
          toppennies:=toppennies-dimes*10;
          nickels:=toppennies div 5;
          toppennies:=toppennies-nickels*5;
          pennies:=toppennies;
          end;          exports          penniestocoins;
{$R *.res}
begin
end.我看 delphi5 开发人员指南 的DLL 可是看不懂,请教各位老大几个问题:
下面是我照抄一段代码:
问题1:
{$define pennieslib} 是什么,怎么来的?
问题2:penniesint ,是什么,可以不先定义吗?
问题3:coinsrec:pcoinsrec 的 pcoinsrec 是什么类型?
问题4:我上面写的格式对吗?