summaryrefslogtreecommitdiffstats
path: root/bin/win32/BINDInstall/VersionInfo.h
blob: ec215401fb0e2787c36bc6085a246572d4031940 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// VersionInfo.h: interface for the CVersionInfo class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_VERSIONINFO_H__F82E9FF3_5298_11D4_AB87_00C04F789BA0__INCLUDED_)
#define AFX_VERSIONINFO_H__F82E9FF3_5298_11D4_AB87_00C04F789BA0__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CVersionInfo  
{
public:
	CVersionInfo(CString filename);
	virtual ~CVersionInfo();
	BOOL IsValid() {return m_isValid;}
	DWORD GetStatus() {return m_status;}

	BOOL CopyFileCheckVersion(CVersionInfo &originalFile);
	BOOL CopyFileNoVersion(CVersionInfo &originalFile);

	const CString &GetFilename() {return m_filename;}

	// Extract the elements of the file's string info block
	CString GetFileVersionString();
	CString GetProductVersionString();
	CString GetComments();
	CString GetFileDescription();
	CString GetInternalName();
	CString GetLegalCopyright();
	CString GetLegalTrademarks();
	CString GetOriginalFileName();
	CString GetProductName();
	CString GetSpecialBuildString();
	CString GetPrivateBuildString();
	CString GetCompanyName();


	// Extract the elements of the file's VS_FIXEDFILEINFO block
	_int64 GetFileVersion();
	_int64 GetProductVersion();
	_int64 GetFileDate();

	DWORD GetFileFlagMask();
	DWORD GetFileFlags();
	DWORD GetFileOS();
	DWORD GetFileType();
	DWORD GetFileSubType();

private:
	CString m_filename;
	BOOL m_isValid;
	LPVOID m_versionInfo;
	VS_FIXEDFILEINFO *m_fixedInfo;
	DWORD m_codePage;
	DWORD m_status;

	CString QueryStringValue(CString value);
};

#endif // !defined(AFX_VERSIONINFO_H__F82E9FF3_5298_11D4_AB87_00C04F789BA0__INCLUDED_)