Source code of Windows XP (NT5)
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.

63 lines
1.5 KiB

  1. /******************************************************************************
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. Serializer.cpp
  5. Abstract:
  6. This file contains the implementation of some Serializer interfaces,
  7. allowing to use the FileSystem or the HTTP channel in a similar way.
  8. Revision History:
  9. Davide Massarenti (Dmassare) 04/20/99
  10. created
  11. ******************************************************************************/
  12. #include "stdafx.h"
  13. #include "Serializer.h"
  14. //////////////////////////////////////////////////////////////////////
  15. // Construction/Destruction
  16. //////////////////////////////////////////////////////////////////////
  17. MPCSerializerHttp::MPCSerializerHttp( /*[in]*/ MPCHttpContext* context )
  18. {
  19. __ULT_FUNC_ENTRY( "MPCSerializerHttp::MPCSerializerHttp" );
  20. m_context = context;
  21. }
  22. //////////////////////////////////////////////////////////////////////
  23. // Methods.
  24. //////////////////////////////////////////////////////////////////////
  25. HRESULT MPCSerializerHttp::read( /*[in]*/ void* pBuf ,
  26. /*[in]*/ DWORD dwLen ,
  27. /*[out]*/ DWORD* pdwRead )
  28. {
  29. __ULT_FUNC_ENTRY("MPCSerializerHttp::read");
  30. HRESULT hr = m_context->Read( pBuf, dwLen );
  31. if(pdwRead) *pdwRead = dwLen;
  32. __ULT_FUNC_EXIT(hr);
  33. }
  34. HRESULT MPCSerializerHttp::write( /*[in]*/ const void* pBuf ,
  35. /*[in]*/ DWORD dwLen )
  36. {
  37. __ULT_FUNC_ENTRY("MPCSerializerHttp::write");
  38. HRESULT hr = m_context->Write( pBuf, dwLen );
  39. __ULT_FUNC_EXIT(hr);
  40. }