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.

72 lines
3.8 KiB

  1. LPITEMIDLIST ILGetNext(LPCITEMIDLIST pidl);
  2. UINT ILGetSize(LPCITEMIDLIST pidl);
  3. LPITEMIDLIST ILCreate(void);
  4. LPITEMIDLIST ILCreateFromPath(LPCSTR szPath);
  5. BOOL ILGetDisplayName(LPCITEMIDLIST pidl, LPSTR pszName);
  6. LPITEMIDLIST ILFindLastID(LPCITEMIDLIST pidl);
  7. BOOL ILRemoveLastID(LPITEMIDLIST pidl);
  8. LPITEMIDLIST ILClone(LPCITEMIDLIST pidl);
  9. LPITEMIDLIST ILCloneFirst(LPCITEMIDLIST pidl);
  10. BOOL ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
  11. BOOL ILIsEqualItemID(LPCSHITEMID pmkid1, LPCSHITEMID pmkid2);
  12. BOOL ILIsParent(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, BOOL fImmediate);
  13. LPITEMIDLIST ILFindChild(LPCITEMIDLIST pidlParent, LPCITEMIDLIST pidlChild);
  14. LPITEMIDLIST ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2);
  15. LPITEMIDLIST ILCreateFromPath(LPCTSTR szPath);
  16. // LPITEMIDLIST ILAppendID(LPITEMIDLIST pidl, LPCSHITEMID pmkid, BOOL fAppend);
  17. STDAPI ILLoadFromStream(IStream *pstm, LPITEMIDLIST *pidl);
  18. STDAPI ILSaveToStream(IStream *pstm, LPCITEMIDLIST pidl);
  19. // helper macros
  20. #define ILIsEmpty(pidl) ((pidl)->mkid.cb == 0)
  21. #define ILCreateFromID(pmkid) ILAppendID(NULL, pmkid, TRUE)
  22. // unsafe macros
  23. #define _ILSkip(pidl, cb) ((LPITEMIDLIST)(((BYTE*)(pidl))+cb))
  24. #define _ILNext(pidl) _ILSkip(pidl, (pidl)->mkid.cb)
  25. #ifdef _HIDA
  26. typedef HGLOBAL HIDA;
  27. HIDA HIDA_Create(LPCITEMIDLIST pidlFolder, UINT cidl, LPCITEMIDLIST *apidl);
  28. void HIDA_Free(HIDA hida);
  29. HIDA HIDA_Clone(HIDA hida);
  30. UINT HIDA_GetCount(HIDA hida);
  31. UINT HIDA_GetIDList(HIDA hida, UINT i, LPITEMIDLIST pidlOut, UINT cbMax);
  32. LPCITEMIDLIST HIDA_GetIDListPtr(HIDA hida, UINT i);
  33. LPITEMIDLIST HIDA_ILClone(HIDA hida, UINT i);
  34. LPITEMIDLIST IDA_ILClone(LPIDA pida, UINT i);
  35. LPITEMIDLIST HIDA_FillIDList(HIDA hida, UINT i, LPITEMIDLIST pidl);
  36. #define HIDA_Free(HIDA hida) GlobalFree(hida)
  37. #endif _HIDA
  38. #define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0]))
  39. #define SHAnsiToUnicode(psz, pwsz, cchwsz) MultiByteToWideChar(CP_ACP, 0, psz, -1, pwsz, cchwsz);
  40. #define SHUnicodeToAnsi(pwsz, psz, cchsz) WideCharToMultiByte(CP_ACP, 0, pwsz, -1, psz, cchsz, NULL, NULL);
  41. #ifdef UNICODE
  42. #define SHTCharToUnicode(wzSrc, wzDest, cchSize) SHUnicodeToUnicode(wzSrc, wzDest, cchSize)
  43. #define SHTCharToUnicodeCP(uiCP, wzSrc, wzDest, cchSize) SHUnicodeToUnicode(wzSrc, wzDest, cchSize)
  44. #define SHTCharToAnsi(wzSrc, szDest, cchSize) SHUnicodeToAnsi(wzSrc, szDest, cchSize)
  45. #define SHTCharToAnsiCP(uiCP, wzSrc, szDest, cchSize) SHUnicodeToAnsiCP(uiCP, wzSrc, szDest, cchSize)
  46. #define SHUnicodeToTChar(wzSrc, wzDest, cchSize) SHUnicodeToUnicode(wzSrc, wzDest, cchSize)
  47. #define SHUnicodeToTCharCP(uiCP, wzSrc, wzDest, cchSize) SHUnicodeToUnicode(wzSrc, wzDest, cchSize)
  48. #define SHAnsiToTChar(szSrc, wzDest, cchSize) SHAnsiToUnicode(szSrc, wzDest, cchSize)
  49. #define SHAnsiToTCharCP(uiCP, szSrc, wzDest, cchSize) SHAnsiToUnicodeCP(uiCP, szSrc, wzDest, cchSize)
  50. #else // UNICODE
  51. #define SHTCharToUnicode(szSrc, wzDest, cchSize) SHAnsiToUnicode(szSrc, wzDest, cchSize)
  52. #define SHTCharToUnicodeCP(uiCP, szSrc, wzDest, cchSize) SHAnsiToUnicodeCP(uiCP, szSrc, wzDest, cchSize)
  53. #define SHTCharToAnsi(szSrc, szDest, cchSize) SHAnsiToAnsi(szSrc, szDest, cchSize)
  54. #define SHTCharToAnsiCP(uiCP, szSrc, szDest, cchSize) SHAnsiToAnsi(szSrc, szDest, cchSize)
  55. #define SHUnicodeToTChar(wzSrc, szDest, cchSize) SHUnicodeToAnsi(wzSrc, szDest, cchSize)
  56. #define SHUnicodeToTCharCP(uiCP, wzSrc, szDest, cchSize) SHUnicodeToAnsiCP(uiCP, wzSrc, szDest, cchSize)
  57. #define SHAnsiToTChar(szSrc, szDest, cchSize) SHAnsiToAnsi(szSrc, szDest, cchSize)
  58. #define SHAnsiToTCharCP(uiCP, szSrc, szDest, cchSize) SHAnsiToAnsi(szSrc, szDest, cchSize)
  59. #endif // UNICODE