<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.9.1"/> <title>Crashpad: crashpad::PEImageReader Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Crashpad </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.9.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespacecrashpad.html">crashpad</a></li><li class="navelem"><a class="el" href="classcrashpad_1_1PEImageReader.html">PEImageReader</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="classcrashpad_1_1PEImageReader-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">crashpad::PEImageReader Class Reference</div> </div> </div><!--header--> <div class="contents"> <p>A reader for PE images mapped into another process. <a href="classcrashpad_1_1PEImageReader.html#details">More...</a></p> <p><code>#include "snapshot/win/pe_image_reader.h"</code></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:a4253bf82bb281c7f87f429d2ec8f211e"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1PEImageReader.html#a4253bf82bb281c7f87f429d2ec8f211e">Initialize</a> (<a class="el" href="classcrashpad_1_1ProcessReaderWin.html">ProcessReaderWin</a> *process_reader, <a class="el" href="namespacecrashpad.html#a368af6d88f68998b5c5eb80b8f6ebb76">WinVMAddress</a> address, <a class="el" href="namespacecrashpad.html#a1bac9f2a189b24737e743d6690362239">WinVMSize</a> size, const std::string &module_name)</td></tr> <tr class="memdesc:a4253bf82bb281c7f87f429d2ec8f211e"><td class="mdescLeft"> </td><td class="mdescRight">Initializes the reader. <a href="#a4253bf82bb281c7f87f429d2ec8f211e">More...</a><br /></td></tr> <tr class="separator:a4253bf82bb281c7f87f429d2ec8f211e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a54e57058141a8d084d1004ef34cc7a65"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacecrashpad.html#a368af6d88f68998b5c5eb80b8f6ebb76">WinVMAddress</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1PEImageReader.html#a54e57058141a8d084d1004ef34cc7a65">Address</a> () const </td></tr> <tr class="memdesc:a54e57058141a8d084d1004ef34cc7a65"><td class="mdescLeft"> </td><td class="mdescRight">Returns the image's load address. <a href="#a54e57058141a8d084d1004ef34cc7a65">More...</a><br /></td></tr> <tr class="separator:a54e57058141a8d084d1004ef34cc7a65"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aa4a4e048e1715581ea599ec690ef8e8a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacecrashpad.html#a1bac9f2a189b24737e743d6690362239">WinVMSize</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1PEImageReader.html#aa4a4e048e1715581ea599ec690ef8e8a">Size</a> () const </td></tr> <tr class="memdesc:aa4a4e048e1715581ea599ec690ef8e8a"><td class="mdescLeft"> </td><td class="mdescRight">Returns the image's size. <a href="#aa4a4e048e1715581ea599ec690ef8e8a">More...</a><br /></td></tr> <tr class="separator:aa4a4e048e1715581ea599ec690ef8e8a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae6ae190a20774bb600908dba314447a7"><td class="memTemplParams" colspan="2">template<class Traits > </td></tr> <tr class="memitem:ae6ae190a20774bb600908dba314447a7"><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1PEImageReader.html#ae6ae190a20774bb600908dba314447a7">GetCrashpadInfo</a> (<a class="el" href="structcrashpad_1_1process__types_1_1CrashpadInfo.html">process_types::CrashpadInfo</a>< Traits > *crashpad_info) const </td></tr> <tr class="memdesc:ae6ae190a20774bb600908dba314447a7"><td class="mdescLeft"> </td><td class="mdescRight">Obtains the module's <a class="el" href="structcrashpad_1_1CrashpadInfo.html" title="A structure that can be used by a Crashpad-enabled program to provide information to the Crashpad cra...">CrashpadInfo</a> structure. <a href="#ae6ae190a20774bb600908dba314447a7">More...</a><br /></td></tr> <tr class="separator:ae6ae190a20774bb600908dba314447a7"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9fec9c135dfe4bf5eb89275c4bd1b121"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1PEImageReader.html#a9fec9c135dfe4bf5eb89275c4bd1b121">DebugDirectoryInformation</a> (<a class="el" href="structcrashpad_1_1UUID.html">UUID</a> *uuid, DWORD *age, std::string *pdbname) const </td></tr> <tr class="memdesc:a9fec9c135dfe4bf5eb89275c4bd1b121"><td class="mdescLeft"> </td><td class="mdescRight">Obtains information from the module's debug directory, if any. <a href="#a9fec9c135dfe4bf5eb89275c4bd1b121">More...</a><br /></td></tr> <tr class="separator:a9fec9c135dfe4bf5eb89275c4bd1b121"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>A reader for PE images mapped into another process. </p> <p>This class is capable of reading both 32-bit and 64-bit images based on the bitness of the remote process.</p> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classcrashpad_1_1PEImageAnnotationsReader.html" title="A reader of annotations stored in a PE image mapped into another process. ">PEImageAnnotationsReader</a> </dd></dl> </div><h2 class="groupheader">Member Function Documentation</h2> <a class="anchor" id="a54e57058141a8d084d1004ef34cc7a65"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="namespacecrashpad.html#a368af6d88f68998b5c5eb80b8f6ebb76">WinVMAddress</a> crashpad::PEImageReader::Address </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inline</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Returns the image's load address. </p> <p>This is the value passed as <em>address</em> to <a class="el" href="classcrashpad_1_1PEImageReader.html#a4253bf82bb281c7f87f429d2ec8f211e" title="Initializes the reader. ">Initialize()</a>. </p> </div> </div> <a class="anchor" id="a9fec9c135dfe4bf5eb89275c4bd1b121"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool crashpad::PEImageReader::DebugDirectoryInformation </td> <td>(</td> <td class="paramtype"><a class="el" href="structcrashpad_1_1UUID.html">UUID</a> * </td> <td class="paramname"><em>uuid</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">DWORD * </td> <td class="paramname"><em>age</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">std::string * </td> <td class="paramname"><em>pdbname</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const</td> </tr> </table> </div><div class="memdoc"> <p>Obtains information from the module's debug directory, if any. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramdir">[out]</td><td class="paramname">uuid</td><td>The unique identifier of the executable/PDB. </td></tr> <tr><td class="paramdir">[out]</td><td class="paramname">age</td><td>The age field for the pdb (the number of times it's been relinked). </td></tr> <tr><td class="paramdir">[out]</td><td class="paramname">pdbname</td><td>Name of the pdb file. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd><code>true</code> on success, or <code>false</code> if the module has no debug directory entry. </dd></dl> </div> </div> <a class="anchor" id="ae6ae190a20774bb600908dba314447a7"></a> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Traits > </div> <table class="memname"> <tr> <td class="memname">bool crashpad::PEImageReader::GetCrashpadInfo </td> <td>(</td> <td class="paramtype"><a class="el" href="structcrashpad_1_1process__types_1_1CrashpadInfo.html">process_types::CrashpadInfo</a>< Traits > * </td> <td class="paramname"><em>crashpad_info</em></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Obtains the module's <a class="el" href="structcrashpad_1_1CrashpadInfo.html" title="A structure that can be used by a Crashpad-enabled program to provide information to the Crashpad cra...">CrashpadInfo</a> structure. </p> <dl class="section return"><dt>Returns</dt><dd><code>true</code> on success, <code>false</code> on failure. If the module does not have a <code>CPADinfo</code> section, this will return <code>false</code> without logging any messages. Other failures will result in messages being logged. </dd></dl> </div> </div> <a class="anchor" id="a4253bf82bb281c7f87f429d2ec8f211e"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool crashpad::PEImageReader::Initialize </td> <td>(</td> <td class="paramtype"><a class="el" href="classcrashpad_1_1ProcessReaderWin.html">ProcessReaderWin</a> * </td> <td class="paramname"><em>process_reader</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="namespacecrashpad.html#a368af6d88f68998b5c5eb80b8f6ebb76">WinVMAddress</a> </td> <td class="paramname"><em>address</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="namespacecrashpad.html#a1bac9f2a189b24737e743d6690362239">WinVMSize</a> </td> <td class="paramname"><em>size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"><em>module_name</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Initializes the reader. </p> <p>This method must be called only once on an object. This method must be called successfully before any other method in this class may be called.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramdir">[in]</td><td class="paramname">process_reader</td><td>The reader for the remote process. </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>The address, in the remote process' address space, where the <code>IMAGE_DOS_HEADER</code> is located. </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The size of the image. </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>The module's name, a string to be used in logged messages. This string is for diagnostic purposes.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd><code>true</code> if the image was read successfully, <code>false</code> otherwise, with an appropriate message logged. </dd></dl> </div> </div> <a class="anchor" id="aa4a4e048e1715581ea599ec690ef8e8a"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="namespacecrashpad.html#a1bac9f2a189b24737e743d6690362239">WinVMSize</a> crashpad::PEImageReader::Size </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inline</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Returns the image's size. </p> <p>This is the value passed as <em>size</em> to <a class="el" href="classcrashpad_1_1PEImageReader.html#a4253bf82bb281c7f87f429d2ec8f211e" title="Initializes the reader. ">Initialize()</a>. </p> </div> </div> <hr/>The documentation for this class was generated from the following files:<ul> <li>snapshot/win/pe_image_reader.h</li> <li>snapshot/win/pe_image_reader.cc</li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.9.1 </small></address> </body> </html>