| The Gaudi Framework v32r1 (f65d50dc)

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 # include <iostream>
9 # include <string>
10
11 # include <assert.h>
12 # include <stdio.h>
13 # include <windows.h>
14
15 class CLibSymbolInfo {
16 public:
17 CLibSymbolInfo();
18 virtual ~CLibSymbolInfo();
19 BOOL DumpSymbols( LPTSTR lpszLibPathName, std::ostream& pFile );
20 std::string GetLastError() const;
21
22 protected:
23 std::string m_strResultsString;
24 std::string m_strErrorMsg;
25
26 BOOL Dump( LPTSTR lpszLibPathName, std::ostream& pFile );
27 BOOL IsRegularLibSymbol( PSTR pszSymbolName );
28 BOOL IsFiltedSymbol( std::string& pszSymbolName );
29 DWORD ConvertBigEndian( DWORD bigEndian );
30 };
31
32 enum errMMF { errMMF_NoError, errMMF_FileOpen, errMMF_FileMapping, errMMF_MapView };
33
34 class MEMORY_MAPPED_FILE {
35 public:
36 MEMORY_MAPPED_FILE( PSTR pszFileName );
37 ~MEMORY_MAPPED_FILE( void );
38
39 PVOID GetBase( void ) { return m_pMemoryMappedFileBase; }
40 DWORD GetFileSize( void ) { return m_cbFile; }
41 BOOL IsValid( void ) { return errMMF_NoError == m_errCode; }
42 errMMF GetErrorType() { return m_errCode; }
43
44 private:
45 HANDLE m_hFile;
46 HANDLE m_hFileMapping; // Handle of memory mapped file
47 PVOID m_pMemoryMappedFileBase;
48 DWORD m_cbFile;
49 errMMF m_errCode;
50 };
51
52 typedef MEMORY_MAPPED_FILE* PMEMORY_MAPPED_FILE;
53
54 #endif // !defined(AFX_LIBSYMBOLINFO_H__1A7003B4_BA53_11D1_AE46_1CFB51000000__INCLUDED_)
MEMORY_MAPPED_FILE::GetBase
PVOID GetBase(void)
Definition: LibSymbolInfo.h:39
CLibSymbolInfo::GetLastError
std::string GetLastError() const
Definition: LibSymbolInfo.cpp:169
errMMF_FileOpen
Definition: LibSymbolInfo.h:32
CLibSymbolInfo::CLibSymbolInfo
CLibSymbolInfo()
Definition: LibSymbolInfo.cpp:21
errMMF_MapView
Definition: LibSymbolInfo.h:32
CLibSymbolInfo::m_strResultsString
std::string m_strResultsString
Definition: LibSymbolInfo.h:23
PMEMORY_MAPPED_FILE
MEMORY_MAPPED_FILE * PMEMORY_MAPPED_FILE
Definition: LibSymbolInfo.h:52
MEMORY_MAPPED_FILE::~MEMORY_MAPPED_FILE
~MEMORY_MAPPED_FILE(void)
Definition: LibSymbolInfo.cpp:213
std::string
STL class.
MEMORY_MAPPED_FILE::GetErrorType
errMMF GetErrorType()
Definition: LibSymbolInfo.h:42
MEMORY_MAPPED_FILE::GetFileSize
DWORD GetFileSize(void)
Definition: LibSymbolInfo.h:40
CLibSymbolInfo
Definition: LibSymbolInfo.h:15
CLibSymbolInfo::Dump
BOOL Dump(LPTSTR lpszLibPathName, std::ostream &pFile)
Definition: LibSymbolInfo.cpp:60
errMMF_FileMapping
Definition: LibSymbolInfo.h:32
CLibSymbolInfo::m_strErrorMsg
std::string m_strErrorMsg
Definition: LibSymbolInfo.h:24
MEMORY_MAPPED_FILE::IsValid
BOOL IsValid(void)
Definition: LibSymbolInfo.h:41
MEMORY_MAPPED_FILE
Definition: LibSymbolInfo.h:34
MEMORY_MAPPED_FILE::m_cbFile
DWORD m_cbFile
Definition: LibSymbolInfo.h:48
MEMORY_MAPPED_FILE::m_errCode
errMMF m_errCode
Definition: LibSymbolInfo.h:49
errMMF
errMMF
Definition: LibSymbolInfo.h:32
MEMORY_MAPPED_FILE::m_hFile
HANDLE m_hFile
Definition: LibSymbolInfo.h:45
CLibSymbolInfo::IsFiltedSymbol
BOOL IsFiltedSymbol(std::string &pszSymbolName)
Definition: LibSymbolInfo.cpp:142
MEMORY_MAPPED_FILE::m_pMemoryMappedFileBase
PVOID m_pMemoryMappedFileBase
Definition: LibSymbolInfo.h:47
CLibSymbolInfo::ConvertBigEndian
DWORD ConvertBigEndian(DWORD bigEndian)
Definition: LibSymbolInfo.cpp:158
MEMORY_MAPPED_FILE::MEMORY_MAPPED_FILE
MEMORY_MAPPED_FILE(PSTR pszFileName)
Definition: LibSymbolInfo.cpp:171
MEMORY_MAPPED_FILE::m_hFileMapping
HANDLE m_hFileMapping
Definition: LibSymbolInfo.h:46
std::ostream
STL class.
CLibSymbolInfo::DumpSymbols
BOOL DumpSymbols(LPTSTR lpszLibPathName, std::ostream &pFile)
Definition: LibSymbolInfo.cpp:37
errMMF_NoError
Definition: LibSymbolInfo.h:32
CLibSymbolInfo::~CLibSymbolInfo
virtual ~CLibSymbolInfo()
Definition: LibSymbolInfo.cpp:23
CLibSymbolInfo::IsRegularLibSymbol
BOOL IsRegularLibSymbol(PSTR pszSymbolName)
Definition: LibSymbolInfo.cpp:130