classes.pp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. { determine the type of the resource/form file }
  13. { $define Win16Res}
  14. unit Classes;
  15. interface
  16. uses
  17. rtlconsts,
  18. sysutils,
  19. types,
  20. sortbase,
  21. {$ifdef FPC_TESTGENERICS}
  22. fgl,
  23. {$endif}
  24. typinfo,
  25. windows;
  26. type
  27. TWndMethod = procedure(var msg : TMessage) of object;
  28. function MakeObjectInstance(Method: TWndMethod): Pointer;
  29. procedure FreeObjectInstance(ObjectInstance: Pointer);
  30. function AllocateHWnd(Method: TWndMethod): HWND;
  31. procedure DeallocateHWnd(Wnd: HWND);
  32. {$i classesh.inc}
  33. implementation
  34. uses
  35. sysconst;
  36. { OS - independent class implementations are in /inc directory. }
  37. {$i classes.inc}
  38. function MakeObjectInstance(Method: TWndMethod): Pointer;
  39. begin
  40. runerror(211);
  41. MakeObjectInstance:=nil;
  42. end;
  43. procedure FreeObjectInstance(ObjectInstance: Pointer);
  44. begin
  45. runerror(211);
  46. end;
  47. function AllocateHWnd(Method: TWndMethod): HWND;
  48. begin
  49. runerror(211);
  50. AllocateHWnd:=0;
  51. end;
  52. procedure DeallocateHWnd(Wnd: HWND);
  53. begin
  54. runerror(211);
  55. end;
  56. initialization
  57. CommonInit;
  58. finalization
  59. CommonCleanup;
  60. end.