summaryrefslogtreecommitdiffstats
path: root/public/sdk/inc/stgvarb.hxx
diff options
context:
space:
mode:
authorAdam <you@example.com>2020-05-17 05:51:50 +0200
committerAdam <you@example.com>2020-05-17 05:51:50 +0200
commite611b132f9b8abe35b362e5870b74bce94a1e58e (patch)
treea5781d2ec0e085eeca33cf350cf878f2efea6fe5 /public/sdk/inc/stgvarb.hxx
downloadNT4.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 'public/sdk/inc/stgvarb.hxx')
-rw-r--r--public/sdk/inc/stgvarb.hxx95
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__