2587{
2594
2596
2600
2604
2608
2612
2616
2620
2624
2627 {
2628 ok(0,
"could not open %s\n", dll_name);
2629 return;
2630 }
2637
2641
2645
2651
2653
2659
2662
2665 {
2667 trace(
"child: GetExitCodeThread(%u) => %d,%u\n",
i,
ret,
code);
2668 ok(
ret == 1,
"GetExitCodeThread returned %d, expected 1\n",
ret);
2670 }
2671
2676
2683
2684 ret = pRtlDllShutdownInProgress();
2685 ok(!
ret,
"RtlDllShutdownInProgress returned %d\n",
ret);
2686
2690
2693 ok(!
ret,
"TerminateProcess(0) should fail\n");
2695
2697
2700 ok(!
ret,
"NtSetInformationProcess error %#x\n",
ret);
2701
2703 {
2704 case 0:
2705 ret = pRtlDllShutdownInProgress();
2706 ok(!
ret,
"RtlDllShutdownInProgress returned %d\n",
ret);
2707
2708 trace(
"call NtTerminateProcess(0, 195)\n");
2709 ret = pNtTerminateProcess(0, 195);
2710 ok(!
ret,
"NtTerminateProcess error %#x\n",
ret);
2711
2714 ok(!
ret,
"NtQueryInformationProcess error %#x\n",
ret);
2716 "expected STILL_ACTIVE, got %lu\n",
pbi.ExitStatus);
2719 ok(!
ret,
"NtSetInformationProcess error %#x\n",
ret);
2720
2721 ret = pRtlDllShutdownInProgress();
2722 ok(!
ret,
"RtlDllShutdownInProgress returned %d\n",
ret);
2723
2725 ok(
hmod != 0,
"DLL should not be unloaded\n");
2726
2732 else
2733 {
2737 }
2738
2739 trace(
"call LdrShutdownProcess()\n");
2740 pLdrShutdownProcess();
2741
2742 ret = pRtlDllShutdownInProgress();
2743 ok(
ret,
"RtlDllShutdownInProgress returned %d\n",
ret);
2744
2746 ok(
hmod != 0,
"DLL should not be unloaded\n");
2747
2750 ok(!
ret,
"NtQueryInformationProcess error %#x\n",
ret);
2752 "expected STILL_ACTIVE, got %lu\n",
pbi.ExitStatus);
2755 ok(!
ret,
"NtSetInformationProcess error %#x\n",
ret);
2756 break;
2757
2758 case 1:
2759 ret = pRtlDllShutdownInProgress();
2760 ok(!
ret,
"RtlDllShutdownInProgress returned %d\n",
ret);
2761 break;
2762
2763 case 2:
2764 ret = pRtlDllShutdownInProgress();
2765 ok(!
ret,
"RtlDllShutdownInProgress returned %d\n",
ret);
2766
2772 ok(!
hmod,
"DLL should be unloaded\n");
2773
2775 ok(0,
"FreeLibrary+ExitProcess should never return\n");
2776
2777 ret = pRtlDllShutdownInProgress();
2778 ok(!
ret,
"RtlDllShutdownInProgress returned %d\n",
ret);
2779
2780 break;
2781
2782 case 3:
2783 trace(
"signalling thread exit\n");
2785 break;
2786
2787 case 4:
2788 trace(
"setting loader_lock_event\n");
2792
2793
2794 trace(
"call NtTerminateProcess(0, 198)\n");
2795 ret = pNtTerminateProcess(0, 198);
2796 ok(!
ret,
"NtTerminateProcess error %#x\n",
ret);
2797
2799
2800
2801
2802
2803
2804 trace(
"call NtTerminateProcess(GetCurrentProcess(), 198)\n");
2806 ok(0,
"NtTerminateProcess should not return\n");
2807 break;
2808
2809 case 5:
2810 trace(
"setting peb_lock_event\n");
2814
2816
2817
2818 trace(
"call ExitProcess(198)\n");
2820 ok(0,
"ExitProcess should not return\n");
2821 break;
2822
2823 case 6:
2824 trace(
"setting heap_lock_event\n");
2828
2830
2831
2832 trace(
"call ExitProcess(1)\n");
2834 ok(0,
"ExitProcess should not return\n");
2835 break;
2836
2837 default:
2839 break;
2840 }
2841
2846
2848 {
2853 }
2854 else
2855 {
2860 }
2861
2863 {
2865 trace(
"child: GetExitCodeThread(%u) => %d,%u\n",
i,
ret,
code);
2866 ok(
ret == 1,
"GetExitCodeThread returned %d, expected 1\n",
ret);
2867 ok(
code == expected_code,
"expected thread exit code %u, got %u\n", expected_code,
code);
2868 }
2869
2871
2872 trace(
"call ExitProcess(195)\n");
2874}
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define GetCurrentProcess()
#define ERROR_INVALID_HANDLE
#define ERROR_ACCESS_DENIED
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
VOID WINAPI ExitProcess(IN UINT uExitCode)
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI GetExitCodeThread(IN HANDLE hThread, OUT LPDWORD lpExitCode)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
@ ProcessBasicInformation
static PEXPLICIT_ACCESSW *static HMODULE hmod
static int inside_loader_lock
static int test_dll_phase
static DWORD WINAPI noop_thread_proc(void *param)
static LONG * child_failures
#define PROCESS_ALL_ACCESS_NT4
static HANDLE attached_thread[MAX_COUNT]
static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param)
static int inside_heap_lock
static int inside_peb_lock
static DWORD WINAPI semaphore_thread_proc(void *param)
static DWORD attached_thread_count
static DWORD WINAPI mutex_thread_proc(void *param)
LONG winetest_get_failures(void)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateMutexW(IN LPSECURITY_ATTRIBUTES lpMutexAttributes OPTIONAL, IN BOOL bInitialOwner, IN LPCWSTR lpName OPTIONAL)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateSemaphoreW(IN LPSECURITY_ATTRIBUTES lpSemaphoreAttributes OPTIONAL, IN LONG lInitialCount, IN LONG lMaximumCount, IN LPCWSTR lpName OPTIONAL)
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentProcessId(void)
_Inout_ PERBANDINFO * pbi