Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.8 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: P I D L U T I L . H
  7. //
  8. // Contents: Various PIDL utilities
  9. //
  10. // Notes:
  11. //
  12. // Author: jeffspr 1 Oct 1997
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. // This avoids duplicate definitions with Shell PIDL functions
  17. // and MUST BE DEFINED!
  18. #define AVOID_NET_CONFIG_DUPLICATES
  19. #include <windows.h>
  20. #include <shlobj.h>
  21. // These functions are so trivial & get called so often they should be inlined
  22. // for ship.
  23. //
  24. #if DBG
  25. LPITEMIDLIST ILNext(LPCITEMIDLIST pidl);
  26. BOOL ILIsEmpty(LPCITEMIDLIST pidl);
  27. #else
  28. #define ILNext(pidl) ((LPITEMIDLIST) ((BYTE *)pidl + ((LPITEMIDLIST)pidl)->mkid.cb))
  29. #define ILIsEmpty(pidl) (!pidl || !((LPITEMIDLIST)pidl)->mkid.cb)
  30. #endif
  31. LPITEMIDLIST ILSkip(LPCITEMIDLIST pidl, UINT cb);
  32. UINT ILGetSizePriv(LPCITEMIDLIST pidl);
  33. VOID FreeIDL(LPITEMIDLIST pidl);
  34. int ILCompare(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
  35. BOOL ILIsSingleID(LPCITEMIDLIST pidl);
  36. UINT ILGetCID(LPCITEMIDLIST pidl);
  37. UINT ILGetSizeCID(LPCITEMIDLIST pidl, UINT cid);
  38. BOOL ILIsDesktopID(LPCITEMIDLIST pidl);
  39. LPITEMIDLIST ILCreate(DWORD dwSize);
  40. LPITEMIDLIST ILFindLastIDPriv(LPCITEMIDLIST pidl);
  41. LPITEMIDLIST ILCombinePriv(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
  42. BOOL ILIsEqual(LPITEMIDLIST pidl1, LPITEMIDLIST pidl2);
  43. LPITEMIDLIST CloneIDL(LPCITEMIDLIST pidl);
  44. BOOL ILRemoveLastIDPRiv(LPITEMIDLIST pidl);
  45. HRESULT HrCloneRgIDL(
  46. LPCITEMIDLIST * rgpidl,
  47. ULONG cidl,
  48. LPITEMIDLIST ** ppidl,
  49. ULONG * pcidl);
  50. VOID FreeRgIDL(
  51. UINT cidl,
  52. LPITEMIDLIST * apidl);