home *** CD-ROM | disk | FTP | other *** search
- // LibraryInfo.h: interface for the CLibraryInfo class.
- //
- // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
- // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
- // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
- // PARTICULAR PURPOSE.
- //
- // Copyright (C) 1995 Kohli Computers, Inc.. All Rights Reserved.
- //
- // MODULE: LibraryInfo.h
- //
- // PURPOSE: Class used to extract information about a DLL/EXE module.
- //
- //////////////////////////////////////////////////////////////////////
-
- #if !defined(AFX_LIBRARYINFO_H__77BAFD12_3BBB_11D2_8B59_000000000000__INCLUDED_)
- #define AFX_LIBRARYINFO_H__77BAFD12_3BBB_11D2_8B59_000000000000__INCLUDED_
-
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
-
- typedef struct _DLLINFO {
- CString stDllName;
- CString stCompany;
- CString stCopyRight;
- CString stDescription;
- CString stFileVersion;
- CString stMajorVersion;
- CString stMinorVersion;
- CString stInternalName;
- CString stOriginalName;
- CString stProductName;
- CString stProductVersion;
- CString stDllVersion;
- CString stFileOS;
- CString stFileType;
- CString stLanguageId;
- CString stCharSet;
- } DLLINFO, *LPDLLINFO;
-
- class CLibraryInfo : public CObject
- {
- public:
- void SetDllName (const CString &name);
- const CString& GetDllName () const;
- bool GetCharacterSet (CString &characterSet);
- bool GetLanguage (CString &language);
- bool GetMinorVer (CString &minorVer);
- bool GetMajorVersion (CString &majorVer);
- bool GetFileVersion (CString &fileVer);
- bool GetDescription (CString &desc);
- bool GetProductVersion (CString &prodVersion);
- bool GetProductName (CString &prodName);
- bool GetInternalName (CString &internalName);
- bool GetOrigFileName (CString &origName);
- bool GetCopyRight (CString ©Right);
- bool GetCompanyName (CString &companyName);
- CLibraryInfo();
- virtual ~CLibraryInfo();
-
- bool GetDllInfo (DLLINFO &info);
- bool GetDllInfo (BYTE *versionInfo);
- bool GetDllInfo (VS_FIXEDFILEINFO &fixedInfo);
- bool GetLanguageId (WORD &langId);
- bool GetCharacterset (WORD &charSet);
-
- protected:
- bool GetDynamicInfo ();
- bool GetFixedFileInfo();
- bool GetInfo ();
- void FreeLib (HMODULE hModule);
-
- struct TRANSLATE {
- WORD languageId;
- WORD characterSet;
- } m_Translation;
-
- BYTE* m_pVersionInfo;
- VS_FIXEDFILEINFO m_FixedFileInfo;
-
-
- DLLINFO m_DllInfo;
-
- bool m_bInfoObtained;
- bool m_bLibLoaded;
-
- };
-
- #endif // !defined(AFX_LIBRARYINFO_H__77BAFD12_3BBB_11D2_8B59_000000000000__INCLUDED_)
-