#include <ntstatus.h>
#include <windows.h>
#include "wine/test.h"
#include "appshim_apitest.h"
Go to the source code of this file.
◆ WIN32_NO_STATUS
◆ FREELIBRARYPROC
◆ START_TEST()
START_TEST |
( |
ignorefreelib |
| ) |
|
Definition at line 77 of file ignorefreelib.c.
78{
81
83
85 return;
86
87
88
90
97
99 ok(avifil32 !=
NULL,
"Unable to load avifil32\n");
104
108
110 ok(esent !=
NULL,
"Unable to load esent\n");
115
119
121 ok(msi !=
NULL,
"Unable to load msi\n");
126
130
132 {
133
134 return;
135 }
136
138}
tGETHOOKAPIS LoadShimDLL2(PCWSTR ShimDll)
#define ok_ptr(expression, result)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
static void test_IgnoreFreeLibrary(VOID)
static tGETHOOKAPIS pGetHookAPIs
LONG winetest_get_failures(void)
◆ test_IgnoreFreeLibrary()
static void test_IgnoreFreeLibrary |
( |
VOID |
| ) |
|
|
static |
Definition at line 20 of file ignorefreelib.c.
21{
26
27
28
29
30
31
32 hook =
pGetHookAPIs(
"AvIFiL32.Dll;esent;esent*;ent.dll;msi.dll",
L"IgnoreFreeLibrary", &num_shims);
33
34 ok(
hook !=
NULL,
"Expected hook to be a valid pointer\n");
35 ok(num_shims == 1,
"Expected num_shims to be 1, was: %u\n", num_shims);
36
37 if (!
hook || !num_shims)
38 return;
39
42
44 ok(avifil32 !=
NULL,
"Unable to load avifil32\n");
45
47 ok(esent !=
NULL,
"Unable to load esent\n");
48
50 ok(msi !=
NULL,
"Unable to load msi\n");
51
53 freeProc =
hook->ReplacementFunction;
54
55 ok(freeProc !=
NULL,
"\n");
56
57 if (!freeProc)
58 return;
59
60
61 ok(freeProc(avifil32),
"Unable to unload avifil32\n");
63 ok(avifil32 !=
NULL,
"avifil32 should not unload\n");
64
65
66 ok(freeProc(esent),
"Unable to unload esent\n");
68 ok(esent ==
NULL,
"esent should be unloaded\n");
69
70
71 ok(freeProc(msi),
"Unable to unload msi\n");
73 ok(msi !=
NULL,
"msi should not unload\n");
74}
BOOL(WINAPI * FREELIBRARYPROC)(HMODULE)
Referenced by START_TEST().
◆ pGetHookAPIs