我正在编写一个 C/C++ PE 解析库,在其中我使用 DLL 或 exe 来提取有关目录和标题的信息。我的问题是当我提取导出地址并获取函数地址时,我不知道如何使用该地址将其指向具有导出导出函数数量的数组
DWORD ExportRVA = PEHeader->optional.data_directory[0].virtual_address;
image_export_directory* Exports = (image_export_directory*)(RVAToOffset(ExportRVA)+BaseAddress);
ExportTable.nNames = Exports->number_of_names;
ExportTable.nFunctions = Exports->number_of_functions;
ExportTable.pFunctions = Exports->address_of_functions;
ExportTable.nNames = Exports->address_of_names;
ExportTable.pNamesOrdinals = Exports->address_of_name_ordinals;
我是否必须为数组分配一个指针,例如
DWORD * AddrFunctions;
改变指针地址?