| 428 | }; |
| 429 | |
| 430 | struct safe_module_enumerator { |
| 431 | using value_type = const detail::win::LDR_DATA_TABLE_ENTRY_T; |
| 432 | value_type* value; |
| 433 | value_type* head; |
| 434 | |
| 435 | LAZY_IMPORTER_FORCEINLINE safe_module_enumerator() noexcept |
| 436 | : safe_module_enumerator(ldr_data_entry()) |
| 437 | {} |
| 438 | |
| 439 | LAZY_IMPORTER_FORCEINLINE |
| 440 | safe_module_enumerator(const detail::win::LDR_DATA_TABLE_ENTRY_T* ldr) noexcept |
| 441 | : value(ldr->load_order_next()), head(value) |
| 442 | {} |
| 443 | |
| 444 | LAZY_IMPORTER_FORCEINLINE void reset() noexcept |
| 445 | { |
| 446 | value = head->load_order_next(); |
| 447 | } |
| 448 | |
| 449 | LAZY_IMPORTER_FORCEINLINE bool next() noexcept |
| 450 | { |
| 451 | value = value->load_order_next(); |
| 452 | |
| 453 | return value != head && value->DllBase; |
| 454 | } |
| 455 | }; |
| 456 | |
| 457 | struct unsafe_module_enumerator { |
| 458 | using value_type = const detail::win::LDR_DATA_TABLE_ENTRY_T*; |
no test coverage detected