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.

77 lines
3.0 KiB

  1. //
  2. // SnapIn class
  3. //
  4. class CSnapIn:
  5. public IComponent,
  6. public IExtendPropertySheet
  7. {
  8. protected:
  9. ULONG m_cRef;
  10. LPCONSOLE m_pConsole; // Console's IFrame interface
  11. CComponentData *m_pcd;
  12. LPRESULTDATA m_pResult; // Result pane's interface
  13. LPHEADERCTRL m_pHeader; // Result pane's header control interface
  14. LPIMAGELIST m_pImageResult; // Result pane's image list interface
  15. LPCONSOLEVERB m_pConsoleVerb; // pointer the console verb
  16. WCHAR m_column1[20]; // Text for column 1
  17. INT m_nColumnSize; // Size of column 1
  18. LONG m_lViewMode; // View mode
  19. static unsigned int m_cfNodeType;
  20. static TCHAR m_szDefaultIcon[];
  21. public:
  22. CSnapIn(CComponentData *pComponent);
  23. ~CSnapIn();
  24. //
  25. // IUnknown methods
  26. //
  27. STDMETHODIMP QueryInterface(REFIID, LPVOID FAR *);
  28. STDMETHODIMP_(ULONG) AddRef();
  29. STDMETHODIMP_(ULONG) Release();
  30. //
  31. // Implemented IComponent methods
  32. //
  33. STDMETHODIMP Initialize(LPCONSOLE);
  34. STDMETHODIMP Destroy(long);
  35. STDMETHODIMP Notify(LPDATAOBJECT, MMC_NOTIFY_TYPE, long, long);
  36. STDMETHODIMP QueryDataObject(long, DATA_OBJECT_TYPES, LPDATAOBJECT *);
  37. STDMETHODIMP GetDisplayInfo(LPRESULTDATAITEM);
  38. STDMETHODIMP GetResultViewType(long, LPOLESTR*, long*);
  39. STDMETHODIMP CompareObjects(LPDATAOBJECT, LPDATAOBJECT);
  40. //
  41. // Implemented IExtendPropertySheet methods
  42. //
  43. STDMETHODIMP CreatePropertyPages(LPPROPERTYSHEETCALLBACK lpProvider,
  44. long handle, LPDATAOBJECT lpDataObject);
  45. STDMETHODIMP QueryPagesFor(LPDATAOBJECT lpDataObject);
  46. private:
  47. static BOOL CALLBACK UserGroupPolDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  48. static BOOL CALLBACK MachineGroupPolDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  49. static BOOL CALLBACK GroupPolDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam, BOOL bUser);
  50. static BOOL CALLBACK ReadmeDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  51. static BOOL CALLBACK NetHoodDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  52. static BOOL CALLBACK StartMenuDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  53. static BOOL AddEntry (HWND hLV, LPTSTR lpPlace, LPTSTR lpLocation);
  54. static BOOL InitializePlacesDlg (CSnapIn* pSnapIn, HWND hDlg);
  55. static BOOL SavePlaces (CSnapIn* pSnapIn, HWND hLV);
  56. static BOOL RemoveEntries (CSnapIn* pSnapIn, HWND hLV);
  57. static BOOL CALLBACK MyDocsDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  58. static BOOL CALLBACK AddPlaceDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  59. static BOOL CALLBACK MyDocsTargetDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  60. static BOOL CALLBACK AppearDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  61. };