Geant4_10
LibSymbolInfo.h
Go to the documentation of this file.
1 // LibSymbolInfo.h: interface for the CLibSymbolInfo class.
2 //
4 
5 #if !defined(AFX_LIBSYMBOLINFO_H__1A7003B4_BA53_11D1_AE46_1CFB51000000__INCLUDED_)
6 #define AFX_LIBSYMBOLINFO_H__1A7003B4_BA53_11D1_AE46_1CFB51000000__INCLUDED_
7 
8 #if _MSC_VER >= 1000
9 #pragma once
10 #endif // _MSC_VER >= 1000
11 
12 #include <string>
13 #include <iostream>
14 
15 #include <stdio.h>
16 #include <assert.h>
17 #include <windows.h>
18 
20 {
21 public:
23  virtual ~CLibSymbolInfo();
24  BOOL DumpSymbols(LPTSTR lpszLibPathName, std::ostream& pFile);
25  std::string GetLastError() const;
26 
27 protected:
28  std::string m_strResultsString;
29  std::string m_strErrorMsg;
30 
31  BOOL Dump(LPTSTR lpszLibPathName, std::ostream& pFile);
32  BOOL IsRegularLibSymbol( PSTR pszSymbolName );
33  BOOL IsFiltedSymbol( std::string& pszSymbolName );
34  DWORD ConvertBigEndian(DWORD bigEndian);
35 };
36 
39 
41 {
42  public:
43  MEMORY_MAPPED_FILE( PSTR pszFileName );
44  ~MEMORY_MAPPED_FILE(void);
45 
46  PVOID GetBase( void ){ return m_pMemoryMappedFileBase; }
47  DWORD GetFileSize( void ){ return m_cbFile; }
48  BOOL IsValid( void ) { return errMMF_NoError == m_errCode; }
49  errMMF GetErrorType(){ return m_errCode; }
50 
51  private:
52 
53  HANDLE m_hFile;
54  HANDLE m_hFileMapping; // Handle of memory mapped file
55  PVOID m_pMemoryMappedFileBase;
56  DWORD m_cbFile;
57  errMMF m_errCode;
58 };
59 
61 
62 #endif // !defined(AFX_LIBSYMBOLINFO_H__1A7003B4_BA53_11D1_AE46_1CFB51000000__INCLUDED_)
PVOID GetBase(void)
Definition: LibSymbolInfo.h:46
std::string GetLastError() const
std::string m_strResultsString
Definition: LibSymbolInfo.h:28
MEMORY_MAPPED_FILE * PMEMORY_MAPPED_FILE
Definition: LibSymbolInfo.h:60
DWORD GetFileSize(void)
Definition: LibSymbolInfo.h:47
BOOL Dump(LPTSTR lpszLibPathName, std::ostream &pFile)
std::string m_strErrorMsg
Definition: LibSymbolInfo.h:29
BOOL IsValid(void)
Definition: LibSymbolInfo.h:48
errMMF
Definition: LibSymbolInfo.h:37
BOOL IsFiltedSymbol(std::string &pszSymbolName)
DWORD ConvertBigEndian(DWORD bigEndian)
MEMORY_MAPPED_FILE(PSTR pszFileName)
BOOL DumpSymbols(LPTSTR lpszLibPathName, std::ostream &pFile)
virtual ~CLibSymbolInfo()
BOOL IsRegularLibSymbol(PSTR pszSymbolName)