diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/mdmpRipper/CMiniDumpObject.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'utils/mdmpRipper/CMiniDumpObject.h')
| -rw-r--r-- | utils/mdmpRipper/CMiniDumpObject.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/utils/mdmpRipper/CMiniDumpObject.h b/utils/mdmpRipper/CMiniDumpObject.h new file mode 100644 index 0000000..7fca952 --- /dev/null +++ b/utils/mdmpRipper/CMiniDumpObject.h @@ -0,0 +1,63 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +#include <windows.h> +#include "tier1/strtools.h" +#include <conio.h> +#include "utlvector.h" +#include <Dbghelp.h> +#include "vgui_controls/ListPanel.h" +#include "KeyValues.h" + +enum moduleType +{ + GOOD, + BAD, + UNKNOWN +}; + +struct version +{ + int v1, v2, v3, v4; + bool operator == (version version2){ return v1==version2.v1 && v2==version2.v2 && v3==version2.v3 && v4==version2.v4; } +}; + +struct module +{ + int key; + char name[1024]; + moduleType myType; + version versionInfo; + bool knownVersion; +}; + +class CMiniDumpObject +{ +public: + //CMiniDumpObject( char *pszFilename, char *pszKnownFilename ); + CMiniDumpObject( const char *pszFilename, CUtlVector<module> *pKnownModuleList ); + CMiniDumpObject( HANDLE pMiniDumpHandle, CUtlVector<module> *pKnownModuleList ); + + void AddToBadList( MINIDUMP_MODULE module ); + void AddToGoodList( MINIDUMP_MODULE module ); + void AddToUnknownList( MINIDUMP_MODULE module ); + void PopulateListPanel( vgui::ListPanel *pTokenList, bool bCumulative ); + inline const char *GetName() + { + return m_pszMiniDumpFileName; + } + +private: + void Init( HANDLE pFileMap, CUtlVector<module> *pKnownModuleList ); + void InitFromFilename( const char *pszFilename, CUtlVector<module> *pKnownModuleList ); + void InitFromHandle( HANDLE pMiniDumpHandle, CUtlVector<module> *pKnownModuleList ); + int ModuleListToListPanel( vgui::ListPanel *pTokenList, CUtlVector<module> *pModuleList, bool bCumulative, int startingModule); + void GetVersionString( char *pszOutput, version *pVersionInfo ); + version GetVersionStruct( VS_FIXEDFILEINFO *pVersionInfo ); + void LoadKnownModules(); + + CUtlVector<module> m_goodModuleList; + CUtlVector<module> m_badModuleList; + CUtlVector<module> m_unknownModuleList; + CUtlVector<module> m_badChecksumList; + char m_pszMiniDumpFileName[1024]; + +};
\ No newline at end of file |