ReactOS 0.4.15-dev-7958-gcd0bb1a
resource.c
Go to the documentation of this file.
1/*
2 * Unit test suite for resource functions.
3 *
4 * Copyright 2006 Mike McCormack
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include <windows.h>
22#include <stdio.h>
23
24#include "wine/test.h"
25
26static const char filename[] = "test_.exe";
27static DWORD GLE;
28
30 page_size = 0x1000,
32 max_sections = 3
33};
34
35/* rodata @ [0x1000-0x3000) */
37{
38 ".rodata", {2*page_size}, page_size, 2*page_size, page_size, 0, 0, 0, 0,
40};
41
42/* rodata @ [0x1000-0x2000) */
44{
45 ".rodata", {page_size}, page_size, page_size, page_size, 0, 0, 0, 0,
47};
48
49/* rsrc @ [0x3000-0x4000) */
51{
52 ".rsrc\0\0", {page_size}, rva_rsrc_start, page_size, rva_rsrc_start, 0, 0, 0, 0,
54};
55
56/* rsrc @ [0x2000-0x4000) */
58{
59 ".rsrc\0\0", {2*page_size}, rva_rsrc_start-page_size, 2*page_size, rva_rsrc_start-page_size, 0, 0, 0, 0,
61};
62
63/* rsrc @ [0x2000-0x3000) */
65{
68};
69
70/* rsrc @ [0x3000-0x6000) */
72{
73 ".rsrc\0\0", {3*page_size}, rva_rsrc_start, 3*page_size, rva_rsrc_start, 0, 0, 0, 0,
75};
76
77/* rsrc @ [0x2000-0x5000) */
79{
80 ".rsrc\0\0", {3*page_size}, 2*page_size, 3*page_size, 2*page_size, 0, 0, 0, 0,
82};
83
84/* rsrc @ [0x3000-0x4000), small SizeOfRawData */
86{
87 ".rsrc\0\0", {page_size}, rva_rsrc_start, 8, rva_rsrc_start, 0, 0, 0, 0,
89};
90
91/* reloc @ [0x4000-0x5000) */
93{
94 ".reloc\0", {page_size}, 4*page_size, page_size, 4*page_size, 0, 0, 0, 0,
96};
97
98/* reloc @ [0x6000-0x7000) */
100{
101 ".reloc\0", {page_size}, 6*page_size, page_size, 6*page_size, 0, 0, 0, 0,
103};
104
105typedef struct _sec_build
106{
109
110typedef struct _sec_verify
111{
117
118static const struct _sec_variants
119{
122} sec_variants[] =
123{
124 /* .rsrc is the last section, data directory entry points to whole section */
125 {
126 {{&sh_rodata_1, &sh_rsrc_1, NULL}},
127 {{&sh_rodata_1, &sh_rsrc_1, NULL}, 4*page_size, 1, 0, 0},
128 {{&sh_rodata_1, &sh_rsrc_1, NULL}, 4*page_size, 1, 0, 0},
129 {{&sh_rodata_1, &sh_rsrc_1, NULL}, 4*page_size, 1, 0, 1},
130 {{&sh_rodata_1, &sh_rsrc_4, NULL}, 6*page_size, 1, 0, 1}
131 },
132 /* .rsrc is the last section, data directory entry points to section end */
133 /* Vista+ - resources are moved to section start (trashing data that could be there), and section is trimmed */
134 /* NT4/2000/2003 - resources are moved to section start (trashing data that could be there); section isn't trimmed */
135 {
136 {{&sh_rodata_2, &sh_rsrc_2, NULL}},
137 {{&sh_rodata_2, &sh_rsrc_3, NULL}, 3*page_size, 1, 0, 0},
138 {{&sh_rodata_2, &sh_rsrc_3, NULL}, 3*page_size, 1, 0, 0},
139 {{&sh_rodata_2, &sh_rsrc_3, NULL}, 3*page_size, 1, 0, 1},
140 {{&sh_rodata_2, &sh_rsrc_5, NULL}, 5*page_size, 1, 0, 1}
141 },
142 /* .rsrc is not the last section */
143 /* section is reused; sections after .rsrc are shifted to give space to rsrc (in-image offset and RVA!) */
144 {
146 {{&sh_rodata_1, &sh_rsrc_1, &sh_junk}, 5*page_size, 1, 0, 0},
147 {{&sh_rodata_1, &sh_rsrc_1, &sh_junk}, 5*page_size, 1, 0, 0},
148 {{&sh_rodata_1, &sh_rsrc_1, &sh_junk}, 5*page_size, 1, 0, 1},
149 {{&sh_rodata_1, &sh_rsrc_4, &sh_junk_2}, 7*page_size, 1, 0, 1}
150 },
151 /* .rsrc is the last section, data directory entry points to whole section, file size is not aligned on FileAlign */
152 {
153 {{&sh_rodata_1, &sh_rsrc_6, NULL}},
154 {{&sh_rodata_1, &sh_rsrc_1, NULL}, 4*page_size, 1, 0, 0},
155 {{&sh_rodata_1, &sh_rsrc_1, NULL}, 4*page_size, 1, 0, 0},
156 {{&sh_rodata_1, &sh_rsrc_1, NULL}, 4*page_size, 1, 0, 1},
157 {{&sh_rodata_1, &sh_rsrc_4, NULL}, 6*page_size, 1, 0, 1}
158 }
160
161static int build_exe( const sec_build* sec_descr )
162{
167 HANDLE file;
168 DWORD written, i, file_size;
170
171 memset( page, 0, sizeof page );
172
173 dos = (void*) page;
175 dos->e_lfanew = sizeof *dos;
176
177 nt = (void*) &dos[1];
178
184
185 opt = &nt->OptionalHeader;
186
188 opt->MajorLinkerVersion = 1;
189 opt->BaseOfCode = 0x10;
190 opt->ImageBase = 0x10000000;
192 opt->MajorImageVersion = 1;
193 opt->MajorSubsystemVersion = 4;
194 opt->SizeOfHeaders = sizeof *dos + sizeof *nt + sizeof *sec * 2;
195 opt->SizeOfImage = page_size;
197
198 /* if SectionAlignment and File alignment are not specified */
199 /* UpdateResource fails trying to create a huge temporary file */
202
205
206 sec = (void*) &nt[1];
207
208 file_size = 0;
209 for ( i = 0; i < max_sections; i++ )
210 if ( sec_descr->sect_in[i] )
211 {
212 DWORD virt_end_of_section = sec_descr->sect_in[i]->Misc.VirtualSize +
213 sec_descr->sect_in[i]->VirtualAddress;
214 DWORD phys_end_of_section = sec_descr->sect_in[i]->SizeOfRawData +
215 sec_descr->sect_in[i]->PointerToRawData;
216 memcpy( sec + nt->FileHeader.NumberOfSections, sec_descr->sect_in[i],
217 sizeof(sec[0]) );
219 if ( opt->SizeOfImage < virt_end_of_section )
220 opt->SizeOfImage = virt_end_of_section;
221 if ( file_size < phys_end_of_section )
222 file_size = phys_end_of_section;
223 }
224
226 ok (file != INVALID_HANDLE_VALUE, "failed to create file\n");
227
228 /* write out the header */
229 WriteFile( file, page, sizeof page, &written, NULL );
230
231 /* write out zeroed pages for sections */
232 memset( page, 0, sizeof page );
233 for ( i = page_size; i < file_size; i += page_size )
234 {
236 WriteFile( file, page, size, &written, NULL );
237 }
238
239 CloseHandle( file );
240
241 return 0;
242}
243
244static void update_missing_exe( void )
245{
246 HANDLE res;
247
248 SetLastError(0xdeadbeef);
250 GLE = GetLastError();
251 ok( res == NULL, "BeginUpdateResource should fail\n");
252}
253
254static void update_empty_exe( void )
255{
257 BOOL r;
258
260 ok (file != INVALID_HANDLE_VALUE, "failed to create file\n");
261
262 CloseHandle( file );
263
265 if ( res != NULL || GetLastError() != ERROR_FILE_INVALID )
266 {
267 ok( res != NULL, "BeginUpdateResource failed\n");
268
269 /* check if it's possible to open the file now */
271 ok (test != INVALID_HANDLE_VALUE, "failed to create file\n");
272
273 CloseHandle( test );
274
276 ok( r == FALSE, "EndUpdateResource failed\n");
277 }
278 else
279 skip( "Can't update resource in empty file\n" );
280
282 ok( res == NULL, "BeginUpdateResource failed\n");
283}
284
285static void update_resources_none( void )
286{
287 HMODULE res;
288 BOOL r;
289
291 ok( res != NULL, "BeginUpdateResource failed\n");
292
294 ok( r, "EndUpdateResource failed\n");
295}
296
297static void update_resources_delete( void )
298{
299 HMODULE res;
300 BOOL r;
301
303 ok( res != NULL, "BeginUpdateResource failed\n");
304
306 ok( r, "EndUpdateResource failed\n");
307}
308
309static void update_resources_version( void )
310{
311 HANDLE res = NULL;
312 BOOL r;
313 char foo[] = "red and white";
314
316 ok( res != NULL, "BeginUpdateResource failed\n");
317
318 if (0) /* this causes subsequent tests to fail on Vista */
319 {
321 MAKEINTRESOURCEA(0x1230),
322 MAKEINTRESOURCEA(0x4567),
323 0xabcd,
324 NULL, 0 );
325 ok( r == FALSE, "UpdateResource failed\n");
326 }
327
329 MAKEINTRESOURCEA(0x1230),
330 MAKEINTRESOURCEA(0x4567),
331 0xabcd,
332 foo, sizeof foo );
333 ok( r == TRUE, "UpdateResource failed: %d\n", GetLastError());
334
336 ok( r, "EndUpdateResource failed: %d\n", GetLastError());
337}
338
339static void update_resources_bigdata( void )
340{
341 HANDLE res = NULL;
342 BOOL r;
343 char foo[2*page_size] = "foobar";
344
346 ok( res != NULL, "BeginUpdateResource succeeded\n");
347
349 MAKEINTRESOURCEA(0x3012),
350 MAKEINTRESOURCEA(0x5647),
351 0xcdba,
352 foo, sizeof foo );
353 ok( r == TRUE, "UpdateResource failed: %d\n", GetLastError());
354
356 ok( r, "EndUpdateResource failed\n");
357}
358
359static void check_exe( const sec_verify *verify )
360{
361 int i;
368 DWORD length, sec_count = 0;
369
371 ok (file != INVALID_HANDLE_VALUE, "failed to create file (%d)\n", GetLastError());
372
374 ok( length >= verify->length, "file size wrong\n");
375
377 ok (mapping != NULL, "failed to create file\n");
378
380 ok( dos != NULL, "failed to map file\n");
381
382 if (!dos)
383 goto end;
384
385 nt = (void*) ((BYTE*) dos + dos->e_lfanew);
386 opt = &nt->OptionalHeader;
387 sec = (void*) &nt[1];
388
389 for(i = 0; i < max_sections; i++)
390 if (verify->sect_out[i])
391 {
392 ok( !memcmp(&verify->sect_out[i]->Name, &sec[sec_count].Name, 8), "section %d name wrong\n", sec_count);
393 ok( verify->sect_out[i]->VirtualAddress == sec[sec_count].VirtualAddress, "section %d vaddr wrong\n", sec_count);
394 ok( verify->sect_out[i]->SizeOfRawData <= sec[sec_count].SizeOfRawData, "section %d SizeOfRawData wrong (%d vs %d)\n", sec_count, verify->sect_out[i]->SizeOfRawData ,sec[sec_count].SizeOfRawData);
395 ok( verify->sect_out[i]->PointerToRawData == sec[sec_count].PointerToRawData, "section %d PointerToRawData wrong\n", sec_count);
396 ok( verify->sect_out[i]->Characteristics == sec[sec_count].Characteristics , "section %d characteristics wrong\n", sec_count);
397 sec_count++;
398 }
399
400 ok( nt->FileHeader.NumberOfSections == sec_count, "number of sections wrong\n" );
401
402 if (verify->rsrc_section >= 0 && verify->rsrc_section < nt->FileHeader.NumberOfSections)
403 {
404 dir = (void*) ((BYTE*) dos + sec[verify->rsrc_section].VirtualAddress);
405
406 ok( dir->Characteristics == 0, "Characteristics wrong\n");
407 ok( dir->TimeDateStamp == 0 || abs( dir->TimeDateStamp - GetTickCount() ) < 1000 /* nt4 */,
408 "TimeDateStamp wrong %u\n", dir->TimeDateStamp);
409 ok( dir->MajorVersion == 4, "MajorVersion wrong\n");
410 ok( dir->MinorVersion == 0, "MinorVersion wrong\n");
411
412 ok( dir->NumberOfNamedEntries == verify->NumberOfNamedEntries, "NumberOfNamedEntries should be %d instead of %d\n",
413 verify->NumberOfNamedEntries, dir->NumberOfNamedEntries);
414 ok( dir->NumberOfIdEntries == verify->NumberOfIdEntries, "NumberOfIdEntries should be %d instead of %d\n",
415 verify->NumberOfIdEntries, dir->NumberOfIdEntries);
416
418 "VirtualAddress in optional header should be %d instead of %d\n",
420 }
421
422end:
424
426
427 CloseHandle( file );
428}
429
430static void test_find_resource(void)
431{
432 HRSRC rsrc;
433
435 ok( rsrc != 0, "resource not found\n" );
438 ok( rsrc != 0, "resource not found\n" );
441 ok( rsrc != 0, "resource not found\n" );
442
443 SetLastError( 0xdeadbeef );
445 ok( !rsrc, "resource found\n" );
446 ok( GetLastError() == ERROR_RESOURCE_TYPE_NOT_FOUND, "wrong error %u\n", GetLastError() );
447
448 SetLastError( 0xdeadbeef );
450 ok( !rsrc, "resource found\n" );
451 ok( GetLastError() == ERROR_RESOURCE_NAME_NOT_FOUND, "wrong error %u\n", GetLastError() );
452
453 SetLastError( 0xdeadbeef );
456 ok( !rsrc, "resource found\n" );
457 ok( GetLastError() == ERROR_RESOURCE_LANG_NOT_FOUND, "wrong error %u\n", GetLastError() );
458
459 SetLastError( 0xdeadbeef );
462 ok( !rsrc, "resource found\n" );
463 ok( GetLastError() == ERROR_RESOURCE_LANG_NOT_FOUND, "wrong error %u\n", GetLastError() );
464}
465
467{
468 DWORD i;
469
472
474 {
475 win_skip("Resource calls are not implemented\n");
476 return;
477 }
478
480
481 for(i=0; i < sizeof( sec_variants ) / sizeof( sec_variants[0] ); i++)
482 {
483 const struct _sec_variants *sec = &sec_variants[i];
484 build_exe( &sec->build );
486 check_exe( &sec->chk_none );
488 check_exe( &sec->chk_delete );
490 check_exe( &sec->chk_version );
492 check_exe( &sec->chk_bigdata );
494 }
496}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
unsigned int dir
Definition: maze.c:112
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define START_TEST(x)
Definition: atltest.h:75
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CloseHandle
Definition: compat.h:739
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define PAGE_READONLY
Definition: compat.h:138
#define UnmapViewOfFile
Definition: compat.h:746
#define OPEN_EXISTING
Definition: compat.h:775
#define SetLastError(x)
Definition: compat.h:752
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:740
#define GENERIC_READ
Definition: compat.h:135
#define FILE_MAP_READ
Definition: compat.h:776
#define MapViewOfFile
Definition: compat.h:745
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
Definition: delete.c:24
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
Definition: fileinfo.c:331
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
Definition: res.c:176
BOOL WINAPI UpdateResourceA(HANDLE hUpdate, LPCSTR lpType, LPCSTR lpName, WORD wLanguage, LPVOID lpData, DWORD cbData)
Definition: res.c:1738
HANDLE WINAPI BeginUpdateResourceA(LPCSTR pFileName, BOOL bDeleteExistingResources)
Definition: res.c:1657
HRSRC WINAPI FindResourceExW(HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD lang)
Definition: res.c:164
BOOL WINAPI EndUpdateResourceA(HANDLE hUpdate, BOOL fDiscard)
Definition: res.c:1697
#define abs(i)
Definition: fconv.c:206
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
Definition: filemap.c:23
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint end
Definition: gl.h:1545
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLsizeiptr size
Definition: glext.h:5919
GLuint res
Definition: glext.h:9613
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLenum GLenum GLenum GLenum mapping
Definition: glext.h:9031
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
const char * filename
Definition: ioapi.h:137
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define CREATE_ALWAYS
Definition: disk.h:72
IMAGE_NT_HEADERS nt
Definition: module.c:50
IMAGE_DOS_HEADER dos
Definition: module.c:49
static void update_resources_version(void)
Definition: resource.c:309
static void update_missing_exe(void)
Definition: resource.c:244
static DWORD GLE
Definition: resource.c:27
static const IMAGE_SECTION_HEADER sh_rsrc_4
Definition: resource.c:71
constants
Definition: resource.c:29
@ max_sections
Definition: resource.c:32
@ rva_rsrc_start
Definition: resource.c:31
@ page_size
Definition: resource.c:30
static const IMAGE_SECTION_HEADER sh_junk
Definition: resource.c:92
static int build_exe(const sec_build *sec_descr)
Definition: resource.c:161
static void update_empty_exe(void)
Definition: resource.c:254
static const IMAGE_SECTION_HEADER sh_rsrc_2
Definition: resource.c:57
static void update_resources_none(void)
Definition: resource.c:285
struct _sec_build sec_build
static const IMAGE_SECTION_HEADER sh_rsrc_1
Definition: resource.c:50
static void update_resources_delete(void)
Definition: resource.c:297
static const IMAGE_SECTION_HEADER sh_rsrc_6
Definition: resource.c:85
static const IMAGE_SECTION_HEADER sh_rodata_1
Definition: resource.c:36
static void update_resources_bigdata(void)
Definition: resource.c:339
static const IMAGE_SECTION_HEADER sh_rsrc_5
Definition: resource.c:78
static const struct _sec_variants sec_variants[]
static const IMAGE_SECTION_HEADER sh_junk_2
Definition: resource.c:99
static const IMAGE_SECTION_HEADER sh_rsrc_3
Definition: resource.c:64
static const IMAGE_SECTION_HEADER sh_rodata_2
Definition: resource.c:43
static void test_find_resource(void)
Definition: resource.c:430
struct _sec_verify sec_verify
static void check_exe(const sec_verify *verify)
Definition: resource.c:359
#define min(a, b)
Definition: monoChain.cc:55
#define GENERIC_WRITE
Definition: nt_native.h:90
#define IMAGE_SUBSYSTEM_WINDOWS_CUI
Definition: ntimage.h:438
#define IMAGE_SCN_CNT_INITIALIZED_DATA
Definition: ntimage.h:231
#define IMAGE_SCN_MEM_READ
Definition: ntimage.h:240
#define IMAGE_NT_OPTIONAL_HDR_MAGIC
Definition: ntimage.h:387
#define IMAGE_FILE_EXECUTABLE_IMAGE
Definition: pedump.c:160
#define IMAGE_FILE_MACHINE_I386
Definition: pedump.c:174
#define RT_MENU
Definition: pedump.c:366
#define IMAGE_NT_SIGNATURE
Definition: pedump.c:93
#define RT_DIALOG
Definition: pedump.c:367
#define IMAGE_FILE_DLL
Definition: pedump.c:169
#define IMAGE_DOS_SIGNATURE
Definition: pedump.c:89
static unsigned int file_size
Definition: regtests2xml.c:47
#define test
Definition: rosglue.h:37
#define LANG_NEUTRAL
Definition: nls.h:22
#define MAKELANGID(p, s)
Definition: nls.h:15
#define LANG_GERMAN
Definition: nls.h:62
#define LANG_ENGLISH
Definition: nls.h:52
#define SUBLANG_NEUTRAL
Definition: nls.h:167
#define SUBLANG_DEFAULT
Definition: nls.h:168
#define LANG_FRENCH
Definition: nls.h:58
#define win_skip
Definition: test.h:160
#define memset(x, y, z)
Definition: compat.h:39
WORD SizeOfOptionalHeader
Definition: ntddk_ex.h:127
IMAGE_OPTIONAL_HEADER32 OptionalHeader
Definition: ntddk_ex.h:184
IMAGE_FILE_HEADER FileHeader
Definition: ntddk_ex.h:183
WORD MajorOperatingSystemVersion
Definition: ntddk_ex.h:160
IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]
Definition: ntddk_ex.h:178
DWORD PointerToRawData
Definition: pedump.c:290
union _IMAGE_SECTION_HEADER::@1556 Misc
BYTE Name[IMAGE_SIZEOF_SHORT_NAME]
Definition: pedump.c:281
const IMAGE_SECTION_HEADER * sect_in[max_sections]
Definition: resource.c:107
sec_verify chk_bigdata
Definition: resource.c:121
sec_build build
Definition: resource.c:120
sec_verify chk_none
Definition: resource.c:121
sec_verify chk_version
Definition: resource.c:121
sec_verify chk_delete
Definition: resource.c:121
int rsrc_section
Definition: resource.c:114
DWORD NumberOfIdEntries
Definition: resource.c:115
const IMAGE_SECTION_HEADER * sect_out[max_sections]
Definition: resource.c:112
DWORD NumberOfNamedEntries
Definition: resource.c:115
DWORD length
Definition: resource.c:113
Definition: fci.c:127
Definition: module.h:576
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define ERROR_RESOURCE_TYPE_NOT_FOUND
Definition: winerror.h:1120
#define ERROR_RESOURCE_LANG_NOT_FOUND
Definition: winerror.h:1122
#define ERROR_FILE_INVALID
Definition: winerror.h:585
#define ERROR_RESOURCE_NAME_NOT_FOUND
Definition: winerror.h:1121
#define IMAGE_FILE_RESOURCE_DIRECTORY
Definition: winnt_old.h:614
#define MAKEINTRESOURCEA(i)
Definition: winuser.h:581
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193