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.

80 lines
1.7 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995 - 1995.
  5. //
  6. // File: ext.hxx
  7. //
  8. // Contents: CNetObj class definition to handle network object context menu
  9. // and property sheet shell extensions.
  10. //
  11. // History: 25-Sep-95 BruceFo Created
  12. //
  13. //--------------------------------------------------------------------------
  14. #ifndef _EXT_HXX_
  15. #define _EXT_HXX_
  16. #define MAX_ONE_RESOURCE 2048
  17. class CNetObj
  18. : public IShellExtInit,
  19. public IShellPropSheetExt
  20. {
  21. DECLARE_SIG;
  22. friend class CPage;
  23. public:
  24. CNetObj();
  25. ~CNetObj();
  26. //
  27. // IUnknown methods
  28. //
  29. STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppvObj);
  30. STDMETHOD_(ULONG,AddRef)();
  31. STDMETHOD_(ULONG,Release)();
  32. //
  33. // IShellExtInit methods
  34. //
  35. STDMETHOD(Initialize)(
  36. LPCITEMIDLIST pidlFolder,
  37. LPDATAOBJECT pDataObject,
  38. HKEY hkeyProgID);
  39. //
  40. // IShellPropSheetExt methods
  41. //
  42. STDMETHOD(AddPages)(
  43. LPFNADDPROPSHEETPAGE lpfnAddPage,
  44. LPARAM lParam);
  45. STDMETHOD(ReplacePage)(
  46. UINT uPageID,
  47. LPFNADDPROPSHEETPAGE lpfnReplaceWith,
  48. LPARAM lParam);
  49. private:
  50. BOOL
  51. FillAndAddPage(
  52. LPFNADDPROPSHEETPAGE lpfnAddPage,
  53. LPARAM lParam,
  54. DLGPROC pfnDlg,
  55. LPTSTR pszTemplate
  56. );
  57. ULONG _uRefs; // OLE reference count
  58. LPDATAOBJECT _pDataObject;
  59. HKEY _hkeyProgID; // reg. database key to ProgID
  60. BYTE _bufNetResource[MAX_ONE_RESOURCE];
  61. };
  62. #endif // _EXT_HXX_