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.

88 lines
2.2 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. _EXTENSION.H
  5. History:
  6. --*/
  7. #pragma once
  8. typedef UUID ExtensionID;
  9. typedef UUID OperationID;
  10. struct LTAPIENTRY LOCEXTENSIONMENU
  11. {
  12. LOCEXTENSIONMENU();
  13. CLString strMenuName; // Name of the Menu
  14. IID iidProcess; // IID for the process interface the
  15. // menu requires
  16. OperationID idOp; // Allows a single DLL to implement
  17. };
  18. typedef CArray<LOCEXTENSIONMENU, LOCEXTENSIONMENU &> CLocMenuArray;
  19. DECLARE_INTERFACE_(ILocExtension, IUnknown)
  20. {
  21. //
  22. // IUnknown standard Interface
  23. //
  24. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR*ppvObj) PURE;
  25. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  26. STDMETHOD_(ULONG, Release)(THIS) PURE;
  27. //
  28. // Standard Debugging interfaces
  29. //
  30. STDMETHOD_(void, AssertValidInterface)(THIS) CONST_METHOD PURE;
  31. //
  32. // ILocExtension methods
  33. //
  34. //
  35. // In Initialize, extension will...
  36. // Add any menus it needs to the array of menu obejcts
  37. // Register any options it has with Espresso
  38. // Ignore the IUnknown for now.
  39. STDMETHOD(Initialize)(IUnknown *) PURE;
  40. //
  41. // Since extensions may have state, we can't use QueryInterface.
  42. // This method has similar semantics, except that in most cases
  43. // we expect to get a new objects. Also, QI on a returned
  44. // object doesn't have to support ILocExtension.
  45. STDMETHOD(GetExtension)(const OperationID &, LPVOID FAR*ppvObj) PURE;
  46. //
  47. // In UnInitialize the extension will...
  48. // UnRegister any of its options.
  49. STDMETHOD(UnInitialize)(void) PURE;
  50. };
  51. struct __declspec(uuid("{9F9D180E-6F38-11d0-98FD-00C04FC2C6D8}"))
  52. ILocExtension;
  53. LTAPIENTRY void UUIDToString(const UUID &, CLString &);
  54. LTAPIENTRY void RegisterExtension(const ExtensionID &,
  55. const TCHAR *szDescription, HINSTANCE,
  56. const CLocMenuArray &);
  57. LTAPIENTRY void UnRegisterExtension(const ExtensionID &);
  58. LTAPIENTRY BOOL RegisterExtensionOptions(CLocUIOptionSet *);
  59. LTAPIENTRY void UnRegisterExtensionOptions(const TCHAR *szName);
  60. //
  61. // Extensions need to export the following function:
  62. // STDAPI GetExtension(ILocExtension *&);
  63. typedef HRESULT (STDAPICALLTYPE *PFNExtensionEntryPoint)(ILocExtension *&);