ReactOS 0.4.16-dev-329-g9223134
loadconfig.h File Reference
#include <apitest.h>
#include <apitest_guard.h>
#include <ndk/ntndk.h>
#include <strsafe.h>
Include dependency graph for loadconfig.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COM_NO_WINDOWS_H
 

Functions

BOOL check_loadconfig ()
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 4 of file loadconfig.h.

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 5 of file loadconfig.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 3 of file loadconfig.h.

Function Documentation

◆ check_loadconfig()

BOOL check_loadconfig ( )

Definition at line 35 of file common.c.

36{
39 ULONG ConfigSize = 0;
40 ULONG MinimalSize;
42
43 // Validate the required flag for the 'stacktrace' test
44 ok(Peb->NtGlobalFlag & FLG_USER_STACK_TRACE_DB, "NtGlobalFlag: 0x%lx\n", Peb->NtGlobalFlag);
46
47 // Now validate our LOAD_CONFIG entry
49 TRUE,
51 &ConfigSize);
52
53 MinimalSize = FIELD_OFFSET(IMAGE_LOAD_CONFIG_DIRECTORY, SecurityCookie) + sizeof(LoadConfig->SecurityCookie);
54 if (!LoadConfig || ConfigSize < MinimalSize)
55 {
56 ok(0, "Invalid IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG: %p, %lu (%lu)\n",
57 LoadConfig, ConfigSize, MinimalSize);
58 }
59 else
60 {
61 ok(LoadConfig->GlobalFlagsSet & FLG_USER_STACK_TRACE_DB,
62 "Invalid GlobalFlagsSet: %lx\n", LoadConfig->GlobalFlagsSet);
63 ok(!(LoadConfig->GlobalFlagsClear & FLG_USER_STACK_TRACE_DB),
64 "Invalid GlobalFlagsClear: %lx\n", LoadConfig->GlobalFlagsClear);
66 "Unexpected size difference: %lu vs %u\n", LoadConfig->Size, sizeof(IMAGE_LOAD_CONFIG_DIRECTORY));
67 }
68
69 return Result;
70}
#define NtCurrentPeb()
Definition: FLS.c:22
#define ok(value,...)
Definition: atltest.h:57
#define TRUE
Definition: types.h:120
#define RtlImageDirectoryEntryToData
Definition: compat.h:809
#define IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG
Definition: compat.h:153
PPEB Peb
Definition: dllmain.c:27
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FLG_USER_STACK_TRACE_DB
Definition: pstypes.h:67
PIMAGE_LOAD_CONFIG_DIRECTORY32 PIMAGE_LOAD_CONFIG_DIRECTORY
Definition: ntimage.h:156
static VOID LoadConfig(HWND hwndDlg, PPOWER_SCHEMES_PAGE_DATA pPageData, PPOWER_SCHEME pScheme)
Definition: powershemes.c:237
PVOID ImageBaseAddress
Definition: ntddk_ex.h:245
ULONG NtGlobalFlag
Definition: ntddk_ex.h:270
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
uint32_t ULONG
Definition: typedefs.h:59
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409

Referenced by START_TEST().