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.

92 lines
2.2 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. typedef struct tagLayerStorageHeader {
  25. DWORD dwItemCount; // number of items in the file
  26. DWORD dwMagic; // magic to identify the file
  27. SYSTEMTIME timeLast; // time of last access
  28. } LayerStorageHeader, *PLayerStorageHeader;
  29. typedef struct tagLayeredItem {
  30. WCHAR szItemName[MAX_PATH];
  31. DWORD dwFlags;
  32. } LayeredItem, *PLayeredItem;
  33. class CLayerUIPropPage:
  34. IShellExtInit,
  35. IShellPropSheetExt,
  36. public CComObjectRoot,
  37. public CComCoClass<CLayerUIPropPage, &CLSID_ShimLayerPropertyPage>
  38. {
  39. BEGIN_COM_MAP(CLayerUIPropPage)
  40. COM_INTERFACE_ENTRY(IShellExtInit)
  41. COM_INTERFACE_ENTRY(IShellPropSheetExt)
  42. END_COM_MAP()
  43. public:
  44. DECLARE_REGISTRY_CLSID()
  45. CLayerUIPropPage();
  46. ~CLayerUIPropPage();
  47. //
  48. // IShellExtInit methods
  49. //
  50. STDMETHODIMP Initialize(LPCITEMIDLIST pIDFolder,
  51. LPDATAOBJECT pDataObj,
  52. HKEY hKeyID);
  53. //
  54. // IShellPropSheetExt methods
  55. //
  56. STDMETHODIMP AddPages(LPFNADDPROPSHEETPAGE lpfnAddPage,
  57. LPARAM lParam);
  58. STDMETHODIMP ReplacePage(UINT uPageID,
  59. LPFNADDPROPSHEETPAGE lpfnReplacePage,
  60. LPARAM lParam);
  61. friend INT_PTR CALLBACK
  62. LayerPageDlgProc(HWND hdlg,
  63. UINT uMsg,
  64. WPARAM wParam,
  65. LPARAM lParam);
  66. private:
  67. CComPtr<IDataObject> m_spDataObj;
  68. TCHAR m_szFile[MAX_PATH];
  69. };
  70. #endif // __SHELLEXTENSIONS_H