-
Notifications
You must be signed in to change notification settings - Fork 0
Image Bound Import Directory
AFP edited this page Apr 1, 2023
·
1 revision
after initialize the PE class you can get access the Image Bound Import Directory structure by calling GetImageBoundImportDirectory()
method. by calling this function, you get the object of ImageBoundImport
class, so you can retrieve the fields, change or modify them.
#include <iostream>
#include <POEX.h> // include POEX header
int main()
{
auto pe = POEX::PE(L"1.exe");
// Access to Image Bound Import Directory
auto boundImportDirectory = pe.GetImageBoundImportDirectory();
// other stuff in here
return 0;
}
With calling GetImageBoundImportDirectory
method, you can access the structure and method in bellow:
/// <summary>
/// Time date stamp.
/// </summary>
/// <returns>Time date stamp.</returns>
auto TimeDateStamp() const -> unsigned int;
/// <summary>
/// Time date stamp.
/// </summary>
/// <param name="time">Time date stamp.</param>
/// <returns></returns>
auto TimeDateStamp(const unsigned int& time) -> void;
/// <summary>
/// Offset module name.
/// </summary>
/// <returns>offset</returns>
auto OffsetModuleName() const -> unsigned short;
/// <summary>
/// Offset module name.
/// </summary>
/// <param name="offs">offset</param>
/// <returns></returns>
auto OffsetModuleName(const unsigned short& offs) -> void;
/// <summary>
/// Number of module forwarder references.
/// </summary>
/// <returns>counts if moudle forwarder references</returns>
auto NumberOfModuleForwarderRefs() const -> unsigned short;
/// <summary>
/// Number of module forwarder references.
/// </summary>
/// <param name="refs">counts if moudle forwarder references</param>
/// <returns></returns>
auto NumberOfModuleForwarderRefs(const unsigned short& refs) -> void;