comobj.pp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 2002 by Florian Klaempfl
  5. member of the Free Pascal development team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. {$mode objfpc}
  13. unit comobj;
  14. interface
  15. {$ifndef VER1_0}
  16. {$i comobjh.inc}
  17. {$endif VER1_0}
  18. implementation
  19. {$ifndef VER1_0}
  20. uses
  21. windows,activex;
  22. {$define FPC_COMOBJ_HAS_CREATE_CLASS_ID}
  23. function CreateClassID : ansistring;
  24. var
  25. ClassID : TCLSID;
  26. p : PWideChar;
  27. begin
  28. CoCreateGuid(ClassID);
  29. StringFromCLSID(ClassID,p);
  30. result:=p;
  31. CoTaskMemFree(p);
  32. end;
  33. {$i comobj.inc}
  34. {$endif VER1_0}
  35. end.
  36. {
  37. $Log$
  38. Revision 1.1 2002-10-10 16:09:39 florian
  39. + initial revision
  40. }