mirror of
https://github.com/decompals/wibo.git
synced 2025-12-16 00:17:04 +00:00
Rework thread TIB handling & DLL initialization handling
This commit is contained in:
17
test/test_dll_attach_failure.c
Normal file
17
test/test_dll_attach_failure.c
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user