opmext.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. //
  2. //////////////////////////////////////////////////////////////////////////////
  3. //
  4. // Copyright 2015 Autodesk, Inc. All rights reserved.
  5. //
  6. // Use of this software is subject to the terms of the Autodesk license
  7. // agreement provided at the time of installation or download, or which
  8. // otherwise accompanies this software in either electronic or hard copy form.
  9. //
  10. //////////////////////////////////////////////////////////////////////////////
  11. //
  12. #ifndef _OPMEXT_H
  13. #define _OPMEXT_H
  14. #pragma pack (push, 8)
  15. typedef struct tagOPMLPOLESTR
  16. {
  17. ULONG cElems;
  18. /* [size_is] */ LPOLESTR __RPC_FAR *pElems;
  19. } OPMLPOLESTR;
  20. typedef struct tagOPMLPOLESTR __RPC_FAR *LPOPMLPOLESTR;
  21. typedef struct tagOPMDWORD
  22. {
  23. ULONG cElems;
  24. /* [size_is] */ DWORD __RPC_FAR *pElems;
  25. } OPMDWORD;
  26. typedef struct tagOPMDWORD __RPC_FAR *LPOPMDWORD;
  27. // {1236EAA4-7715-11d1-A2DA-0060B06B2D46}
  28. DEFINE_GUID(IID_IOPMPropertyExtension,
  29. 0x1236eaa4, 0x7715, 0x11d1, 0xa2, 0xda, 0x0, 0x60, 0xb0, 0x6b, 0x2d, 0x46);
  30. interface DECLSPEC_UUID("1236EAA4-7715-11d1-A2DA-0060B06B2D46") IOPMPropertyExtension : public IUnknown
  31. {
  32. /* IUnknown methods */
  33. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  34. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  35. STDMETHOD_(ULONG, Release)(THIS) PURE;
  36. //Implement this function to override the name of the property
  37. virtual HRESULT STDMETHODCALLTYPE GetDisplayName(
  38. /* [in] */ DISPID dispID,
  39. /* [out] */ BSTR * propName) = 0;
  40. //Override to make property read-only
  41. virtual HRESULT STDMETHODCALLTYPE Editable(
  42. /* [in] */ DISPID dispID,
  43. /* [out] */ BOOL __RPC_FAR *bEditable) = 0;
  44. //Override to hide the property from display
  45. virtual HRESULT STDMETHODCALLTYPE ShowProperty(
  46. /* [in] */ DISPID dispID,
  47. /* [out] */ BOOL *pShow) = 0;
  48. };
  49. // {5D535710-D49A-11d1-B616-0060B087E235}
  50. DEFINE_GUID(IID_IOPMPropertyExpander,
  51. 0x5d535710, 0xd49a, 0x11d1, 0xb6, 0x16, 0x0, 0x60, 0xb0, 0x87, 0xe2, 0x35);
  52. interface DECLSPEC_UUID("5D535710-D49A-11d1-B616-0060B087E235") IOPMPropertyExpander : public IUnknown
  53. {
  54. /* IUnknown methods */
  55. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  56. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  57. STDMETHOD_(ULONG, Release)(THIS) PURE;
  58. //Used for property expansion (currently variant types)
  59. virtual HRESULT STDMETHODCALLTYPE GetElementValue(
  60. /* [in] */ DISPID dispID,
  61. /* [in] */ DWORD dwCookie,
  62. /* [out] */ VARIANT * pVarOut) = 0;
  63. //Used for property expansion (currently variant types)
  64. virtual HRESULT STDMETHODCALLTYPE SetElementValue(
  65. /* [in] */ DISPID dispID,
  66. /* [in] */ DWORD dwCookie,
  67. /* [in] */ VARIANT VarIn) = 0;
  68. //Used for property expansion (currently variant types)
  69. virtual HRESULT STDMETHODCALLTYPE GetElementStrings(
  70. /* [in] */ DISPID dispID,
  71. /* [out] */ OPMLPOLESTR __RPC_FAR *pCaStringsOut,
  72. /* [out] */ OPMDWORD __RPC_FAR *pCaCookiesOut) = 0;
  73. //Used for property expansion (currently variant types)
  74. virtual HRESULT STDMETHODCALLTYPE GetElementGrouping(
  75. /* [in] */ DISPID dispID,
  76. /* [out] */ short *groupingNumber) = 0;
  77. //Used for property expansion (currently variant types)
  78. virtual HRESULT STDMETHODCALLTYPE GetGroupCount(
  79. /* [in] */ DISPID dispID,
  80. /* [out] */ long *nGroupCnt) = 0;
  81. };
  82. // {D0F45FEB-71D5-44ea-B1A0-6E2F27B2085D}
  83. DEFINE_GUID(IID_IOPMPropertyExpander2,
  84. 0xd0f45feb, 0x71d5, 0x44ea, 0xb1, 0xa0, 0x6e, 0x2f, 0x27, 0xb2, 0x8, 0x5d);
  85. interface DECLSPEC_UUID("d0f45feb-71d5-44ea-B1A0-6E2F27B2085D") IOPMPropertyExpander2 : public IUnknown
  86. {
  87. /* IUnknown methods */
  88. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  89. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  90. STDMETHOD_(ULONG, Release)(THIS) PURE;
  91. //Used for property expansion (currently variant types)
  92. virtual HRESULT STDMETHODCALLTYPE GetElementValue(
  93. /* [in] */ DISPID dispID,
  94. /* [in] */ IUnknown * pUnk,
  95. /* [in] */ DWORD dwCookie,
  96. /* [out] */ VARIANT * pVarOut) = 0;
  97. //Used for property expansion (currently variant types)
  98. virtual HRESULT STDMETHODCALLTYPE SetElementValue(
  99. /* [in] */ DISPID dispID,
  100. /* [in] */ IUnknown * pUnk,
  101. /* [in] */ DWORD dwCookie,
  102. /* [in] */ VARIANT VarIn) = 0;
  103. //Used for property expansion (currently variant types)
  104. virtual HRESULT STDMETHODCALLTYPE GetElementStrings(
  105. /* [in] */ DISPID dispID,
  106. /* [in] */ IUnknown * pUnk,
  107. /* [out] */ OPMLPOLESTR __RPC_FAR *pCaStringsOut,
  108. /* [out] */ OPMDWORD __RPC_FAR *pCaCookiesOut) = 0;
  109. //Used for property expansion (currently variant types)
  110. virtual HRESULT STDMETHODCALLTYPE GetElementGrouping(
  111. /* [in] */ DISPID dispID,
  112. /* [in] */ IUnknown * pUnk,
  113. /* [out] */ short *groupingNumber) = 0;
  114. //Used for property expansion (currently variant types)
  115. virtual HRESULT STDMETHODCALLTYPE GetGroupCount(
  116. /* [in] */ DISPID dispID,
  117. /* [in] */ IUnknown * pUnk,
  118. /* [out] */ long *nGroupCnt) = 0;
  119. };
  120. // {4197114D-3CC4-413b-8AA3-7C7A05B62D3F}
  121. DEFINE_GUID(IID_IOPMPropertyExpanderExpression,
  122. 0x4197114d, 0x3cc4, 0x413b, 0x8a, 0xa3, 0x7c, 0x7a, 0x5, 0xb6, 0x2d, 0x3f);
  123. interface DECLSPEC_UUID("4197114D-3CC4-413b-8AA3-7C7A05B62D3F") IOPMPropertyExpanderExpression : public IUnknown
  124. {
  125. /* IUnknown methods */
  126. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  127. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
  128. STDMETHOD_(ULONG, Release)(THIS) PURE;
  129. virtual HRESULT STDMETHODCALLTYPE ExpressionAllowed(
  130. /* [in] */ DISPID dispID,
  131. /* [in] */ IUnknown * pUnk,
  132. /* [in] */ DWORD dwCookie,
  133. /* [out] */ BOOL* pAllowed) = 0;
  134. virtual HRESULT STDMETHODCALLTYPE put_Expression(
  135. /* [in] */ DISPID dispID,
  136. /* [in] */ IUnknown * pUnk,
  137. /* [in] */ DWORD dwCookie,
  138. /* [in] */ BSTR expression) = 0;
  139. virtual HRESULT STDMETHODCALLTYPE get_Expression(
  140. /* [in] */ DISPID dispID,
  141. /* [in] */ IUnknown * pUnk,
  142. /* [in] */ DWORD dwCookie,
  143. /* [out] */ BSTR* expression) = 0;
  144. };
  145. #pragma pack (pop)
  146. #endif /* _OPMEXT_H */