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.

81 lines
1.8 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1992.
  5. //
  6. // File: MemDeSer.hxx
  7. //
  8. // History: 29-Jul-94 KyleP Created
  9. //
  10. //--------------------------------------------------------------------------
  11. #if !defined( __MEMDESER_HXX__ )
  12. #define __MEMDESER_HXX__
  13. #include <restrict.hxx>
  14. #include <SStream.hxx>
  15. class CMemDeSerStream : public PDeSerStream
  16. {
  17. public:
  18. inline CMemDeSerStream( BYTE *pb, ULONG cb);
  19. virtual ~CMemDeSerStream() {};
  20. virtual BYTE GetByte();
  21. virtual void SkipByte();
  22. virtual void GetChar( char * pc, ULONG cc );
  23. virtual void SkipChar( ULONG cc );
  24. virtual void GetWChar( WCHAR * pwc, ULONG cc );
  25. virtual void SkipWChar( ULONG cc );
  26. virtual USHORT GetUShort();
  27. virtual void SkipUShort();
  28. virtual ULONG GetULong();
  29. virtual void SkipULong();
  30. virtual ULONG PeekULong();
  31. virtual long GetLong();
  32. virtual void SkipLong();
  33. #if defined(KERNEL) // Can not return floating point #'s in the kernel
  34. virtual ULONG GetFloat();
  35. virtual LONGLONG GetDouble();
  36. #else
  37. virtual float GetFloat();
  38. virtual double GetDouble();
  39. #endif
  40. virtual void SkipFloat();
  41. virtual void SkipDouble();
  42. virtual char * GetString();
  43. virtual WCHAR * GetWString();
  44. virtual void GetBlob( BYTE * pb, ULONG cb );
  45. virtual void SkipBlob( ULONG cb );
  46. virtual void GetGUID( GUID & guid );
  47. virtual void SkipGUID();
  48. protected:
  49. BYTE * _pbCurrent;
  50. BYTE * _pbEnd;
  51. };
  52. inline CMemDeSerStream::CMemDeSerStream( BYTE * pb, ULONG cb )
  53. : _pbCurrent( pb )
  54. {
  55. _pbEnd = _pbCurrent + cb;
  56. }
  57. #endif // __MEMDESER_HXX__