home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vp21beta.zip / AEXMPSRC.RAR / DLL / TSTVPDLL.PAS < prev   
Pascal/Delphi Source File  |  2000-08-15  |  1KB  |  45 lines

  1. {█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█}
  2. {█                                                       █}
  3. {█      Virtual Pascal Examples. Version 2.1.            █}
  4. {█      Simple DLL example                               █}
  5. {█      ─────────────────────────────────────────────────█}
  6. {█      Copyright (C) 1996-2000 vpascal.com              █}
  7. {█                                                       █}
  8. {▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀}
  9.  
  10. library TstVpDll;
  11. {$Delphi+,OrgName-}
  12.  
  13. {$Linker
  14. DESCRIPTION 'Sample Virtual Pascal DLL'}
  15.  
  16. procedure TestProc1;
  17. begin
  18.   WriteLn('DLL: Now in TestProc1');
  19. end;
  20.  
  21. procedure TestProc2;
  22. begin
  23.   WriteLn('DLL: Now in TestProc2');
  24. end;
  25.  
  26. function TestFunc(a, b: Longint): Longint; cdecl;
  27. begin
  28.   Result := a + b;
  29. end;
  30.  
  31. procedure TestProc3; export;
  32. begin
  33.   WriteLn('DLL: Now in TestProc3');
  34. end;
  35.  
  36. exports
  37.   // Specify which entry points to export
  38.   TestProc1 index 1,
  39.   TestProc2 name 'Test2',
  40.   TestProc3,
  41.   TestFunc  name 'TestFunc';
  42.  
  43. initialization
  44. end.
  45.