Refactor to use TIB LastErrorValue

This commit is contained in:
2025-10-28 10:01:21 -06:00
parent 8bd15bd272
commit 9367f003c5
34 changed files with 785 additions and 745 deletions

View File

@@ -1,5 +1,6 @@
#include "common.h"
#include "errors.h"
#include "kernel32/internal.h"
#include "modules.h"
#include <algorithm>
@@ -390,7 +391,7 @@ bool wibo::Executable::resolveImports() {
uint32_t *addressTable = fromRVA(dir->importAddressTable);
ModuleInfo *module = loadModule(dllName);
if (!module && wibo::lastError != ERROR_MOD_NOT_FOUND) {
if (!module && kernel32::getLastError() != ERROR_MOD_NOT_FOUND) {
DEBUG_LOG("Failed to load import module %s\n", dllName);
// lastError is set by loadModule
importsResolved = false;