diff options
author | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
---|---|---|
committer | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
commit | e611b132f9b8abe35b362e5870b74bce94a1e58e (patch) | |
tree | a5781d2ec0e085eeca33cf350cf878f2efea6fe5 /public/sdk/inc/stgvarb.hxx | |
download | NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2 NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip |
Diffstat (limited to '')
-rw-r--r-- | public/sdk/inc/stgvarb.hxx | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/public/sdk/inc/stgvarb.hxx b/public/sdk/inc/stgvarb.hxx new file mode 100644 index 000000000..d737fce4f --- /dev/null +++ b/public/sdk/inc/stgvarb.hxx @@ -0,0 +1,95 @@ +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1992 - 1992. +// +// File: StgVarB.hxx - Storage Variant Base Class +// +// Contents: C++ Base wrapper for PROPVARIANT. +// +// History: 01-Aug-94 KyleP Created +// +//-------------------------------------------------------------------------- + +#if !defined(__STGVARB_HXX__) +#define __STGVARB_HXX__ + +class PSerStream; +class PDeSerStream; + +class PMemoryAllocator +{ +public: + virtual void *Allocate(ULONG cbSize) = 0; + virtual void Free(void *pv) = 0; +}; + + +#if defined(OFSDBG) || defined(CIDBG) +#define DBGPROP (OFSDBG || DBG || CIDBG) +#else +#define DBGPROP DBG +#endif + +#if DBGPROP +#if !defined(_NTDLLBUILD_) +#define ENABLE_DISPLAY_VARIANT +#endif +#endif + +#if defined(_NTDLLBUILD_) && defined(_CAIRO_) +#define OLDSUMCATAPI +#endif + +#if !defined(_NTDLLBUILD_) || defined(OLDSUMCATAPI) +#define ENABLE_MARSHAL_VARIANT +#endif + + +//+------------------------------------------------------------------------- +// +// Class: CBaseStorageVariant +// +// Purpose: C++ wrapper for PROPVARIANT +// +// History: 01-Aug-94 KyleP Created +// +// Notes: Only contains a static method to unmarshal from a stream. +// +//-------------------------------------------------------------------------- + +class CBaseStorageVariant: public /* VC 5 fix - Was "protected" */ tagPROPVARIANT +{ +#if defined(OLDSUMCATAPI) + friend void MarshallVariant(PSerStream &stm, PROPVARIANT &var); +#endif + +public: + CBaseStorageVariant() {} + CBaseStorageVariant(PROPVARIANT& var): tagPROPVARIANT(var) {} + +#ifdef KERNEL + static NTSTATUS UnmarshalledSize( PDeSerStream &stm, ULONG & cb ); +#endif + + static NTSTATUS Unmarshall( + PDeSerStream &stm, + PROPVARIANT &sv, + PMemoryAllocator &ma); + +#ifdef ENABLE_MARSHAL_VARIANT + void Marshall(PSerStream& stm) const; +#endif + +#ifdef ENABLE_DISPLAY_VARIANT + VOID DisplayVariant(ULONG ulLevel, USHORT CodePage) const; +#endif +}; + + +#if defined(OLDSUMCATAPI) +extern void MarshallVariant(PSerStream &stm, PROPVARIANT &var); +#endif + + +#endif // __STGVARB_HXX__ |