[WDF] Add Windows Driver Framework files
[reactos.git] / sdk / lib / drivers / wdf / shared / support / fxdevicetext.cpp
diff --git a/sdk/lib/drivers/wdf/shared/support/fxdevicetext.cpp b/sdk/lib/drivers/wdf/shared/support/fxdevicetext.cpp
new file mode 100644 (file)
index 0000000..86902a5
--- /dev/null
@@ -0,0 +1,52 @@
+/*++
+
+Copyright (c) Microsoft Corporation
+
+Module Name:
+
+    FxDeviceText.cpp
+
+Abstract:
+
+    This module implements the device text object.
+
+Author:
+
+
+
+Environment:
+
+    Both kernel and user mode
+
+Revision History:
+
+--*/
+
+#include "FxSupportPch.hpp"
+
+FxDeviceText::FxDeviceText(
+    VOID
+    ) :
+    m_Description(NULL),
+    m_LocationInformation(NULL),
+    m_LocaleId(0)
+{
+    m_Entry.Next = NULL;
+}
+
+FxDeviceText::~FxDeviceText()
+{
+    ASSERT(Mx::MxGetCurrentIrql() == PASSIVE_LEVEL);
+
+    ASSERT(m_Entry.Next == NULL);
+
+    if (m_Description != NULL) {
+        FxPoolFree(m_Description);
+        m_Description = NULL;
+    }
+
+    if (m_LocationInformation != NULL) {
+        FxPoolFree(m_LocationInformation);
+        m_LocationInformation = NULL;
+    }
+}