14#pragma GCC diagnostic ignored "-Wuninitialized"
63#if defined(TEST_MSVCRT)
64 const PCWSTR DllName =
L"msvcrt_crt_dll_startup.dll";
65#elif defined(TEST_STATIC_CRT)
66 const PCWSTR DllName =
L"static_crt_dll_startup.dll";
68#error This test only makes sense for static CRT and msvcrt.dll
78 skip(
"Helper dll not found\n");
82 if (pSetCounterValuesPointer ==
NULL)
84 skip(
"Helper function not found\n");
89 pSetCounterValuesPointer(&
values);
90 ok(
values.m_uninit_at_startup == 0,
"m_uninit_at_startup = %d\n",
values.m_uninit_at_startup);
93 ok(
values.static_construct_counter_at_startup == 5656,
"static_construct_counter_at_startup = %d\n",
values.static_construct_counter_at_startup);
94 ok(
values.static_construct_counter == 5657,
"static_construct_counter = %d\n",
values.static_construct_counter);
95 ok(
values.dtor_counter_at_detach == 0,
"dtor_counter_at_detach = %d\n",
values.dtor_counter_at_detach);
96 ok(
values.dtor_counter == 0,
"dtor_counter = %d\n",
values.dtor_counter);
97 values.dtor_counter_at_detach = 78789;
98 values.dtor_counter = 7878;
100 ok(
values.m_uninit_at_startup == 0,
"m_uninit_at_startup = %d\n",
values.m_uninit_at_startup);
103 ok(
values.static_construct_counter_at_startup == 5656,
"static_construct_counter_at_startup = %d\n",
values.static_construct_counter_at_startup);
104 ok(
values.static_construct_counter == 5657,
"static_construct_counter = %d\n",
values.static_construct_counter);
105 ok(
values.dtor_counter_at_detach == 7878,
"dtor_counter_at_detach = %d\n",
values.dtor_counter_at_detach);
106 ok(
values.dtor_counter == 7879,
"dtor_counter = %d\n",
values.dtor_counter);
119#define MAPPING_NAME L"crt_apitest_static_construct"
138 skip(
"Could not map shared memory\n");
144 skip(
"Could not map view of shared memory\n");
190 skip(
"Can't proceed without file mapping\n");
205 ok(created,
"Expected CreateProcess to succeed\n");
224 ok(
g_Memory !=
NULL,
"Expected the shared memory to be mapped!\n");
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define CreateFileMappingW(a, b, c, d, e, f)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
void WINAPI SET_COUNTER_VALUES_POINTER(_Out_ struct counter_values *pcv)
HANDLE NTAPI OpenFileMappingW(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCWSTR lpName)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLboolean GLenum GLenum GLvoid * values
static const char const char * DllPath
int winetest_get_mainargs(char ***pargv)
void winetest_wait_child_process(HANDLE process)
static HANDLE g_FileMapping
static VOID TestInitStatic(VOID)
int static_construct_counter
static BOOL g_CreatedFileMapping
static int m_uninit_at_startup
static int static_init_counter_at_startup
static void unmap_memory()
static shared_memory * g_Memory
static VOID TestStaticDestruct(VOID)
static VOID TestDllStartup(VOID)
static int static_construct_counter_at_startup
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
#define FILE_MAP_ALL_ACCESS