#include <apitest.h>
#include <stdlib.h>
#include <stdio.h>
#include <ntndk.h>
Go to the source code of this file.
◆ PFN_atexit
◆ exitfunc1()
Definition at line 17 of file atexit.c.
#define ok_int(expression, result)
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseSemaphore(IN HANDLE hSemaphore, IN LONG lReleaseCount, IN LPLONG lpPreviousCount)
Referenced by Test_atexit().
◆ exitfunc2()
Definition at line 24 of file atexit.c.
#define ok_int(expression, result)
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseSemaphore(IN HANDLE hSemaphore, IN LONG lReleaseCount, IN LPLONG lpPreviousCount)
Referenced by Test_atexit().
◆ exitfunc3()
Definition at line 31 of file atexit.c.
#define ok_int(expression, result)
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseSemaphore(IN HANDLE hSemaphore, IN LONG lReleaseCount, IN LPLONG lpPreviousCount)
Referenced by Test_atexit().
◆ START_TEST()
Definition at line 64 of file atexit.c.
HANDLE WINAPI DECLSPEC_HOTPATCH CreateSemaphoreA(IN LPSECURITY_ATTRIBUTES lpSemaphoreAttributes OPTIONAL, IN LONG lInitialCount, IN LONG lMaximumCount, IN LPCSTR lpName OPTIONAL)
char * strstr(char *String1, char *String2)
#define sprintf(buf, format,...)
#define ok_int(expression, result)
int __cdecl system(_In_opt_z_ const char *_Command)
#define NT_SUCCESS(StatCode)
LPSTR WINAPI GetCommandLineA(VOID)
NTSTATUS NTAPI NtQuerySemaphore(IN HANDLE SemaphoreHandle, IN SEMAPHORE_INFORMATION_CLASS SemaphoreInformationClass, OUT PVOID SemaphoreInformation, IN ULONG SemaphoreInformationLength, OUT PULONG ReturnLength OPTIONAL)
◆ Test_atexit()
Definition at line 41 of file atexit.c.
53 ok(patexit !=
NULL,
"failed to get atexit from msvcrt.dll\n");
int __cdecl atexit(void(__cdecl *)(void))
#define ok_int(expression, result)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
static PEXPLICIT_ACCESSW *static HMODULE hmod
HANDLE WINAPI DECLSPEC_HOTPATCH OpenSemaphoreA(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCSTR lpName)
#define GetProcAddress(x, y)
int(__cdecl * PFN_atexit)(void(__cdecl *)(void))
#define SEMAPHORE_ALL_ACCESS
Referenced by START_TEST().
◆ g_hSemaphore
◆ g_sequence