summaryrefslogtreecommitdiffstats
path: root/private/unimodem/new/mic/dev.h
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/unimodem/new/mic/dev.h
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/unimodem/new/mic/dev.h')
-rw-r--r--private/unimodem/new/mic/dev.h136
1 files changed, 136 insertions, 0 deletions
diff --git a/private/unimodem/new/mic/dev.h b/private/unimodem/new/mic/dev.h
new file mode 100644
index 000000000..695571f35
--- /dev/null
+++ b/private/unimodem/new/mic/dev.h
@@ -0,0 +1,136 @@
+//
+// Copyright (c) 1996 Microsoft Corporation
+//
+//
+// DEV.H -- Header for Classes:
+// CInfDevice
+//
+//
+// History:
+// 05/22/96 JosephJ Created
+//
+//
+
+
+class CInfDevice;
+
+
+///////////////////////////////////////////////////////////////////////////
+// CLASS CInfDevice
+///////////////////////////////////////////////////////////////////////////
+//
+// Represents a single device, as specified by an inf (device information)
+// file.
+//
+
+class CInfDevice
+{
+
+public:
+
+ CInfDevice(const CInfDevice *pNext)
+ : m_pNext(pNext),
+ m_sync(),
+
+ m_pvInfSession(NULL),
+ m_pInfFile(NULL),
+ m_pManufacturerEntry(NULL),
+ m_pModelEntry(NULL),
+ m_pVersion(NULL),
+ m_pSymManufacturerName(NULL),
+ m_pSymDeviceName(NULL),
+ m_pAddRegList(NULL),
+ m_pCopyFilesList(NULL),
+
+ m_dwSigVersion(101),
+ m_dwSigManuAndModel(102),
+ m_dwSigFlags(103),
+ m_dwSigAddReg(104),
+ m_dwSigCopyFiles(105),
+ m_dwSigDup(106),
+ m_dwSigRank0(107),
+ m_dwSigRanks(108),
+ m_dwSigAll(109)
+ {}
+
+ ~CInfDevice() {}
+
+ // --------------- Dump ---------------
+ // Dump state
+ void Dump(void) const;
+
+ // --------------- Load ---------------
+ // Load (init) the device specifed by the inf file and model entry.
+ BOOL Load (
+ const CInfFile *pInf,
+ const CInfManufacturerEntry *pManuE,
+ const CInfModelEntry *pModelE
+ );
+
+ //-------------- Unload ------------------
+ // Unloads a previously loaded file. If there are open sessions to this
+ // object, Unload returns a handle which will be signalled when all
+ // sessions are closed. New sessions will not be allowed after this
+ // function returns. The call should free the handle.
+ HANDLE Unload (void);
+
+ //-------------- WriteInf ------------------
+ // Creates an inf file with all the information of this device.
+ BOOL WriteInf(LPCTSTR lpctszIniFile) const;
+
+ //-------------- GetRank0Checksum ----------
+ // Returns signature of the rank0 ID
+ DWORD Rank0Checksum(void) const {return m_dwSigRank0;}
+
+ //-------------- Checksum --------------
+ // Returns combined checksum for this device.
+ DWORD Checksum(void) const {return m_dwSigAll;}
+
+ #if (TODO)
+ UpdateInisSection
+ UninstallSection
+ NoResDupIDList
+ PosDupIDList
+ #endif // (TODO)
+
+
+private:
+
+ const CInfDevice * m_pNext;
+ CSync m_sync;
+
+ const void * m_pvInfSession;
+
+ const CInfFile * m_pInfFile;
+ const CInfManufacturerEntry *m_pManufacturerEntry;
+ const CInfModelEntry * m_pModelEntry;
+
+ const CInfVersionSection * m_pVersion;
+ const CInfSymbol * m_pSymManufacturerName;
+ const CInfSymbol * m_pSymDeviceName;
+
+ const CInfList * m_pAddRegList;
+ const CInfList * m_pCopyFilesList;
+
+ BOOL mfn_CreateAddRegList (const CInfModelEntry *);
+ BOOL mfn_CreateCopyFilesList (const CInfModelEntry *);
+ void mfn_AddToAddRegList (const CInfAddRegEntry *);
+ void mfn_AddToCopyFilesList (const CInfCopyFilesEntry *);
+ void mfn_Cleanup (void);
+ BOOL mfn_write_header (LPCTSTR lpctszIniFile) const;
+
+ void mfn_EnterCrit(void) const {m_sync.EnterCrit();}
+ void mfn_LeaveCrit(void) const {m_sync.LeaveCrit();}
+
+ DWORD m_dwSigVersion; // Checksum of version section
+ DWORD m_dwSigManuAndModel;// Checksum of manufacturer name & model name
+ DWORD m_dwSigFlags; // Group-checksum of control flags.
+ DWORD m_dwSigAddReg; // Group-checksum of add reg section
+ DWORD m_dwSigCopyFiles; // Group-checksum of copyfile section
+ DWORD m_dwSigDup; // Group-checksum of NoResDup and PosDup.
+ DWORD m_dwSigRank0; // Group-checksum of all ranks.
+ DWORD m_dwSigRanks; // Group-checksum of all ranks.
+ DWORD m_dwSigAll; // Checksum of all the info of this device
+ // including version, manufacturer-name &
+ // model-name
+};