shlobj.pp 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2007 by Florian Klaempfl
  4. member of the Free Pascal development team.
  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. Original copyright statement follows.
  11. }
  12. {$mode objfpc}
  13. unit shlobj;
  14. interface
  15. uses
  16. windows,activex;
  17. type
  18. IEnumIDList = interface(IUnknown)
  19. ['{000214F2-0000-0000-C000-000000000046}']
  20. function Next(celt: ULONG; out rgelt: PItemIDList; var pceltFetched: ULONG): HRESULT; stdcall;
  21. function Skip(celt: ULONG): HRESULT; stdcall; function Reset: HRESULT; stdcall;
  22. function Clone(out ppenum: IEnumIDList): HRESULT; stdcall;
  23. end;
  24. IShellFolder = interface(IUnknown)
  25. ['{000214E6-0000-0000-C000-000000000046}']
  26. function ParseDisplayName(hwndOwner: HWND; pbcReserved: Pointer; lpszDisplayName: POLESTR; out pchEaten: ULONG; out ppidl: PItemIDList; var dwAttributes: ULONG): HRESULT; stdcall;
  27. function EnumObjects(hwndOwner: HWND; grfFlags: DWORD; out EnumIDList: IEnumIDList): HRESULT; stdcall;
  28. function BindToObject(pidl: PItemIDList; pbcReserved: Pointer; const riid: TIID; out ppvOut): HRESULT; stdcall;
  29. function BindToStorage(pidl: PItemIDList; pbcReserved: Pointer; const riid: TIID; out ppvObj): HRESULT; stdcall;
  30. function CompareIDs(lParam: LPARAM; pidl1, pidl2: PItemIDList): HRESULT; stdcall;
  31. function CreateViewObject(hwndOwner: HWND; const riid: TIID; out ppvOut): HRESULT; stdcall;
  32. function GetAttributesOf(cidl: UINT; var apidl: PItemIDList; var rgfInOut: UINT): HRESULT; stdcall;
  33. function GetUIObjectOf(hwndOwner: HWND; cidl: UINT; var apidl: PItemIDList; const riid: TIID; prgfInOut: Pointer; out ppvOut): HRESULT; stdcall;
  34. function GetDisplayNameOf(pidl: PItemIDList; uFlags: DWORD; var lpName: TStrRet): HRESULT; stdcall;
  35. function SetNameOf(hwndOwner: HWND; pidl: PItemIDList; lpszName: POLEStr; uFlags: DWORD; var ppidlOut: PItemIDList): HRESULT; stdcall;
  36. end;
  37. IAutoComplete = interface(IUnknown)
  38. ['{00bb2762-6a77-11d0-a535-00c04fd7d062}']
  39. function Init(hwndEdit: HWND; punkACL: IUnknown; pwszRegKeyPath: LPCWSTR; pwszQuickComplete: LPCWSTR): HRESULT; stdcall;
  40. function Enable(fEnable: BOOL): HRESULT; stdcall;
  41. end;
  42. const
  43. CLSID_AutoComplete: TGUID = '{00BB2763-6A77-11D0-A535-00C04FD7D062}';
  44. const
  45. { IAutoComplete2 options }
  46. ACO_NONE = 0;
  47. ACO_AUTOSUGGEST = $1;
  48. ACO_AUTOAPPEND = $2;
  49. ACO_SEARCH = $4;
  50. ACO_FILTERPREFIXES = $8;
  51. ACO_USETAB = $10;
  52. ACO_UPDOWNKEYDROPSLIST = $20;
  53. ACO_RTLREADING = $40;
  54. type
  55. IAutoComplete2 = interface(IAutoComplete)
  56. ['{EAC04BC0-3791-11d2-BB95-0060977B464C}']
  57. function SetOptions(dwFlag: DWORD): HRESULT; stdcall;
  58. function GetOptions(var dwFlag: DWORD): HRESULT; stdcall;
  59. end;
  60. implementation
  61. end.