Leaked source code of windows server 2003
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.

65 lines
3.1 KiB

  1. #ifndef _IDHIDDEN_H_
  2. #define _IDHIDDEN_H_
  3. //
  4. // internal APIs for adding Hidden IDs to pidls
  5. // we use this to add data that we dont want
  6. // to be noticed by normal namespace handlers
  7. //
  8. typedef enum
  9. {
  10. IDLHID_EMPTY = 0xBEEF0000, // where's the BEEF?!
  11. IDLHID_URLFRAGMENT, // Fragment IDs on URLs (#anchors)
  12. IDLHID_URLQUERY, // Query strings on URLs (?query+info)
  13. IDLHID_JUNCTION, // Junction point data
  14. IDLHID_IDFOLDEREX, // IDFOLDEREX, extended data for CFSFolder
  15. IDLHID_DOCFINDDATA, // DocFind's private attached data (not persisted)
  16. IDLHID_PERSONALIZED, // personalized like (My Docs/Zeke's Docs)
  17. IDLHID_recycle2, // recycle
  18. IDLHID_RECYCLEBINDATA, // RecycleBin private data (not persisted)
  19. IDLHID_RECYCLEBINORIGINAL, // the original unthunked path for RecycleBin items
  20. IDLHID_PARENTFOLDER, // merged folder uses this to encode the source folder.
  21. IDLHID_STARTPANEDATA, // Start Pane's private attached data
  22. IDLHID_NAVIGATEMARKER // Used by Control Panel's 'Category view'
  23. };
  24. typedef DWORD IDLHID;
  25. #pragma pack(1)
  26. typedef struct _HIDDENITEMID
  27. {
  28. WORD cb; // hidden item size
  29. WORD wVersion;
  30. IDLHID id; // hidden item ID
  31. } HIDDENITEMID;
  32. #pragma pack()
  33. typedef HIDDENITEMID UNALIGNED *PIDHIDDEN;
  34. typedef const HIDDENITEMID UNALIGNED *PCIDHIDDEN;
  35. STDAPI_(LPITEMIDLIST) ILAppendHiddenID(LPITEMIDLIST pidl, PCIDHIDDEN pidhid);
  36. STDAPI ILCloneWithHiddenID(LPCITEMIDLIST pidl, PCIDHIDDEN pidhid, LPITEMIDLIST *ppidl);
  37. STDAPI_(PCIDHIDDEN) ILFindHiddenIDOn(LPCITEMIDLIST pidl, IDLHID id, BOOL fOnLast);
  38. #define ILFindHiddenID(p, i) ILFindHiddenIDOn((p), (i), TRUE)
  39. STDAPI_(BOOL) ILRemoveHiddenID(LPITEMIDLIST pidl, IDLHID id);
  40. STDAPI_(void) ILExpungeRemovedHiddenIDs(LPITEMIDLIST pidl);
  41. STDAPI_(LPITEMIDLIST) ILCreateWithHidden(UINT cbNonHidden, UINT cbHidden);
  42. // helpers for common data types.
  43. STDAPI_(LPITEMIDLIST) ILAppendHiddenClsid(LPITEMIDLIST pidl, IDLHID id, CLSID *pclsid);
  44. STDAPI_(BOOL) ILGetHiddenClsid(LPCITEMIDLIST pidl, IDLHID id, CLSID *pclsid);
  45. STDAPI_(LPITEMIDLIST) ILAppendHiddenStringW(LPITEMIDLIST pidl, IDLHID id, LPCWSTR psz);
  46. STDAPI_(LPITEMIDLIST) ILAppendHiddenStringA(LPITEMIDLIST pidl, IDLHID id, LPCSTR psz);
  47. STDAPI_(BOOL) ILGetHiddenStringW(LPCITEMIDLIST pidl, IDLHID id, LPWSTR psz, DWORD cch);
  48. STDAPI_(BOOL) ILGetHiddenStringA(LPCITEMIDLIST pidl, IDLHID id, LPSTR psz, DWORD cch);
  49. STDAPI_(int) ILCompareHiddenString(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, IDLHID id);
  50. #ifdef UNICODE
  51. #define ILAppendHiddenString ILAppendHiddenStringW
  52. #define ILGetHiddenString ILGetHiddenStringW
  53. #else //!UNICODE
  54. #define ILAppendHiddenString ILAppendHiddenStringA
  55. #define ILGetHiddenString ILGetHiddenStringA
  56. #endif //UNICODE
  57. #endif // _IDHIDDEN_H_