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.

83 lines
2.5 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // File: propsext.h
  4. //
  5. // General definition of OLE Entry points, CClassFactory and CPropSheetExt
  6. //
  7. // Common Code for all display property sheet extension
  8. //
  9. // Copyright (c) Microsoft Corp. 1992-1998 All Rights Reserved
  10. //
  11. //---------------------------------------------------------------------------
  12. #ifndef _COMMONPROPEXT_H
  13. #define _COMMONPROPEXT_H
  14. extern BOOL g_RunningOnNT;
  15. extern HINSTANCE g_hInst;
  16. extern LPDATAOBJECT g_lpdoTarget;
  17. // OLE-Registry magic number
  18. extern GUID g_CLSID_CplExt;
  19. // Someone made a spelling mistake
  20. #define PropertySheeDlgProc PropertySheetDlgProc
  21. INT_PTR CALLBACK PropertySheetDlgProc(HWND hDlg, UINT uMessage, WPARAM wParam, LPARAM lParam);
  22. UINT CALLBACK PropertySheetCallback(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp);
  23. //Type for an object-destroyed callback
  24. typedef void (FAR PASCAL *LPFNDESTROYED)(void);
  25. class CClassFactory : public IClassFactory
  26. {
  27. protected:
  28. ULONG m_cRef;
  29. public:
  30. CClassFactory();
  31. ~CClassFactory();
  32. //IUnknown members
  33. STDMETHODIMP QueryInterface( REFIID, LPVOID* );
  34. STDMETHODIMP_(ULONG) AddRef();
  35. STDMETHODIMP_(ULONG) Release();
  36. //IClassFactory members
  37. STDMETHODIMP CreateInstance( LPUNKNOWN, REFIID, LPVOID* );
  38. STDMETHODIMP LockServer( BOOL );
  39. };
  40. class CPropSheetExt : public IShellPropSheetExt, IShellExtInit
  41. {
  42. private:
  43. ULONG m_cRef;
  44. LPUNKNOWN m_pUnkOuter; //Controlling unknown
  45. LPFNDESTROYED m_pfnDestroy; //Function closure call
  46. public:
  47. CPropSheetExt( LPUNKNOWN pUnkOuter, LPFNDESTROYED pfnDestroy );
  48. ~CPropSheetExt(void);
  49. // IUnknown members
  50. STDMETHODIMP QueryInterface(REFIID, LPVOID*);
  51. STDMETHODIMP_(ULONG) AddRef(void);
  52. STDMETHODIMP_(ULONG) Release(void);
  53. // IShellExtInit methods
  54. STDMETHODIMP Initialize(LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj,
  55. HKEY hKeyID);
  56. //IShellPropSheetExt methods ***
  57. STDMETHODIMP AddPages( LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam );
  58. STDMETHODIMP ReplacePage(UINT uPageID, LPFNADDPROPSHEETPAGE lpfnReplaceWith,
  59. LPARAM lParam);
  60. };
  61. #endif // _COMMONPROPEXT_H