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.

86 lines
2.4 KiB

  1. /**************************************************************************
  2. THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  3. ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  4. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  5. PARTICULAR PURPOSE.
  6. Copyright 1998 Microsoft Corporation. All Rights Reserved.
  7. **************************************************************************/
  8. /**************************************************************************
  9. File: PidlMgr.h
  10. Description: CPidlMgr definitions.
  11. **************************************************************************/
  12. #ifndef PIDLMGR_H
  13. #define PIDLMGR_H
  14. #include <windows.h>
  15. #include <shlobj.h>
  16. /**************************************************************************
  17. data types
  18. **************************************************************************/
  19. #define MAX_NAME MAX_PATH
  20. #define MAX_DATA 128
  21. typedef struct tagPIDLDATA
  22. {
  23. BOOL fFolder;
  24. TCHAR szName[MAX_NAME];
  25. TCHAR szData[MAX_DATA];
  26. TCHAR szUrl[MAX_DATA];
  27. int iIcon;
  28. }PIDLDATA, FAR *LPPIDLDATA;
  29. typedef enum tagPIDLDATATYPE
  30. {
  31. FOLDER = 0x1,
  32. NAME = 0x2,
  33. DATA = 0x4,
  34. ICON = 0x8,
  35. URL = 0x10
  36. } PIDLDATATYPE;
  37. /**************************************************************************
  38. CPidlMgr class definition
  39. **************************************************************************/
  40. class CPidlMgr
  41. {
  42. public:
  43. CPidlMgr();
  44. ~CPidlMgr();
  45. VOID Delete(LPITEMIDLIST);
  46. LPITEMIDLIST GetNextItem(LPCITEMIDLIST);
  47. LPITEMIDLIST Copy(LPCITEMIDLIST);
  48. LPITEMIDLIST CopySingleItem(LPCITEMIDLIST);
  49. LPITEMIDLIST GetLastItem(LPCITEMIDLIST);
  50. LPITEMIDLIST Concatenate(LPCITEMIDLIST, LPCITEMIDLIST);
  51. LPITEMIDLIST Create(VOID);
  52. LPITEMIDLIST CreateFolderPidl(LPCTSTR);
  53. LPITEMIDLIST CreateItemPidl(LPCTSTR, LPCTSTR);
  54. LPITEMIDLIST SetDataPidl(LPITEMIDLIST, LPPIDLDATA , PIDLDATATYPE);
  55. int GetName(LPCITEMIDLIST, LPTSTR, DWORD);
  56. int GetRelativeName(LPCITEMIDLIST, LPTSTR, DWORD);
  57. int GetData(LPCITEMIDLIST, LPTSTR, DWORD);
  58. BOOL IsFolder(LPCITEMIDLIST);
  59. int SetData(LPCITEMIDLIST, LPCTSTR);
  60. UINT GetSize(LPCITEMIDLIST);
  61. int GetIcon(LPCITEMIDLIST);
  62. int GetUrl(LPCITEMIDLIST, LPTSTR, DWORD);
  63. private:
  64. LPMALLOC m_pMalloc;
  65. LPPIDLDATA GetDataPointer(LPCITEMIDLIST);
  66. };
  67. #endif //PIDLMGR_H