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.

110 lines
3.9 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000-2003 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ResourceObject.h
  7. //
  8. // Description:
  9. // Interface for the CResourceObject class.
  10. //
  11. // Maintained By:
  12. // Ozan Ozhan (OzanO) 27-MAR-2002
  13. // Geoff Pease (GPease) 08-FEB-2000
  14. //
  15. //////////////////////////////////////////////////////////////////////////////
  16. #pragma once
  17. class CResourceObject :
  18. public IDispatchEx
  19. {
  20. private:
  21. LONG m_cRef;
  22. RESOURCE_HANDLE m_hResource;
  23. PLOG_EVENT_ROUTINE m_pler;
  24. HKEY m_hkey;
  25. LPCWSTR m_pszName; // DON'T FREE
  26. private:
  27. STDMETHOD(LogInformation)( BSTR bstrIn );
  28. STDMETHOD(ReadPrivateProperty)( DISPID idIn, VARIANT * pvarResOut );
  29. STDMETHOD(WritePrivateProperty)( DISPID idIn, DISPPARAMS * pdpIn );
  30. STDMETHOD(AddPrivateProperty)( DISPPARAMS * pdpIn );
  31. STDMETHOD(RemovePrivateProperty)( DISPPARAMS * pdpIn );
  32. STDMETHOD(PrivatePropertyExists)( DISPPARAMS * pdpIn );
  33. STDMETHOD(LogError)( HRESULT hrIn );
  34. public:
  35. explicit CResourceObject( RESOURCE_HANDLE hResourceIn,
  36. PLOG_EVENT_ROUTINE plerIn,
  37. HKEY hkeyIn,
  38. LPCWSTR pszNameIn
  39. );
  40. virtual ~CResourceObject();
  41. // IUnknown
  42. STDMETHOD( QueryInterface )(
  43. REFIID riid,
  44. void ** ppUnk );
  45. STDMETHOD_(ULONG, AddRef )( );
  46. STDMETHOD_(ULONG, Release )( );
  47. // IDispatch
  48. STDMETHOD( GetTypeInfoCount )(
  49. /* [out] */ UINT __RPC_FAR *pctinfo );
  50. STDMETHOD( GetTypeInfo )(
  51. /* [in] */ UINT iTInfo,
  52. /* [in] */ LCID lcid,
  53. /* [out] */ ITypeInfo __RPC_FAR *__RPC_FAR *ppTInfo );
  54. STDMETHOD( GetIDsOfNames )(
  55. /* [in] */ REFIID riid,
  56. /* [size_is][in] */ LPOLESTR __RPC_FAR *rgszNames,
  57. /* [in] */ UINT cNames,
  58. /* [in] */ LCID lcid,
  59. /* [size_is][out] */ DISPID __RPC_FAR *rgDispId );
  60. STDMETHOD( Invoke )(
  61. /* [in] */ DISPID dispIdMember,
  62. /* [in] */ REFIID riid,
  63. /* [in] */ LCID lcid,
  64. /* [in] */ WORD wFlags,
  65. /* [out][in] */ DISPPARAMS __RPC_FAR *pDispParams,
  66. /* [out] */ VARIANT __RPC_FAR *pVarResult,
  67. /* [out] */ EXCEPINFO __RPC_FAR *pExcepInfo,
  68. /* [out] */ UINT __RPC_FAR *puArgErr );
  69. // IDispatchEx
  70. STDMETHOD( GetDispID )(
  71. /* [in] */ BSTR bstrName,
  72. /* [in] */ DWORD grfdex,
  73. /* [out] */ DISPID __RPC_FAR *pid );
  74. STDMETHOD( InvokeEx )(
  75. /* [in] */ DISPID id,
  76. /* [in] */ LCID lcid,
  77. /* [in] */ WORD wFlags,
  78. /* [in] */ DISPPARAMS __RPC_FAR *pdp,
  79. /* [out] */ VARIANT __RPC_FAR *pvarRes,
  80. /* [out] */ EXCEPINFO __RPC_FAR *pei,
  81. /* [unique][in] */ IServiceProvider __RPC_FAR *pspCaller );
  82. STDMETHOD( DeleteMemberByName )(
  83. /* [in] */ BSTR bstr,
  84. /* [in] */ DWORD grfdex );
  85. STDMETHOD( DeleteMemberByDispID )(
  86. /* [in] */ DISPID id );
  87. STDMETHOD( GetMemberProperties )(
  88. /* [in] */ DISPID id,
  89. /* [in] */ DWORD grfdexFetch,
  90. /* [out] */ DWORD __RPC_FAR *pgrfdex );
  91. STDMETHOD( GetMemberName )(
  92. /* [in] */ DISPID id,
  93. /* [out] */ BSTR __RPC_FAR *pbstrName );
  94. STDMETHOD( GetNextDispID )(
  95. /* [in] */ DWORD grfdex,
  96. /* [in] */ DISPID id,
  97. /* [out] */ DISPID __RPC_FAR *pid );
  98. STDMETHOD( GetNameSpaceParent )(
  99. /* [out] */ IUnknown __RPC_FAR *__RPC_FAR *ppunk );
  100. };