classes.pp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. {
  2. This file is part of the Free Component Library (FCL)
  3. Copyright (c) 1998-2006 by Michael Van Canneyt and Florian Klaempfl
  4. Classes unit for winx64
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. {$mode objfpc}
  12. {$IF FPC_FULLVERSION>=30301}
  13. {$modeswitch FUNCTIONREFERENCES}
  14. {$define FPC_HAS_REFERENCE_PROCEDURE}
  15. {$endif}
  16. { determine the type of the resource/form file }
  17. { $define Win16Res}
  18. unit Classes;
  19. interface
  20. uses
  21. rtlconsts,
  22. sysutils,
  23. types,
  24. sortbase,
  25. {$ifdef FPC_TESTGENERICS}
  26. fgl,
  27. {$endif}
  28. typinfo,
  29. windows;
  30. type
  31. TWndMethod = procedure(var msg : TMessage) of object;
  32. function MakeObjectInstance(Method: TWndMethod): Pointer;
  33. procedure FreeObjectInstance(ObjectInstance: Pointer);
  34. function AllocateHWnd(Method: TWndMethod): HWND;
  35. procedure DeallocateHWnd(Wnd: HWND);
  36. {$i classesh.inc}
  37. implementation
  38. uses
  39. sysconst;
  40. { OS - independent class implementations are in /inc directory. }
  41. {$i classes.inc}
  42. function MakeObjectInstance(Method: TWndMethod): Pointer;
  43. begin
  44. runerror(211);
  45. MakeObjectInstance:=nil;
  46. end;
  47. procedure FreeObjectInstance(ObjectInstance: Pointer);
  48. begin
  49. runerror(211);
  50. end;
  51. function AllocateHWnd(Method: TWndMethod): HWND;
  52. begin
  53. runerror(211);
  54. AllocateHWnd:=0;
  55. end;
  56. procedure DeallocateHWnd(Wnd: HWND);
  57. begin
  58. runerror(211);
  59. end;
  60. initialization
  61. CommonInit;
  62. finalization
  63. CommonCleanup;
  64. end.