TSDuck v3.43-4426
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::WinModuleInfo Class Reference

Windows module information (Windows-specific). More...

#include <tsWinModuleInfo.h>

Collaboration diagram for ts::WinModuleInfo:

Public Member Functions

 WinModuleInfo ()=default
 Default constructor.
 
 WinModuleInfo (const UString &file_name)
 Constructor from a file name.
 
 WinModuleInfo (const void *address, std::nullptr_t dummy)
 Constructor from an address in memory.
 
void clear ()
 Clear the content of the structure.
 
bool isValid () const
 Check if the information was correctly loaded from the module file.
 
const UStringlastError () const
 Get the last error.
 
bool reload (const UString &file_name)
 Reload content from a file name.
 
bool reloadByAddress (const void *address)
 Reload content from an address in memory.
 
UString summary () const
 Get a summary string describing the module.
 

Static Public Member Functions

static const std::vector< std::pair< UString WinModuleInfo::*, UString > > & GetNames ()
 Get a list of Windows-defined names and their corresponding string field in WinModuleInfo.
 

Public Attributes

UString comments {}
 Comments.
 
UString company_name {}
 Company name.
 
UString file_description {}
 File description.
 
UString file_version {}
 File version.
 
uint64_t file_version_int = 0
 File version as an integer (four 16-bit fields).
 
UString internal_name {}
 Internal name.
 
UString legal_copyright {}
 Legal copyright.
 
UString legal_trademarks {}
 Legal trademarks.
 
UString original_file_name {}
 Original_file_name.
 
UString private_build {}
 Private build.
 
UString product_name {}
 Product name.
 
UString product_version {}
 Product version.
 
uint64_t product_version_int = 0
 Product version as an integer (four 16-bit fields).
 
UString special_build {}
 Special build.
 

Detailed Description

Windows module information (Windows-specific).

A module is a DLL or an executable file.

Constructor & Destructor Documentation

◆ WinModuleInfo() [1/2]

ts::WinModuleInfo::WinModuleInfo ( const UString file_name)

Constructor from a file name.

Parameters
[in]file_nameName of the DLL or executable file. If no directory is specified, use the LoadLibrary() search algorithm.

◆ WinModuleInfo() [2/2]

ts::WinModuleInfo::WinModuleInfo ( const void *  address,
std::nullptr_t  dummy 
)

Constructor from an address in memory.

Parameters
[in]addressSome address in virtual address space, typically a function address.
[in]dummyUse nullptr for disambiguation. Reason: without it, WinModuleInfo(u"foo.dll") would call this constructor, not the one with a file name.

Member Function Documentation

◆ reload()

bool ts::WinModuleInfo::reload ( const UString file_name)

Reload content from a file name.

Parameters
[in]file_nameName of the DLL or executable file. If no directory is specified, use the LoadLibrary() search algorithm.
Returns
True on success, false on failure.

◆ reloadByAddress()

bool ts::WinModuleInfo::reloadByAddress ( const void *  address)

Reload content from an address in memory.

Parameters
[in]addressSome address in virtual address space, typically a function address.
Returns
True on success, false on failure.

◆ isValid()

bool ts::WinModuleInfo::isValid ( ) const
inline

Check if the information was correctly loaded from the module file.

Returns
True if the information is valid, false otherwise.

◆ lastError()

const UString & ts::WinModuleInfo::lastError ( ) const
inline

Get the last error.

Returns
A constant reference to the last error message.

◆ summary()

UString ts::WinModuleInfo::summary ( ) const

Get a summary string describing the module.

Returns
A summary string describing the module.

◆ GetNames()

static const std::vector< std::pair< UString WinModuleInfo::*, UString > > & ts::WinModuleInfo::GetNames ( )
static

Get a list of Windows-defined names and their corresponding string field in WinModuleInfo.

Returns
A constant reference on a vector of correspondences.

The documentation for this class was generated from the following file: