summaryrefslogtreecommitdiffstats
path: root/private/ole32/ih/rothint.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 /private/ole32/ih/rothint.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 'private/ole32/ih/rothint.hxx')
-rw-r--r--private/ole32/ih/rothint.hxx124
1 files changed, 124 insertions, 0 deletions
diff --git a/private/ole32/ih/rothint.hxx b/private/ole32/ih/rothint.hxx
new file mode 100644
index 000000000..6ce287b0d
--- /dev/null
+++ b/private/ole32/ih/rothint.hxx
@@ -0,0 +1,124 @@
+//+-------------------------------------------------------------------------
+//
+// Microsoft Windows
+// Copyright (C) Microsoft Corporation, 1992 - 1993.
+//
+// File: rothint.hxx
+//
+// Contents: Base class for ROT hint table used in NT
+//
+// History: 24-Jan-95 Ricksa Created
+//
+//--------------------------------------------------------------------------
+#ifndef __ROTHINT_HXX__
+#define __ROTHINT_HXX__
+
+// Size of the hint table and size of the SCM's hash table for the ROT.
+#define SCM_HASH_SIZE 251
+
+// Name of hint table for non-NT1X
+#define ROTHINT_NAME L"RotHintTable"
+
+#ifndef _CHICAGO_
+
+//+-------------------------------------------------------------------------
+//
+// Class: CRotHintTable (rht)
+//
+// Purpose: Base class for hint table shared between SCM and OLE32.
+// It is designed to abstract what is fundamental an array
+// of on/off switches.
+//
+// Interface: SetIndicator - set indicator byte
+// ClearIndicator - clear indicator byte
+// GetIndicator - get indicator byte.
+//
+// History: 24-Jan-93 Ricksa Created
+//
+// Notes:
+//
+//--------------------------------------------------------------------------
+class CRotHintTable
+{
+public:
+ CRotHintTable(void);
+
+ void SetIndicator(DWORD dwOffset);
+
+ void ClearIndicator(DWORD dwOffset);
+
+ BOOL GetIndicator(DWORD dwOffset);
+
+protected:
+
+ // This memory is allocated by the derived class.
+ // The SCM actually creates the memory while the
+ // client just opens the memory.
+ BYTE * _pbHintArray;
+};
+
+
+
+//+-------------------------------------------------------------------------
+//
+// Member: CRotHintTable::CRotHintTable
+//
+// Synopsis: Initialize object
+//
+// History: 24-Jan-95 Ricksa Created
+//
+//--------------------------------------------------------------------------
+inline CRotHintTable::CRotHintTable(void) : _pbHintArray(NULL)
+{
+ // Header does all the work
+}
+
+
+//+-------------------------------------------------------------------------
+//
+// Member: CRotHintTable::SetIndicator
+//
+// Synopsis: Turn switch on
+//
+// History: 24-Jan-95 Ricksa Created
+//
+//--------------------------------------------------------------------------
+inline void CRotHintTable::SetIndicator(DWORD dwOffset)
+{
+ _pbHintArray[dwOffset] = TRUE;
+}
+
+//+-------------------------------------------------------------------------
+//
+// Member: CRotHintTable::ClearIndicator
+//
+// Synopsis: Turn switch off
+//
+// History: 24-Jan-95 Ricksa Created
+//
+//--------------------------------------------------------------------------
+inline void CRotHintTable::ClearIndicator(DWORD dwOffset)
+{
+ _pbHintArray[dwOffset] = FALSE;
+}
+
+
+//+-------------------------------------------------------------------------
+//
+// Member: CRotHintTable::GetIndicator
+//
+// Synopsis: Get the state of the switch
+//
+// History: 24-Jan-95 Ricksa Created
+//
+//--------------------------------------------------------------------------
+inline BOOL CRotHintTable::GetIndicator(DWORD dwOffset)
+{
+ return _pbHintArray[dwOffset];
+}
+
+
+
+#endif // !_CHICAGO_
+
+#endif // __ROTHINT_HXX__