diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Plugins/General/gen_crasher/MiniVersion.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/Plugins/General/gen_crasher/MiniVersion.h')
-rw-r--r-- | Src/Plugins/General/gen_crasher/MiniVersion.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/Src/Plugins/General/gen_crasher/MiniVersion.h b/Src/Plugins/General/gen_crasher/MiniVersion.h new file mode 100644 index 00000000..4a44d97e --- /dev/null +++ b/Src/Plugins/General/gen_crasher/MiniVersion.h @@ -0,0 +1,69 @@ +// MiniVersion.h Version 1.1 +// +// Author: Hans Dietrich +// hdietrich2@hotmail.com +// +// This software is released into the public domain. +// You are free to use it in any way you like, except +// that you may not sell this source code. +// +// This software is provided "as is" with no expressed +// or implied warranty. I accept no liability for any +// damage or loss of business that this software may cause. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef MINIVERSION_H +#define MINIVERSION_H + +#include <windows.h> +#include <TCHAR.h> + +class CMiniVersion +{ +// constructors +public: + CMiniVersion(LPCTSTR lpszPath = NULL); + BOOL Init(); + void Release(); + +// operations +public: + +// attributes +public: + // fixed info + BOOL GetFileVersion(WORD *pwVersion); + BOOL GetProductVersion(WORD* pwVersion); + BOOL GetFileFlags(DWORD& rdwFlags); + BOOL GetFileOS(DWORD& rdwOS); + BOOL GetFileType(DWORD& rdwType); + BOOL GetFileSubtype(DWORD& rdwType); + + // string info + BOOL GetCompanyName(LPTSTR lpszCompanyName, int nSize); + BOOL GetFileDescription(LPTSTR lpszFileDescription, int nSize); + BOOL GetProductName(LPTSTR lpszProductName, int nSize); + +// implementation +protected: + BOOL GetFixedInfo(VS_FIXEDFILEINFO& rFixedInfo); + BOOL GetStringInfo(LPCTSTR lpszKey, LPTSTR lpszValue, unsigned int cchBuffer); + + BYTE* m_pData; + DWORD m_dwHandle; + WORD m_wFileVersion[4]; + WORD m_wProductVersion[4]; + DWORD m_dwFileFlags; + DWORD m_dwFileOS; + DWORD m_dwFileType; + DWORD m_dwFileSubtype; + + TCHAR m_szPath[MAX_PATH*2]; + TCHAR m_szCompanyName[MAX_PATH*2]; + TCHAR m_szProductName[MAX_PATH*2]; + TCHAR m_szFileDescription[MAX_PATH*2]; +}; + +/////////////////////////////////////////////////////////////////////////////// +#endif
\ No newline at end of file |