Skip to content

Commit a6811b4

Browse files
committed
[FEATURE] Added running TLS callbacks to template
1 parent 6fb7f09 commit a6811b4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

project_template/main.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ int load_and_run(LPCTSTR pe_path)
2929
// if the loaded PE needs to access resources, you may need to connect it to the PEB:
3030
peconv::set_main_module_in_peb((HMODULE)my_pe);
3131

32+
// if needed, you can run TLS callbacks before the Entry Point:
33+
peconv::run_tls_callbacks(my_pe, v_size);
34+
3235
//calculate the Entry Point of the manually loaded module
3336
DWORD ep_rva = peconv::get_entry_point_rva(my_pe);
3437
if (!ep_rva) {

0 commit comments

Comments
 (0)