1 /*++ 2 3 Copyright (c) Microsoft Corporation 4 5 Module Name: 6 7 FxDeviceText.hpp 8 9 Abstract: 10 11 This module implements the device text object. 12 13 Author: 14 15 16 17 Environment: 18 19 Both kernel and user mode 20 21 Revision History: 22 23 --*/ 24 25 #ifndef _FXDEVICETEXT_H_ 26 #define _FXDEVICETEXT_H_ 27 28 struct FxDeviceText : public FxStump { 29 SINGLE_LIST_ENTRY m_Entry; 30 PWCHAR m_Description; 31 PWCHAR m_LocationInformation; 32 LCID m_LocaleId; 33 34 FxDeviceText( 35 VOID 36 ); 37 38 ~FxDeviceText( 39 VOID 40 ); 41 42 static 43 FxDeviceText* 44 _FromEntry( 45 __in PSINGLE_LIST_ENTRY Entry 46 ) 47 { 48 return CONTAINING_RECORD(Entry, FxDeviceText, m_Entry); 49 } 50 51 static 52 void 53 _CleanupList( 54 __inout PSINGLE_LIST_ENTRY Head 55 ) 56 { 57 PSINGLE_LIST_ENTRY ple; 58 59 ple = Head->Next; 60 61 if (ple != NULL) { 62 FxDeviceText* pText; 63 64 pText = FxDeviceText::_FromEntry(ple); 65 ple = ple->Next; 66 67 // 68 // Destructor verifies the entry is not on any list 69 // 70 pText->m_Entry.Next = NULL; 71 delete pText; 72 } 73 74 Head->Next = NULL; 75 } 76 77 VOID 78 operator delete( 79 __in PVOID Pool 80 ) 81 { 82 FxPoolFree(Pool); 83 } 84 }; 85 86 #endif // _FXDEVICETEXT_H_ 87