Rework thread TIB handling & DLL initialization handling

This commit is contained in:
2025-10-02 16:40:23 -06:00
parent 8330f27479
commit d8150e33b9
23 changed files with 1256 additions and 110 deletions

View File

@@ -0,0 +1,17 @@
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include "test_assert.h"
int main(void) {
SetLastError(0);
HMODULE mod = LoadLibraryA("dll_attach_failure.dll");
DWORD error = GetLastError();
TEST_CHECK_MSG(mod == NULL, "LoadLibraryA unexpectedly succeeded: %p", mod);
TEST_CHECK_EQ(ERROR_DLL_INIT_FAILED, error);
printf("dll_attach_failure: error=%lu\n", (unsigned long)error);
return EXIT_SUCCESS;
}