import.pas 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. {
  2. $Id$
  3. Copyright (c) 1998 by Peter Vreman
  4. This unit implements an uniform import object
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************}
  17. unit import;
  18. interface
  19. type
  20. pimportlib=^timportlib;
  21. timportlib=object
  22. constructor Init;
  23. destructor Done;
  24. procedure preparelib(const s:string);virtual;
  25. procedure importprocedure(const func,module:string;index:longint;const name:string);virtual;
  26. procedure generatelib;virtual;
  27. end;
  28. var
  29. importlib : pimportlib;
  30. procedure InitImport;
  31. implementation
  32. uses
  33. systems,verbose,
  34. os2_targ,win_targ;
  35. constructor timportlib.Init;
  36. begin
  37. end;
  38. destructor timportlib.Done;
  39. begin
  40. end;
  41. procedure timportlib.preparelib(const s:string);
  42. begin
  43. Message(exec_e_dll_not_supported);
  44. end;
  45. procedure timportlib.importprocedure(const func,module:string;index:longint;const name:string);
  46. begin
  47. Message(exec_e_dll_not_supported);
  48. end;
  49. procedure timportlib.generatelib;
  50. begin
  51. Message(exec_e_dll_not_supported);
  52. end;
  53. procedure InitImport;
  54. begin
  55. case target_info.target of
  56. target_Win32 : importlib:=new(pimportlibwin32,Init);
  57. target_OS2 : importlib:=new(pimportlibos2,Init);
  58. else
  59. importlib:=new(pimportlib,Init);
  60. end;
  61. end;
  62. end.
  63. {
  64. $Log$
  65. Revision 1.1 1998-03-25 11:18:12 root
  66. Initial revision
  67. Revision 1.3 1998/03/10 01:17:19 peter
  68. * all files have the same header
  69. * messages are fully implemented, EXTDEBUG uses Comment()
  70. + AG... files for the Assembler generation
  71. Revision 1.2 1998/03/06 00:52:21 peter
  72. * replaced all old messages from errore.msg, only ExtDebug and some
  73. Comment() calls are left
  74. * fixed options.pas
  75. }