Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LibSymbolInfo.h
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // LibSymbolInfo.h: interface for the CLibSymbolInfo class.
27 //
29 
30 #if !defined(AFX_LIBSYMBOLINFO_H__1A7003B4_BA53_11D1_AE46_1CFB51000000__INCLUDED_)
31 #define AFX_LIBSYMBOLINFO_H__1A7003B4_BA53_11D1_AE46_1CFB51000000__INCLUDED_
32 
33 #if _MSC_VER >= 1000
34 #pragma once
35 #endif // _MSC_VER >= 1000
36 
37 #include <string>
38 #include <iostream>
39 
40 #include <stdio.h>
41 #include <assert.h>
42 #include <windows.h>
43 
45 {
46 public:
48  virtual ~CLibSymbolInfo();
49  BOOL DumpSymbols(LPTSTR lpszLibPathName, std::ostream& pFile);
50  std::string GetLastError() const;
51 
52 protected:
53  std::string m_strResultsString;
54  std::string m_strErrorMsg;
55 
56  BOOL Dump(LPTSTR lpszLibPathName, std::ostream& pFile);
57  BOOL IsRegularLibSymbol( PSTR pszSymbolName );
58  BOOL IsFiltedSymbol( std::string& pszSymbolName );
59  DWORD ConvertBigEndian(DWORD bigEndian);
60 };
61 
64 
66 {
67  public:
68  MEMORY_MAPPED_FILE( PSTR pszFileName );
69  ~MEMORY_MAPPED_FILE(void);
70 
71  PVOID GetBase( void ){ return m_pMemoryMappedFileBase; }
72  DWORD GetFileSize( void ){ return m_cbFile; }
73  BOOL IsValid( void ) { return errMMF_NoError == m_errCode; }
74  errMMF GetErrorType(){ return m_errCode; }
75 
76  private:
77 
78  HANDLE m_hFile;
79  HANDLE m_hFileMapping; // Handle of memory mapped file
80  PVOID m_pMemoryMappedFileBase;
81  DWORD m_cbFile;
82  errMMF m_errCode;
83 };
84 
86 
87 #endif // !defined(AFX_LIBSYMBOLINFO_H__1A7003B4_BA53_11D1_AE46_1CFB51000000__INCLUDED_)
PVOID GetBase(void)
Definition: LibSymbolInfo.h:71
std::string GetLastError() const
std::string m_strResultsString
Definition: LibSymbolInfo.h:53
MEMORY_MAPPED_FILE * PMEMORY_MAPPED_FILE
Definition: LibSymbolInfo.h:85
DWORD GetFileSize(void)
Definition: LibSymbolInfo.h:72
BOOL Dump(LPTSTR lpszLibPathName, std::ostream &pFile)
std::string m_strErrorMsg
Definition: LibSymbolInfo.h:54
BOOL IsValid(void)
Definition: LibSymbolInfo.h:73
errMMF
Definition: LibSymbolInfo.h:62
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)