bool ExHandlerGetInfo(EX_HANDLER_TYPE Type, std::vector<duint> & Entries) { Entries.clear(); switch(Type) { case EX_HANDLER_SEH: return ExHandlerGetSEH(Entries); case EX_HANDLER_VEH: return ExHandlerGetVEH(Entries); case EX_HANDLER_VCH: return ExHandlerGetVCH(Entries, false); case EX_HANDLER_UNHANDLED: return ExHandlerGetUnhandled(Entries); } return false; }
bool ExHandlerGetInfo(EX_HANDLER_TYPE Type, EX_HANDLER_INFO* Info) { bool ret = false; std::vector<duint> handlerEntries; switch(Type) { case EX_HANDLER_SEH: ret = ExHandlerGetSEH(handlerEntries); break; case EX_HANDLER_VEH: ret = ExHandlerGetVEH(handlerEntries); break; case EX_HANDLER_VCH: ret = ExHandlerGetVCH(handlerEntries, false); break; case EX_HANDLER_UNHANDLED: ret = ExHandlerGetUnhandled(handlerEntries); break; } // Check if a call failed if(!ret) { Info->count = 0; Info->addresses = nullptr; return false; } // Convert vector to C-style array Info->count = (int)handlerEntries.size(); Info->addresses = (duint*)BridgeAlloc(Info->count * sizeof(duint)); memcpy(Info->addresses, handlerEntries.data(), Info->count * sizeof(duint)); return false; }