#include <ntddk.h>
#include <classpnp.h>
-#define DICTIONARY_SIGNATURE (((ULONG)'dict' << 32) + 'sig ')
+#define DICTIONARY_SIGNATURE 'dsig'
-struct _DICTIONARY_HEADER {
+typedef struct _DICTIONARY_HEADER {
struct _DICTIONARY_HEADER* Next;
ULONGLONG Key;
UCHAR Data[0];
-};
+} DICTIONARY_HEADER, *PDICTIONARY_HEADER;
-struct _DICTIONARY_HEADER;
-typedef struct _DICTIONARY_HEADER DICTIONARY_HEADER, *PDICTIONARY_HEADER;
-\f
VOID
InitializeDictionary(
IN PDICTIONARY Dictionary
)
{
- RtlZeroMemory(Dictionary, sizeof(Dictionary));
+ RtlZeroMemory(Dictionary, sizeof(DICTIONARY));
Dictionary->Signature = DICTIONARY_SIGNATURE;
KeInitializeSpinLock(&Dictionary->SpinLock);
return;
}
-\f
+
BOOLEAN
TestDictionarySignature(
IN PDICTIONARY Dictionary
return status;
}
-\f
+
PVOID
GetDictionaryEntry(
IN PDICTIONARY Dictionary,
return data;
}
-\f
+
VOID
FreeDictionaryEntry(
IN PDICTIONARY Dictionary,