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.

277 lines
12 KiB

  1. #ifndef SHELL32_VIEWS_INC
  2. #define SHELL32_VIEWS_INC
  3. #include "idlcomm.h"
  4. #include "pidl.h"
  5. // Some constants for folder callbacks
  6. #define DEFVIEW_FVM_MANY_CUTOFF 50
  7. #define DEFVIEW_FVM_FEW_CUTOFF 25
  8. // VIEWCOMM.C
  9. STDAPI_(LPTSTR) SHGetCaption(HIDA hida);
  10. STDAPI SHPropertiesForPidl(HWND hwnd, LPCITEMIDLIST pidlFull, LPCTSTR lpParameters);
  11. // RUNDLL32.C
  12. STDAPI_(BOOL) SHRunDLLProcess(HWND hwnd, LPCTSTR pszCmdLine, int nCmdShow, UINT idStr, BOOL fRunAsNewUser);
  13. STDAPI_(BOOL) SHRunDLLThread(HWND hwnd, LPCTSTR pszCmdLine, int nCmdShow);
  14. // CPLOBJ.C
  15. STDAPI_(BOOL) SHRunControlPanelEx(LPCTSTR pszOrigCmdLine, HWND hwnd, BOOL fRunAsNewUser);
  16. // REGITMS.C
  17. typedef struct
  18. {
  19. const CLSID * pclsid;
  20. UINT uNameID;
  21. LPCTSTR pszIconFile;
  22. int iDefIcon;
  23. BYTE bOrder;
  24. DWORD dwAttributes;
  25. LPCTSTR pszCPL;
  26. } REQREGITEM;
  27. #define RIISA_ORIGINAL 0x00000001 // regitems first then rest (desktop)
  28. #define RIISA_FOLDERFIRST 0x00000002 // folders first then the rest (regitems or not)
  29. #define RIISA_ALPHABETICAL 0x00000004 // alphabetical (doesn't care about folder, regitems, ...)
  30. typedef struct
  31. {
  32. LPCTSTR pszAllow;
  33. RESTRICTIONS restAllow;
  34. LPCTSTR pszDisallow;
  35. RESTRICTIONS restDisallow;
  36. } REGITEMSPOLICY;
  37. typedef struct
  38. {
  39. LPCTSTR pszRegKey; // registry location for this name space
  40. REGITEMSPOLICY* pPolicy; // registry location to look for Restrict and Disallow info
  41. TCHAR cRegItem; // parsing prefix, must be TEXT(':')
  42. BYTE bFlags; // flags field for PIDL construction
  43. int iCmp; // compare multiplier used to revers the sort order
  44. DWORD rgfRegItems; // default attributes for items
  45. int iReqItems; // # of required items
  46. REQREGITEM const * pReqItems; // require items array
  47. DWORD dwSortAttrib; // sorting attributes
  48. LPCTSTR pszMachine; // optional remote machine to init items from (\\server)
  49. DWORD cbPadding; // Number of bytes of padding to put between IDREGITEMEX.bOrder and IDREGITEMEX.clsid
  50. BYTE bFlagsLegacy; // legacy "bFlags", so that we can handle previous bFlags (equiv of cbPadding = 0)
  51. // CANNOT be 0, 0 means no bFlagsLegacy
  52. } REGITEMSINFO;
  53. // class factory like entry to create the regitems folder. it only supports the agregatied case
  54. STDAPI CRegFolder_CreateInstance(REGITEMSINFO *pri, IUnknown *punkOutter, REFIID riid, void **ppv);
  55. STDAPI_(BOOL) RegGetsFirstShot(REFIID riid);
  56. // this should be private
  57. #pragma pack(1)
  58. typedef struct
  59. {
  60. IDREGITEM idri;
  61. USHORT cbNext;
  62. } IDLREGITEM; // "RegItem" IDList
  63. typedef UNALIGNED IDLREGITEM *LPIDLREGITEM;
  64. typedef const UNALIGNED IDLREGITEM *LPCIDLREGITEM;
  65. #pragma pack()
  66. EXTERN_C const IDLREGITEM c_idlNet;
  67. EXTERN_C const IDLREGITEM c_idlDrives;
  68. EXTERN_C const IDLREGITEM c_idlInetRoot;
  69. EXTERN_C const IDLREGITEM c_idlMyDocs;
  70. #define MAX_REGITEMCCH 128 // for rename in place operations
  71. //--------------------------------------------------------------------------
  72. // Menu offset-IDs for object context menu (CFSMenu)
  73. // They must be 0-based and not too big (<0x3ff)
  74. // We are lumping all of the DefView clients in here so that we are
  75. // sure the ID ranges are separate (making MenuHelp easier)
  76. //---------------------------------------------------------------------------
  77. #define FSIDM_OBJPROPS_FIRST 0x0000
  78. #define FSIDM_PROPERTIESBG (FSIDM_OBJPROPS_FIRST + 0x0000)
  79. // find extension commands
  80. #define FSIDM_FINDFILES 0x0004
  81. #define FSIDM_FINDCOMPUTER 0x0005
  82. #define FSIDM_SAVESEARCH 0x0006
  83. #define FSIDM_OPENCONTAININGFOLDER 0x0007
  84. #define FSIDM_DRIVES_FIRST 0x0008
  85. #define FSIDM_FORMAT (FSIDM_DRIVES_FIRST + 0x0000)
  86. #define FSIDM_DISCONNECT (FSIDM_DRIVES_FIRST + 0x0001)
  87. #define FSIDM_EJECT (FSIDM_DRIVES_FIRST + 0x0002)
  88. #define FSIDM_DISKCOPY (FSIDM_DRIVES_FIRST + 0x0003)
  89. #define FSIDM_DRIVES_LAST (FSIDM_DRIVES_FIRST + 0x0004)
  90. #define FSIDM_NETWORK_FIRST (FSIDM_DRIVES_LAST + 0x0000)
  91. #define FSIDM_CONNECT (FSIDM_NETWORK_FIRST + 0x0001)
  92. #define FSIDM_NETPRN_INSTALL (FSIDM_NETWORK_FIRST + 0x0002)
  93. #define FSIDM_CONNECT_PRN (FSIDM_NETWORK_FIRST + 0x0003)
  94. #define FSIDM_DISCONNECT_PRN (FSIDM_NETWORK_FIRST + 0x0004)
  95. #define FSIDM_NETWORK_LAST (FSIDM_NETWORK_FIRST + 0x0005)
  96. // Command offsets for context menu (verb ids must be mutually exclusive
  97. // from non-verb ids. Non-verb ids are first for easier menu merging.)
  98. // non-verb ids:
  99. #define FSIDM_CPLPRN_FIRST (FSIDM_NETWORK_LAST + 0x0000)
  100. #define FSIDM_SETDEFAULTPRN (FSIDM_CPLPRN_FIRST + 0x0001)
  101. #define FSIDM_SHARING (FSIDM_CPLPRN_FIRST + 0x0002)
  102. #define FSIDM_DOCUMENTDEFAULTS (FSIDM_CPLPRN_FIRST + 0x0003)
  103. #define FSIDM_SERVERPROPERTIES (FSIDM_CPLPRN_FIRST + 0x0004)
  104. #define FSIDM_ADDPRINTERWIZARD (FSIDM_CPLPRN_FIRST + 0x0005)
  105. #define FSIDM_SENDFAXWIZARD (FSIDM_CPLPRN_FIRST + 0x0006)
  106. #define FSIDM_SETUPFAXING (FSIDM_CPLPRN_FIRST + 0x0007)
  107. // verb ids:
  108. #define FSIDM_OPENPRN (FSIDM_CPLPRN_FIRST + 0x0008)
  109. #define FSIDM_RESUMEPRN (FSIDM_CPLPRN_FIRST + 0x0009)
  110. #define FSIDM_PAUSEPRN (FSIDM_CPLPRN_FIRST + 0x000a)
  111. #define FSIDM_WORKONLINE (FSIDM_CPLPRN_FIRST + 0x000b)
  112. #define FSIDM_WORKOFFLINE (FSIDM_CPLPRN_FIRST + 0x000c)
  113. #define FSIDM_PURGEPRN (FSIDM_CPLPRN_FIRST + 0x000d)
  114. #define FSIDM_CREATELOCALFAX (FSIDM_CPLPRN_FIRST + 0x000e)
  115. #define FSIDM_CPLPRN_LAST (FSIDM_CPLPRN_FIRST + 0x000e)
  116. #define FSIDM_RUNAS_FIRST (FSIDM_CPLPRN_LAST + 0x0000)
  117. #define FSIDM_RUNAS (FSIDM_RUNAS_FIRST + 0x0001)
  118. #define FSIDM_RUNAS_SHARING (FSIDM_RUNAS_FIRST + 0x0002)
  119. #define FSIDM_RUNAS_ADDPRN (FSIDM_RUNAS_FIRST + 0x0003)
  120. #define FSIDM_RUNAS_SVRPROP (FSIDM_RUNAS_FIRST + 0x0004)
  121. #define FSIDM_RUNAS_OPENPRN (FSIDM_RUNAS_FIRST + 0x0005)
  122. #define FSIDM_RUNAS_RESUMEPRN (FSIDM_RUNAS_FIRST + 0x0006)
  123. #define FSIDM_RUNAS_PAUSEPRN (FSIDM_RUNAS_FIRST + 0x0007)
  124. #define FSIDM_RUNAS_WORKONLINE (FSIDM_RUNAS_FIRST + 0x0008)
  125. #define FSIDM_RUNAS_WORKOFFLINE (FSIDM_RUNAS_FIRST + 0x0009)
  126. #define FSIDM_RUNAS_PURGEPRN (FSIDM_RUNAS_FIRST + 0x0010)
  127. #define FSIDM_RUNAS_DELETE (FSIDM_RUNAS_FIRST + 0x0011)
  128. #define FSIDM_RUNAS_PROPERTIES (FSIDM_RUNAS_FIRST + 0x0012)
  129. #define FSIDM_RUNAS_LAST (FSIDM_RUNAS_FIRST + 0x001f)
  130. // these need to be in the same order as the ICOL in fstreex.c (chee)
  131. #define FSIDM_SORT_FIRST (FSIDM_RUNAS_LAST + 0x0000)
  132. #define FSIDM_SORT_LAST (FSIDM_SORT_FIRST + 0x0010)
  133. #define FSIDM_MENUSENDTO_FIRST (FSIDM_SORT_LAST + 0x0000)
  134. #define FSIDM_MENU_SENDTO (FSIDM_MENUSENDTO_FIRST + 0x0001)
  135. #define FSIDM_SENDTOFIRST (FSIDM_MENUSENDTO_FIRST + 0x0002)
  136. #define FSIDM_SENDTOLAST (FSIDM_MENUSENDTO_FIRST + 0x0013)
  137. #define FSIDM_MENUSENDTO_LAST (FSIDM_MENUSENDTO_FIRST + 0x0014)
  138. #define FSIDM_MENUNEW_FIRST (FSIDM_MENUSENDTO_LAST + 0x0000)
  139. #define FSIDM_MENU_NEW (FSIDM_MENUNEW_FIRST + 0x0001)
  140. #define FSIDM_NEWFOLDER (FSIDM_MENUNEW_FIRST + 0x0002)
  141. #define FSIDM_NEWLINK (FSIDM_MENUNEW_FIRST + 0x0003)
  142. #define FSIDM_NEWOTHER (FSIDM_MENUNEW_FIRST + 0x0004)
  143. #define FSIDM_NEWLAST (FSIDM_MENUNEW_FIRST + 0x0027)
  144. #define FSIDM_MENUNEW_LAST (FSIDM_MENUNEW_FIRST + 0x0028)
  145. // BITBUCKET ids.
  146. #define FSIDM_BITBUCKET_FIRST (FSIDM_MENUNEW_LAST + 0x0000)
  147. #define FSIDM_RESTORE (FSIDM_BITBUCKET_FIRST + 0x0001)
  148. #define FSIDM_PURGE (FSIDM_BITBUCKET_FIRST + 0x0002)
  149. #define FSIDM_PURGEALL (FSIDM_BITBUCKET_FIRST + 0x0003)
  150. #define FSIDM_BITBUCKET_LAST (FSIDM_BITBUCKET_FIRST + 0x0004)
  151. // cd burn ids.
  152. #define FSIDM_BURN_FIRST (FSIDM_BITBUCKET_LAST + 0x0000)
  153. #define FSIDM_BURN (FSIDM_BURN_FIRST + 0x0001)
  154. #define FSIDM_CLEANUP (FSIDM_BURN_FIRST + 0x0002)
  155. #define FSIDM_ERASE (FSIDM_BURN_FIRST + 0x0003)
  156. #define FSIDM_BURN_LAST (FSIDM_BURN_FIRST + 0x0004)
  157. //---------------------------------------------------------------------------
  158. // Briefcase view specific command IDs
  159. //
  160. #define FSIDM_BRIEFCASE_FIRST (FSIDM_BURN_LAST + 0x0000)
  161. #define FSIDM_MENU_BRIEFCASE (FSIDM_BRIEFCASE_FIRST + 0x0001)
  162. #define FSIDM_UPDATEALL (FSIDM_BRIEFCASE_FIRST + 0x0002)
  163. #define FSIDM_UPDATESELECTION (FSIDM_BRIEFCASE_FIRST + 0x0003)
  164. #define FSIDM_SPLIT (FSIDM_BRIEFCASE_FIRST + 0x0004)
  165. #define FSIDM_BRIEFCASE_LAST (FSIDM_BRIEFCASE_FIRST + 0x00b0)
  166. //---------------------------------------------------------------------------
  167. // Items added by DefCM
  168. //
  169. // HACK: Put these at the same offsets from each other as the SFVIDM
  170. // commands so that we can easily reuse the help strings and the menu
  171. // initialization code
  172. //
  173. #define DCMIDM_LINK SHARED_FILE_LINK
  174. #define DCMIDM_DELETE SHARED_FILE_DELETE
  175. #define DCMIDM_RENAME SHARED_FILE_RENAME
  176. #define DCMIDM_PROPERTIES SHARED_FILE_PROPERTIES
  177. #define DCMIDM_CUT SHARED_EDIT_CUT
  178. #define DCMIDM_COPY SHARED_EDIT_COPY
  179. #define DCMIDM_PASTE SHARED_EDIT_PASTE
  180. //
  181. // Now for the MenuHelp ID's for the defview client menu commands
  182. //
  183. #define IDS_MH_PROPERTIESBG (IDS_MH_FSIDM_FIRST + FSIDM_PROPERTIESBG)
  184. #define IDS_MH_FORMAT (IDS_MH_FSIDM_FIRST + FSIDM_FORMAT)
  185. #define IDS_MH_DISCONNECT (IDS_MH_FSIDM_FIRST + FSIDM_DISCONNECT)
  186. #define IDS_MH_EJECT (IDS_MH_FSIDM_FIRST + FSIDM_EJECT)
  187. #define IDS_MH_DISKCOPY (IDS_MH_FSIDM_FIRST + FSIDM_DISKCOPY)
  188. #define IDS_MH_CONNECT (IDS_MH_FSIDM_FIRST + FSIDM_CONNECT)
  189. #define IDS_MH_NETPRN_INSTALL (IDS_MH_FSIDM_FIRST + FSIDM_NETPRN_INSTALL)
  190. #define IDS_MH_CONNECT_PRN (IDS_MH_FSIDM_FIRST + FSIDM_CONNECT_PRN)
  191. #define IDS_MH_DISCONNECT_PRN (IDS_MH_FSIDM_FIRST + FSIDM_DISCONNECT_PRN)
  192. #define IDS_MH_SETDEFAULTPRN (IDS_MH_FSIDM_FIRST + FSIDM_SETDEFAULTPRN)
  193. #define IDS_MH_SERVERPROPERTIES (IDS_MH_FSIDM_FIRST + FSIDM_SERVERPROPERTIES)
  194. #define IDS_MH_ADDPRINTERWIZARD (IDS_MH_FSIDM_FIRST + FSIDM_ADDPRINTERWIZARD)
  195. #define IDS_MH_SENDFAXWIZARD (IDS_MH_FSIDM_FIRST + FSIDM_SENDFAXWIZARD)
  196. #define IDS_MH_SHARING (IDS_MH_FSIDM_FIRST + FSIDM_SHARING)
  197. #define IDS_MH_DOCUMENTDEFAULTS (IDS_MH_FSIDM_FIRST + FSIDM_DOCUMENTDEFAULTS )
  198. #define IDS_MH_OPENPRN (IDS_MH_FSIDM_FIRST + FSIDM_OPENPRN)
  199. #define IDS_MH_RESUMEPRN (IDS_MH_FSIDM_FIRST + FSIDM_RESUMEPRN)
  200. #define IDS_MH_PAUSEPRN (IDS_MH_FSIDM_FIRST + FSIDM_PAUSEPRN)
  201. #define IDS_MH_WORKONLINE (IDS_MH_FSIDM_FIRST + FSIDM_WORKONLINE)
  202. #define IDS_MH_WORKOFFLINE (IDS_MH_FSIDM_FIRST + FSIDM_WORKOFFLINE)
  203. #define IDS_MH_PURGEPRN (IDS_MH_FSIDM_FIRST + FSIDM_PURGEPRN)
  204. #define IDS_MH_SETUPFAXING (IDS_MH_FSIDM_FIRST + FSIDM_SETUPFAXING)
  205. #define IDS_MH_CREATELOCALFAX (IDS_MH_FSIDM_FIRST + FSIDM_CREATELOCALFAX)
  206. #define IDS_MH_RUNAS (IDS_MH_FSIDM_FIRST + FSIDM_RUNAS)
  207. #define IDS_MH_MENU_SENDTO (IDS_MH_FSIDM_FIRST + FSIDM_MENU_SENDTO)
  208. #define IDS_MH_SENDTOFIRST (IDS_MH_FSIDM_FIRST + FSIDM_SENDTOFIRST)
  209. #define IDS_MH_SENDTOLAST (IDS_MH_FSIDM_FIRST + FSIDM_SENDTOLAST)
  210. #define IDS_MH_MENU_NEW (IDS_MH_FSIDM_FIRST + FSIDM_MENU_NEW)
  211. #define IDS_MH_NEWFOLDER (IDS_MH_FSIDM_FIRST + FSIDM_NEWFOLDER)
  212. #define IDS_MH_NEWLINK (IDS_MH_FSIDM_FIRST + FSIDM_NEWLINK)
  213. #define IDS_MH_NEWOTHER (IDS_MH_FSIDM_FIRST + FSIDM_NEWOTHER)
  214. #define IDS_MH_MENU_BRIEFCASE (IDS_MH_FSIDM_FIRST + FSIDM_MENU_BRIEFCASE)
  215. #define IDS_MH_UPDATEALL (IDS_MH_FSIDM_FIRST + FSIDM_UPDATEALL)
  216. #define IDS_MH_UPDATESELECTION (IDS_MH_FSIDM_FIRST + FSIDM_UPDATESELECTION)
  217. #define IDS_MH_SPLIT (IDS_MH_FSIDM_FIRST + FSIDM_SPLIT)
  218. // bitbucket menu help strings
  219. #define IDS_MH_RESTORE (IDS_MH_FSIDM_FIRST + FSIDM_RESTORE)
  220. #define IDS_MH_PURGE (IDS_MH_FSIDM_FIRST + FSIDM_PURGE)
  221. #define IDS_MH_PURGEALL (IDS_MH_FSIDM_FIRST + FSIDM_PURGEALL)
  222. // find extensions
  223. #define IDS_MH_FINDFILES (IDS_MH_FSIDM_FIRST + FSIDM_FINDFILES)
  224. #define IDS_MH_FINDCOMPUTER (IDS_MH_FSIDM_FIRST + FSIDM_FINDCOMPUTER)
  225. #define IDS_TT_UPDATEALL (IDS_TT_FSIDM_FIRST + FSIDM_UPDATEALL)
  226. #define IDS_TT_UPDATESELECTION (IDS_TT_FSIDM_FIRST + FSIDM_UPDATESELECTION)
  227. #endif