mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[DBGHELP_APITEST][SDK_APITEST] Fix initializing global variables
This commit is contained in:
parent
590e36479c
commit
522e9f6dd3
2 changed files with 7 additions and 5 deletions
|
@ -15,6 +15,8 @@
|
||||||
|
|
||||||
#include "wine/test.h"
|
#include "wine/test.h"
|
||||||
|
|
||||||
|
extern PfnDliHook __pfnDliFailureHook2;
|
||||||
|
|
||||||
#define ok_ulonglong(expression, result) \
|
#define ok_ulonglong(expression, result) \
|
||||||
do { \
|
do { \
|
||||||
ULONG64 _value = (expression); \
|
ULONG64 _value = (expression); \
|
||||||
|
@ -217,10 +219,6 @@ FARPROC WINAPI DliFailHook(unsigned dliNotify, PDelayLoadInfo pdli)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Register the failure hook using the magic name '__pfnDliFailureHook2'. */
|
|
||||||
PfnDliHook __pfnDliFailureHook2 = DliFailHook;
|
|
||||||
|
|
||||||
|
|
||||||
/* Maybe our dbghelp.dll is too old? */
|
/* Maybe our dbghelp.dll is too old? */
|
||||||
static BOOL supports_pdb(HANDLE hProc, DWORD64 BaseAddress)
|
static BOOL supports_pdb(HANDLE hProc, DWORD64 BaseAddress)
|
||||||
{
|
{
|
||||||
|
@ -582,6 +580,9 @@ START_TEST(pdb)
|
||||||
|
|
||||||
init_dbghelp_version();
|
init_dbghelp_version();
|
||||||
|
|
||||||
|
/* Register the failure hook using the magic name '__pfnDliFailureHook2'. */
|
||||||
|
__pfnDliFailureHook2 = DliFailHook;
|
||||||
|
|
||||||
if (init_sym(FALSE))
|
if (init_sym(FALSE))
|
||||||
{
|
{
|
||||||
SetLastError(ERROR_SUCCESS);
|
SetLastError(ERROR_SUCCESS);
|
||||||
|
|
|
@ -369,7 +369,7 @@ LONG ExceptionFilter(IN PEXCEPTION_POINTERS ExceptionInfo, ULONG ExceptionCode)
|
||||||
so that we can check that both fallback and registration work*/
|
so that we can check that both fallback and registration work*/
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
PfnDliHook __pfnDliNotifyHook2 = DliHook;
|
extern PfnDliHook __pfnDliNotifyHook2;
|
||||||
//PfnDliHook __pfnDliFailureHook2 = DliFailHook;
|
//PfnDliHook __pfnDliFailureHook2 = DliFailHook;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -401,6 +401,7 @@ unsigned g_imagehlp[] = { dliStartProcessing, dliNotePreLoadLibrary, dliFailLoad
|
||||||
//#define DELAYLOAD_SUPPORTS_UNLOADING
|
//#define DELAYLOAD_SUPPORTS_UNLOADING
|
||||||
START_TEST(delayimp)
|
START_TEST(delayimp)
|
||||||
{
|
{
|
||||||
|
__pfnDliNotifyHook2 = DliHook;
|
||||||
/* Verify that both scenario's work */
|
/* Verify that both scenario's work */
|
||||||
ok(__pfnDliNotifyHook2 == DliHook, "Expected __pfnDliNotifyHook2 to be DliHook(%p), but was: %p\n",
|
ok(__pfnDliNotifyHook2 == DliHook, "Expected __pfnDliNotifyHook2 to be DliHook(%p), but was: %p\n",
|
||||||
DliHook, __pfnDliNotifyHook2);
|
DliHook, __pfnDliNotifyHook2);
|
||||||
|
|
Loading…
Reference in a new issue