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.

97 lines
2.4 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 2000
  6. //
  7. // File: ShellExtensions.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef __SHELLEXTENSIONS_H
  11. #define __SHELLEXTENSIONS_H
  12. #define LI_WIN95 0x00000001
  13. #define LI_NT4 0x00000002
  14. #define LI_WIN98 0x00000004
  15. #define LS_MAGIC 0x07036745
  16. void InitLayerStorage(BOOL bDelete);
  17. void CheckForRights(void);
  18. //
  19. // LayeredItemOperation flags
  20. //
  21. #define LIO_READITEM 1
  22. #define LIO_ADDITEM 2
  23. #define LIO_DELETEITEM 3
  24. #ifndef ARRAYSIZE
  25. #define ARRAYSIZE(rg) (sizeof(rg)/sizeof((rg)[0]))
  26. #endif
  27. typedef struct tagLayerStorageHeader {
  28. DWORD dwItemCount; // number of items in the file
  29. DWORD dwMagic; // magic to identify the file
  30. SYSTEMTIME timeLast; // time of last access
  31. } LayerStorageHeader, *PLayerStorageHeader;
  32. typedef struct tagLayeredItem {
  33. WCHAR szItemName[MAX_PATH];
  34. DWORD dwFlags;
  35. } LayeredItem, *PLayeredItem;
  36. class CLayerUIPropPage:
  37. protected IShellExtInit,
  38. IShellPropSheetExt,
  39. public CComObjectRoot,
  40. public CComCoClass<CLayerUIPropPage, &CLSID_ShimLayerPropertyPage>
  41. {
  42. BEGIN_COM_MAP(CLayerUIPropPage)
  43. COM_INTERFACE_ENTRY(IShellExtInit)
  44. COM_INTERFACE_ENTRY(IShellPropSheetExt)
  45. END_COM_MAP()
  46. public:
  47. DECLARE_REGISTRY_CLSID()
  48. CLayerUIPropPage();
  49. ~CLayerUIPropPage();
  50. //
  51. // IShellExtInit methods
  52. //
  53. STDMETHODIMP Initialize(LPCITEMIDLIST pIDFolder,
  54. LPDATAOBJECT pDataObj,
  55. HKEY hKeyID);
  56. //
  57. // IShellPropSheetExt methods
  58. //
  59. STDMETHODIMP AddPages(LPFNADDPROPSHEETPAGE lpfnAddPage,
  60. LPARAM lParam);
  61. STDMETHODIMP ReplacePage(UINT uPageID,
  62. LPFNADDPROPSHEETPAGE lpfnReplacePage,
  63. LPARAM lParam);
  64. friend INT_PTR CALLBACK
  65. LayerPageDlgProc(HWND hdlg,
  66. UINT uMsg,
  67. WPARAM wParam,
  68. LPARAM lParam);
  69. private:
  70. CComPtr<IDataObject> m_spDataObj;
  71. TCHAR m_szFile[MAX_PATH];
  72. };
  73. #endif // __SHELLEXTENSIONS_H