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.

167 lines
3.9 KiB

  1. /*
  2. * N O N I M P L . H
  3. *
  4. * Base classes for COM interfaces with no functionality except IUnknown.
  5. *
  6. * Copyright 1986-1997 Microsoft Corporation, All Rights Reserved
  7. */
  8. #ifndef _NONIMPL_H_
  9. #define _NONIMPL_H_
  10. #include <exo.h>
  11. #include <ocidl.h> // For IPersistStreamInit
  12. #include <caldbg.h>
  13. // Non-Implemented IStream ---------------------------------------------------
  14. //
  15. class CStreamNonImpl : public EXO, public IStream
  16. {
  17. public:
  18. EXO_INCLASS_DECL(CStreamNonImpl);
  19. CStreamNonImpl() {}
  20. ~CStreamNonImpl() {}
  21. virtual /* [local] */ HRESULT STDMETHODCALLTYPE Read(
  22. /* [length_is][size_is][out] */ void __RPC_FAR *,
  23. /* [in] */ ULONG,
  24. /* [out] */ ULONG __RPC_FAR *)
  25. {
  26. TrapSz ("CStreanNonImpl::Read() called");
  27. return E_NOTIMPL;
  28. }
  29. virtual /* [local] */ HRESULT STDMETHODCALLTYPE Write(
  30. /* [size_is][in] */ const void __RPC_FAR *,
  31. /* [in] */ ULONG,
  32. /* [out] */ ULONG __RPC_FAR *)
  33. {
  34. TrapSz ("CStreanNonImpl::Write() called");
  35. return E_NOTIMPL;
  36. }
  37. virtual /* [local] */ HRESULT STDMETHODCALLTYPE Seek(
  38. /* [in] */ LARGE_INTEGER,
  39. /* [in] */ DWORD,
  40. /* [out] */ ULARGE_INTEGER __RPC_FAR *)
  41. {
  42. TrapSz ("CStreanNonImpl::Seek() called");
  43. return E_NOTIMPL;
  44. }
  45. virtual HRESULT STDMETHODCALLTYPE SetSize(
  46. /* [in] */ ULARGE_INTEGER)
  47. {
  48. TrapSz ("CStreanNonImpl::SetSize() called");
  49. return E_NOTIMPL;
  50. }
  51. virtual /* [local] */ HRESULT STDMETHODCALLTYPE CopyTo(
  52. /* [unique][in] */ IStream __RPC_FAR *,
  53. /* [in] */ ULARGE_INTEGER,
  54. /* [out] */ ULARGE_INTEGER __RPC_FAR *,
  55. /* [out] */ ULARGE_INTEGER __RPC_FAR *)
  56. {
  57. TrapSz ("CStreanNonImpl::CopyTo() called");
  58. return E_NOTIMPL;
  59. }
  60. virtual HRESULT STDMETHODCALLTYPE Commit(
  61. /* [in] */ DWORD)
  62. {
  63. TrapSz ("CStreanNonImbdpl::Commit() called");
  64. return E_NOTIMPL;
  65. }
  66. virtual HRESULT STDMETHODCALLTYPE Revert( void)
  67. {
  68. TrapSz ("CStreanNonImpl::Revert() called");
  69. return E_NOTIMPL;
  70. }
  71. virtual HRESULT STDMETHODCALLTYPE LockRegion(
  72. /* [in] */ ULARGE_INTEGER,
  73. /* [in] */ ULARGE_INTEGER,
  74. /* [in] */ DWORD)
  75. {
  76. TrapSz ("CStreanNonImpl::LockRegion() called");
  77. return E_NOTIMPL;
  78. }
  79. virtual HRESULT STDMETHODCALLTYPE UnlockRegion(
  80. /* [in] */ ULARGE_INTEGER,
  81. /* [in] */ ULARGE_INTEGER,
  82. /* [in] */ DWORD)
  83. {
  84. TrapSz ("CStreanNonImpl::UnlockRegion() called");
  85. return E_NOTIMPL;
  86. }
  87. virtual HRESULT STDMETHODCALLTYPE Stat(
  88. /* [out] */ STATSTG __RPC_FAR *,
  89. /* [in] */ DWORD)
  90. {
  91. TrapSz ("CStreanNonImpl::Stat() called");
  92. return E_NOTIMPL;
  93. }
  94. virtual HRESULT STDMETHODCALLTYPE Clone(
  95. /* [out] */ IStream __RPC_FAR *__RPC_FAR *)
  96. {
  97. TrapSz ("CStreanNonImpl::Clone() called");
  98. return E_NOTIMPL;
  99. }
  100. };
  101. // Non-Implemented IPersistStreamInit ----------------------------------------
  102. //
  103. class CPersistStreamInitNonImpl: public EXO, public IPersistStreamInit
  104. {
  105. public:
  106. EXO_INCLASS_DECL(CPersistStreamInitNonImpl);
  107. virtual HRESULT STDMETHODCALLTYPE GetClassID(
  108. /* [out] */ CLSID __RPC_FAR *)
  109. {
  110. TrapSz ("CPersistStreamInitNonImpl::GetClassID() called");
  111. return E_NOTIMPL;
  112. }
  113. virtual HRESULT STDMETHODCALLTYPE IsDirty( void)
  114. {
  115. TrapSz ("CPersistStreamInitNonImpl::IsDirty() called");
  116. return E_NOTIMPL;
  117. }
  118. virtual HRESULT STDMETHODCALLTYPE Load(
  119. /* [unique][in] */ IStream __RPC_FAR *)
  120. {
  121. TrapSz ("CPersistStreamInitNonImpl::Load() called");
  122. return E_NOTIMPL;
  123. }
  124. virtual HRESULT STDMETHODCALLTYPE Save(
  125. /* [unique][in] */ IStream __RPC_FAR *,
  126. /* [in] */ BOOL )
  127. {
  128. TrapSz ("CPersistStreamInitNonImpl::Save() called");
  129. return E_NOTIMPL;
  130. }
  131. virtual HRESULT STDMETHODCALLTYPE GetSizeMax(
  132. /* [out] */ ULARGE_INTEGER __RPC_FAR *)
  133. {
  134. TrapSz ("CPersistStreamInitNonImpl::GetSizeMax() called");
  135. return E_NOTIMPL;
  136. }
  137. virtual HRESULT STDMETHODCALLTYPE InitNew()
  138. {
  139. TrapSz ("CPersistStreamInitNonImpl::InitNew() called");
  140. return E_NOTIMPL;
  141. }
  142. };
  143. #endif // _NONIMPL_H_