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.

136 lines
6.2 KiB

  1. EXTERN_C const SHCOLUMNID SCID_Author;
  2. EXTERN_C const SHCOLUMNID SCID_Title;
  3. EXTERN_C const SHCOLUMNID SCID_Subject;
  4. EXTERN_C const SHCOLUMNID SCID_Category;
  5. EXTERN_C const SHCOLUMNID SCID_Copyright;
  6. EXTERN_C const SHCOLUMNID SCID_CompanyName;
  7. EXTERN_C const SHCOLUMNID SCID_PageCount;
  8. EXTERN_C const SHCOLUMNID SCID_Comment;
  9. EXTERN_C const SHCOLUMNID SCID_DocCreated;
  10. EXTERN_C const SHCOLUMNID SCID_TYPE;
  11. EXTERN_C const SHCOLUMNID SCID_WRITETIME;
  12. EXTERN_C const SHCOLUMNID SCID_CREATETIME;
  13. EXTERN_C const SHCOLUMNID SCID_ACCESSTIME;
  14. EXTERN_C const SHCOLUMNID SCID_OWNER;
  15. EXTERN_C const SHCOLUMNID SCID_NAME;
  16. EXTERN_C const SHCOLUMNID SCID_DELETEDFROM;
  17. EXTERN_C const SHCOLUMNID SCID_DATEDELETED;
  18. EXTERN_C const SHCOLUMNID SCID_SIZE;
  19. EXTERN_C const SHCOLUMNID SCID_SYNCCOPYIN;
  20. EXTERN_C const SHCOLUMNID SCID_STATUS;
  21. EXTERN_C const SHCOLUMNID SCID_DIRECTORY;
  22. EXTERN_C const SHCOLUMNID SCID_RANK;
  23. EXTERN_C const SHCOLUMNID SCID_FREESPACE;
  24. EXTERN_C const SHCOLUMNID SCID_CAPACITY;
  25. EXTERN_C const SHCOLUMNID SCID_FILESYSTEM;
  26. EXTERN_C const SHCOLUMNID SCID_CSC_STATUS;
  27. EXTERN_C const SHCOLUMNID SCID_LINKTARGET;
  28. EXTERN_C const SHCOLUMNID SCID_LASTVISITED;
  29. EXTERN_C const SHCOLUMNID SCID_LASTMODIFIED;
  30. EXTERN_C const SHCOLUMNID SCID_VISITCOUNT;
  31. EXTERN_C const SHCOLUMNID SCID_ATTRIBUTES;
  32. EXTERN_C const SHCOLUMNID SCID_ATTRIBUTES_DESCRIPTION;
  33. EXTERN_C const SHCOLUMNID SCID_LOCATION;
  34. EXTERN_C const SHCOLUMNID SCID_FINDDATA;
  35. EXTERN_C const SHCOLUMNID SCID_NETRESOURCE;
  36. EXTERN_C const SHCOLUMNID SCID_DESCRIPTIONID;
  37. EXTERN_C const SHCOLUMNID SCID_WHICHFOLDER;
  38. EXTERN_C const SHCOLUMNID SCID_NETWORKLOCATION;
  39. EXTERN_C const SHCOLUMNID SCID_COMPUTERNAME;
  40. EXTERN_C const SHCOLUMNID SCID_DetailsProperties;
  41. EXTERN_C const SHCOLUMNID SCID_FolderIntroText;
  42. EXTERN_C const SHCOLUMNID SCID_CONTROLPANELCATEGORY;
  43. EXTERN_C const SHCOLUMNID SCID_MUSIC_Artist;
  44. EXTERN_C const SHCOLUMNID SCID_MUSIC_Album;
  45. EXTERN_C const SHCOLUMNID SCID_MUSIC_Year;
  46. EXTERN_C const SHCOLUMNID SCID_MUSIC_Track;
  47. EXTERN_C const SHCOLUMNID SCID_MUSIC_Genre;
  48. EXTERN_C const SHCOLUMNID SCID_AUDIO_Duration;
  49. EXTERN_C const SHCOLUMNID SCID_AUDIO_Bitrate;
  50. EXTERN_C const SHCOLUMNID SCID_ImageCX;
  51. EXTERN_C const SHCOLUMNID SCID_ImageCY;
  52. EXTERN_C const SHCOLUMNID SCID_ImageDimensions;
  53. EXTERN_C const SHCOLUMNID SCID_CameraModel;
  54. EXTERN_C const SHCOLUMNID SCID_WhenTaken;
  55. EXTERN_C const SHCOLUMNID SCID_Flash;
  56. EXTERN_C const SHCOLUMNID SCID_ColorSpace;
  57. EXTERN_C const SHCOLUMNID SCID_DRM_Protected;
  58. // Printer Folder column identifier defs...
  59. EXTERN_C const SHCOLUMNID SCID_PRN_QUEUESIZE;
  60. EXTERN_C const SHCOLUMNID SCID_PRN_STATUS;
  61. EXTERN_C const SHCOLUMNID SCID_PRN_LOCATION;
  62. EXTERN_C const SHCOLUMNID SCID_PRN_MODEL;
  63. // Win32 PE (exe, dll) Version Information column identifier defs...
  64. EXTERN_C const SHCOLUMNID SCID_FileDescription;
  65. EXTERN_C const SHCOLUMNID SCID_FileVersion;
  66. EXTERN_C const SHCOLUMNID SCID_InternalName;
  67. EXTERN_C const SHCOLUMNID SCID_OriginalFileName;
  68. EXTERN_C const SHCOLUMNID SCID_ProductName;
  69. EXTERN_C const SHCOLUMNID SCID_ProductVersion;
  70. typedef struct {
  71. const SHCOLUMNID *pscid;
  72. VARTYPE vt; // Note that the type of a given FMTID/PID pair is a known, fixed value
  73. DWORD fmt; // listview format (LVCFMT_LEFT, usually)
  74. UINT cChars; // count of chars (default col width)
  75. DWORD csFlags; // SHCOLSTATE flags
  76. UINT idTitle; // string id for title
  77. UINT idDescription; // add these, make defview display them too!
  78. } COLUMN_INFO;
  79. #define DEFINE_COL_ENTRY(scid, vt, fmt, cChars, shcs, ids) \
  80. { &scid, vt, fmt, cChars, shcs, ids, 0 }
  81. #define DEFINE_COL_STR_ENTRY(scid, cChars, ids) \
  82. { &scid, VT_LPWSTR, LVCFMT_LEFT, cChars, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, ids, 0 }
  83. #define DEFINE_COL_STR_MENU_ENTRY(scid, cChars, ids) \
  84. { &scid, VT_LPWSTR, LVCFMT_LEFT, cChars, SHCOLSTATE_TYPE_STR, ids, 0 }
  85. #define DEFINE_COL_STR_DLG_ENTRY(scid, cChars, ids) \
  86. { &scid, VT_LPWSTR, LVCFMT_LEFT, cChars, SHCOLSTATE_TYPE_STR | SHCOLSTATE_SECONDARYUI, ids, 0 }
  87. #define DEFINE_COL_STR_HIDDEN_ENTRY(scid) \
  88. { &scid, VT_LPWSTR, LVCFMT_LEFT, 20, SHCOLSTATE_TYPE_STR | SHCOLSTATE_HIDDEN, 0, 0 }
  89. #define DEFINE_COL_DATE_ENTRY(scid, ids) \
  90. { &scid, VT_DATE, LVCFMT_LEFT, 20, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, ids, 0 }
  91. #define DEFINE_COL_DATE_HIDDEN_ENTRY(scid) \
  92. { &scid, VT_DATE, LVCFMT_LEFT, 20, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_HIDDEN, 0, 0 }
  93. #define DEFINE_COL_INT_ENTRY(scid, cChars, ids) \
  94. { &scid, VT_I4, LVCFMT_LEFT, cChars, SHCOLSTATE_TYPE_INT | SHCOLSTATE_ONBYDEFAULT, ids, 0 }
  95. #define DEFINE_COL_INT_DLG_ENTRY(scid, cChars, ids) \
  96. { &scid, VT_I4, LVCFMT_LEFT, cChars, SHCOLSTATE_TYPE_INT | SHCOLSTATE_SECONDARYUI, ids, 0 }
  97. #define DEFINE_COL_INT_HIDDEN_ENTRY(scid) \
  98. { &scid, VT_I4, LVCFMT_LEFT, 5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_HIDDEN, 0, 0 }
  99. #define DEFINE_COL_SIZE_ENTRY(scid, ids) \
  100. DEFINE_COL_ENTRY(scid, VT_UI8, LVCFMT_RIGHT, 16, SHCOLSTATE_TYPE_INT | SHCOLSTATE_ONBYDEFAULT, ids)
  101. STDAPI GetDetailsOfInfo(const COLUMN_INFO* pcol_data, UINT nCols, UINT iColumn, SHELLDETAILS *pdi);
  102. STDAPI_(int) FindSCID(const COLUMN_INFO* pcol_data, UINT nCols, const SHCOLUMNID* pscid);
  103. STDAPI MapColumnToSCIDImpl(const COLUMN_INFO* pcol_data, UINT nCols, UINT iColumn, SHCOLUMNID* pscid);
  104. STDAPI_(BOOL) ParseSCIDString(LPCTSTR pszString, SHCOLUMNID *pscid, UINT *pidRes);
  105. STDAPI SCIDCannonicalName(SHCOLUMNID *pscid, LPTSTR pszName, int cch);
  106. HRESULT PropVariantToVariant(const PROPVARIANT *pPropVar, VARIANT *pVar);
  107. #define CompareSCIDFMTIDPID(fmtid, pid, scid) ((pid == (scid).pid) && IsEqualIID(fmtid, (scid).fmtid))
  108. #define DEFINE_SCID(name, fmtid, pid) const SHCOLUMNID name = { fmtid, pid }
  109. //
  110. // Constants used while converting a SCID to a string
  111. //
  112. #define SCID_PIDSTR_MAX 10 // will take care of any long integer value
  113. #define SCIDSTR_MAX (GUIDSTR_MAX + 1 + SCID_PIDSTR_MAX)
  114. STDAPI_(int) StringFromSCID(const SHCOLUMNID *pscid, LPTSTR lpsz, UINT cch);
  115. STDAPI SHFormatForDisplay(REFFMTID fmtid, PROPID pid, const PROPVARIANT *pPropVar,
  116. PROPERTYUI_FORMAT_FLAGS flags, LPWSTR pwszText, DWORD cchText);