Root > Reference > All Classes > TELAbstractMapParser > Methods > TELAbstractMapParser.MapStringToModuleName

Class method TELAbstractMapParser.MapStringToModuleName

Previous pageReturn to chapter overviewNext page   

Reads unit name from mapped image of .map file.

 

Unit

EMapParserBase

 

Syntax

 

Code (Delphi)

public

class function MapStringToModuleName(

AMapString: PELMapString

): String; virtual;

 

Parameters

AMapString

A pointer to the beginning of the string to read.

 

Remarks

Reads unit name from the "Detailed map of segments" section of .map file. This function strips library name (C++ Builder only) and '.pas' and '.obj' extensions. See examples.

 

This method behaves differently on different Delphi versions:

ANSI version of this method returns UTF-8 encoded string.
Unicode version of this method returns UTF-16 encoded string.

 

Examples

 

Code (Delphi)

// Reads name of Delphi unit:

S := MapStringToModuleName('TypInfo ACBP=A9');

// S = 'TypeInfo'

//

// Reads name of C++ Builder unit:

S := MapStringToModuleName('C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\RELEASE\RTL.BPI|ShlObj.pas ACBP=A9');

// S = 'ShlObj';

 

See also

TELAbstractMapParser.MapStringToStr
TELAbstractMapParser.MapStringToFileName
TMapFileParser.MapStringToIdent
TELAbstractMapParser.PrepareStr



Send feedback... Build date: 2023-09-11
Last edited: 2023-09-11
PRIVACY STATEMENT
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.


Permanent link to this article: https://www.eurekalog.com/help/eurekalog/topic_method_emapparserbase_telabstractmapparser_mapstringtomodulename.php