home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 27 / IOPROG_27.ISO / SOFT / GETDLL.ZIP / LibraryInfo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-09-19  |  2.5 KB  |  91 lines

  1. // LibraryInfo.h: interface for the CLibraryInfo class.
  2. //
  3. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  4. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  5. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  6. // PARTICULAR PURPOSE.
  7. //
  8. // Copyright (C) 1995  Kohli Computers, Inc..  All Rights Reserved.
  9. //
  10. //  MODULE: LibraryInfo.h
  11. //
  12. //  PURPOSE: Class used to extract information about a DLL/EXE module. 
  13. //
  14. //////////////////////////////////////////////////////////////////////
  15.  
  16. #if !defined(AFX_LIBRARYINFO_H__77BAFD12_3BBB_11D2_8B59_000000000000__INCLUDED_)
  17. #define AFX_LIBRARYINFO_H__77BAFD12_3BBB_11D2_8B59_000000000000__INCLUDED_
  18.  
  19. #if _MSC_VER >= 1000
  20. #pragma once
  21. #endif // _MSC_VER >= 1000
  22.  
  23. typedef struct _DLLINFO {
  24.         CString stDllName;
  25.         CString    stCompany;
  26.         CString    stCopyRight;
  27.         CString    stDescription;
  28.         CString    stFileVersion;
  29.         CString stMajorVersion;
  30.         CString stMinorVersion;
  31.         CString    stInternalName;
  32.         CString    stOriginalName;
  33.         CString    stProductName;
  34.         CString    stProductVersion;
  35.         CString    stDllVersion;
  36.         CString    stFileOS;
  37.         CString    stFileType;
  38.         CString stLanguageId;
  39.         CString stCharSet;
  40.     } DLLINFO, *LPDLLINFO;
  41.  
  42. class CLibraryInfo : public CObject  
  43. {
  44. public:
  45.     void SetDllName (const CString &name);
  46.     const CString& GetDllName () const;
  47.     bool GetCharacterSet (CString &characterSet);
  48.     bool GetLanguage (CString &language);
  49.     bool GetMinorVer (CString &minorVer);
  50.     bool GetMajorVersion (CString &majorVer);
  51.     bool GetFileVersion (CString &fileVer);
  52.     bool GetDescription (CString &desc);
  53.     bool GetProductVersion (CString &prodVersion);
  54.     bool GetProductName (CString &prodName);
  55.     bool GetInternalName (CString &internalName);
  56.     bool GetOrigFileName (CString &origName);
  57.     bool GetCopyRight (CString ©Right);
  58.     bool GetCompanyName (CString &companyName);
  59.     CLibraryInfo();
  60.     virtual ~CLibraryInfo();
  61.  
  62.     bool GetDllInfo (DLLINFO &info);
  63.     bool GetDllInfo (BYTE *versionInfo);
  64.     bool GetDllInfo (VS_FIXEDFILEINFO &fixedInfo);
  65.     bool GetLanguageId (WORD &langId);
  66.     bool GetCharacterset (WORD &charSet);
  67.  
  68. protected:
  69.     bool GetDynamicInfo ();
  70.     bool GetFixedFileInfo();
  71.     bool GetInfo ();
  72.     void FreeLib (HMODULE hModule);
  73.     
  74.     struct TRANSLATE {
  75.         WORD languageId;
  76.         WORD characterSet;
  77.     } m_Translation;
  78.  
  79.     BYTE* m_pVersionInfo;
  80.     VS_FIXEDFILEINFO m_FixedFileInfo;
  81.  
  82.  
  83.     DLLINFO m_DllInfo;
  84.  
  85.     bool m_bInfoObtained;
  86.     bool m_bLibLoaded;
  87.  
  88. };
  89.  
  90. #endif // !defined(AFX_LIBRARYINFO_H__77BAFD12_3BBB_11D2_8B59_000000000000__INCLUDED_)
  91.