<!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.13"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>Crashpad: crashpad::PEImageResourceReader 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> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="crashpad_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 id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">Crashpad </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.13 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); </script> <div id="main-nav"></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_1PEImageResourceReader.html">PEImageResourceReader</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="classcrashpad_1_1PEImageResourceReader-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">crashpad::PEImageResourceReader Class Reference</div> </div> </div><!--header--> <div class="contents"> <p>A reader for resources stored in PE images mapped into another process. <a href="classcrashpad_1_1PEImageResourceReader.html#details">More...</a></p> <p><code>#include "snapshot/win/pe_image_resource_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:af50ab222af554fc2398a78728c134145"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1PEImageResourceReader.html#af50ab222af554fc2398a78728c134145">Initialize</a> (const <a class="el" href="classcrashpad_1_1ProcessSubrangeReader.html">ProcessSubrangeReader</a> &module_subrange_reader, const IMAGE_DATA_DIRECTORY &resources_directory_entry)</td></tr> <tr class="memdesc:af50ab222af554fc2398a78728c134145"><td class="mdescLeft"> </td><td class="mdescRight">Initializes the resource reader. <a href="#af50ab222af554fc2398a78728c134145">More...</a><br /></td></tr> <tr class="separator:af50ab222af554fc2398a78728c134145"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a74d047ffc2e95da0764413735ba0b592"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1PEImageResourceReader.html#a74d047ffc2e95da0764413735ba0b592">FindResourceByID</a> (uint16_t type, uint16_t name, uint16_t language, <a class="el" href="namespacecrashpad.html#a368af6d88f68998b5c5eb80b8f6ebb76">WinVMAddress</a> *address, <a class="el" href="namespacecrashpad.html#a1bac9f2a189b24737e743d6690362239">WinVMSize</a> *size, uint32_t *code_page) const</td></tr> <tr class="memdesc:a74d047ffc2e95da0764413735ba0b592"><td class="mdescLeft"> </td><td class="mdescRight">Locates a resource in a module by its ID. <a href="#a74d047ffc2e95da0764413735ba0b592">More...</a><br /></td></tr> <tr class="separator:a74d047ffc2e95da0764413735ba0b592"><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 resources stored in PE images mapped into another process. </p> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classcrashpad_1_1PEImageReader.html" title="A reader for PE images mapped into another process. ">PEImageReader</a> </dd></dl> </div><h2 class="groupheader">Member Function Documentation</h2> <a id="a74d047ffc2e95da0764413735ba0b592"></a> <h2 class="memtitle"><span class="permalink"><a href="#a74d047ffc2e95da0764413735ba0b592">◆ </a></span>FindResourceByID()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool crashpad::PEImageResourceReader::FindResourceByID </td> <td>(</td> <td class="paramtype">uint16_t </td> <td class="paramname"><em>type</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint16_t </td> <td class="paramname"><em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint16_t </td> <td class="paramname"><em>language</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">uint32_t * </td> <td class="paramname"><em>code_page</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td> const</td> </tr> </table> </div><div class="memdoc"> <p>Locates a resource in a module by its ID. </p> <p>This method is similar to <code>FindResourceEx()</code>, but it operates on modules loaded in a remote process’ address space. It is not necessary to <code>LoadLibrary()</code> a module into a process in order to use this method.</p> <p>No support is provided at present for locating resources by <em>type</em> or <em>name</em> using strings as opposed to integer identifiers.</p> <p>Languages are scanned in the order determined by GetEntryFromResourceDirectoryByLanguage().</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>The integer identifier of the resource type, as in the <code>lpType</code> parameter of <code>FindResourceEx()</code>. </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>The integer identifier of the resource, as in the <code>lpName</code> parameter of <code>FindResourceEx()</code>. </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">language</td><td>The language of the resource, as in the <code>wLanguage</code> parameter of <code>FindResourceEx()</code>. </td></tr> <tr><td class="paramdir">[out]</td><td class="paramname">address</td><td>The address, in the remote process’ address space, of the resource data. </td></tr> <tr><td class="paramdir">[out]</td><td class="paramname">size</td><td>The size of the resource data. </td></tr> <tr><td class="paramdir">[out]</td><td class="paramname">code_page</td><td>The code page used to encode textual resource data. This parameter is optional.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd><code>true</code> on success, with the out parameters set appropriately. <code>false</code> if the resource was not found, without logging any messages. <code>false</code> on failure, with a message logged. </dd></dl> </div> </div> <a id="af50ab222af554fc2398a78728c134145"></a> <h2 class="memtitle"><span class="permalink"><a href="#af50ab222af554fc2398a78728c134145">◆ </a></span>Initialize()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool crashpad::PEImageResourceReader::Initialize </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcrashpad_1_1ProcessSubrangeReader.html">ProcessSubrangeReader</a> & </td> <td class="paramname"><em>module_subrange_reader</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const IMAGE_DATA_DIRECTORY & </td> <td class="paramname"><em>resources_directory_entry</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Initializes the resource reader. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramdir">[in]</td><td class="paramname">module_subrange_reader</td><td>The reader for the module. </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">resources_directory_entry</td><td>The module’s <code>IMAGE_DATA_DIRECTORY</code> for its resources area. This is taken from the module’s <code>IMAGE_OPTIONAL_HEADER::DataDirectory</code> at index <code>IMAGE_DIRECTORY_ENTRY_RESOURCE</code>.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd><code>true</code> on success, <code>false</code> on failure with a message logged. </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following files:<ul> <li>snapshot/win/pe_image_resource_reader.h</li> <li>snapshot/win/pe_image_resource_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.13 </small></address> </body> </html>