46 USHORT NumberOfNamedEntries,
68 if (DirEntry < Resource->Lang1Entries)
86 if (DirEntry < Resource->Lang1Entries)
201#define ok_nwstr(str1, str2, count) \
202 ok(wcsncmp((PWCHAR)str1, (PWCHAR)str2, count) == 0, \
203 "string is wrong, expected: '%S', got '%S'\n", str1, str2); \
205#define ok_enumres(_Res, _Type, _Name, _Lang, _Data, _Size) \
206 ok_dec((_Res)->Type, _Type); \
207 if ((ULONG_PTR)(_Name) > 0xFFFF) \
209 ok_size_t(*(WORD*)((_Res)->Name), wcslen((PWCHAR)(_Name))); \
210 ok_nwstr((PWCHAR)((_Res)->Name + 2), (PWCHAR)_Name, *(WORD*)((_Res)->Name)); \
214 ok_dec((_Res)->Name, (ULONG_PTR)_Name); \
216 ok_hex((_Res)->Language, _Lang); \
217 ok_ptr((PVOID)(_Res)->Data, _Data); \
218 ok_dec((_Res)->Size, _Size); \
219 ok_dec((_Res)->Reserved, 0);
232 memset(EnumRes, 0xcc,
sizeof(EnumRes));
234 ResourceInfo.
Type = 1;
235 ResourceInfo.
Name = 1;
272 ResourceInfo.
Type = 6;
273 ResourceInfo.
Name = 1;
281 ResourceInfo.
Type = 1;
282 ResourceInfo.
Name = 7;
static VOID InitializeDataEntry(PVOID ImageBase, PIMAGE_RESOURCE_DATA_ENTRY DataEntry, PVOID Data, ULONG Size)
struct _TEST_IMAGE TEST_IMAGE
#define ok_enumres(_Res, _Type, _Name, _Lang, _Data, _Size)
struct _TEST_RESOURCES * PTEST_RESOURCES
static void Test_Data(PTEST_IMAGE TestImage)
struct _TEST_RESOURCES TEST_RESOURCES
static VOID InitializeNamedEntry(PTEST_RESOURCES Resource, PIMAGE_RESOURCE_DIRECTORY_ENTRY DirEntry, PWCHAR Name, PVOID Data)
struct _TEST_IMAGE * PTEST_IMAGE
static VOID InitializeResourceDirectory(PIMAGE_RESOURCE_DIRECTORY ResourceDirectory, USHORT NumberOfNamedEntries, USHORT NumberOfIdEntries)
VOID InitializeTestImage(PTEST_IMAGE TestImage)
static void Test_Parameters(PTEST_IMAGE TestImage)
static VOID InitializeTestResource(PVOID ImageBase, PTEST_RESOURCES Resource)
static VOID InitializeIdEntry(PTEST_RESOURCES Resource, PIMAGE_RESOURCE_DIRECTORY_ENTRY DirEntry, USHORT Id, PVOID Data)
char * strcpy(char *DstString, const char *SrcString)
#define ok_hex(expression, result)
#define ok_dec(expression, result)
#define ok_ptr(expression, result)
_Acquires_exclusive_lock_ Resource _Acquires_shared_lock_ Resource _Inout_ PERESOURCE Resource
struct _IMAGE_DOS_HEADER IMAGE_DOS_HEADER
static ULONG ResourceCount
#define EXCEPTION_EXECUTE_HANDLER
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSTATUS NTAPI LdrEnumResources(_In_ PVOID BaseAddress, _In_ PLDR_RESOURCE_INFO ResourceInfo, _In_ ULONG Level, _Inout_ ULONG *ResourceCount, _Out_writes_to_(*ResourceCount, *ResourceCount) LDR_ENUM_RESOURCE_INFO *Resources)
#define IMAGE_NT_OPTIONAL_HDR32_MAGIC
#define IMAGE_NT_OPTIONAL_HDR64_MAGIC
#define STATUS_INVALID_IMAGE_FORMAT
#define STATUS_RESOURCE_DATA_NOT_FOUND
struct _IMAGE_OPTIONAL_HEADER IMAGE_OPTIONAL_HEADER
#define IMAGE_NT_SIGNATURE
#define IMAGE_DOS_SIGNATURE
#define IMAGE_DIRECTORY_ENTRY_RESOURCE
#define _SEH2_EXCEPT(...)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
WORD NumberOfNamedEntries
IMAGE_SECTION_HEADER SectionHeaders[1]
IMAGE_DOS_HEADER DosHeader
IMAGE_NT_HEADERS NtHeaders
IMAGE_RESOURCE_DIRECTORY Lang2Directory
IMAGE_RESOURCE_DIRECTORY_ENTRY Lang4Entries[2]
IMAGE_RESOURCE_DIRECTORY_ENTRY Lang1Entries[2]
IMAGE_RESOURCE_DIRECTORY_ENTRY Lang2Entries[2]
IMAGE_RESOURCE_DIRECTORY_ENTRY Lang3Entries[2]
IMAGE_RESOURCE_DIRECTORY_ENTRY TypeEntries[2]
IMAGE_RESOURCE_DATA_ENTRY DataEntries[8]
IMAGE_RESOURCE_DIRECTORY Lang4Directory
IMAGE_RESOURCE_DIRECTORY_STRING Name1String
IMAGE_RESOURCE_DIRECTORY Lang1Directory
IMAGE_RESOURCE_DIRECTORY_ENTRY Name2Entries[2]
IMAGE_RESOURCE_DIRECTORY Name1Directory
IMAGE_RESOURCE_DIRECTORY_ENTRY Name1Entries[2]
IMAGE_RESOURCE_DIRECTORY Lang3Directory
IMAGE_RESOURCE_DIRECTORY TypeDirectory
IMAGE_RESOURCE_DIRECTORY Name2Directory
#define FIELD_OFFSET(t, f)
#define RtlZeroMemory(Destination, Length)
#define STATUS_INFO_LENGTH_MISMATCH
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size