2 * Unit test suite for resource functions.
4 * Copyright 2006 Mike McCormack
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.
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.
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
24 #include "wine/test.h"
26 static const char filename
[] = "test_.exe";
27 static const WCHAR filenameW
[] = {'t','e','s','t','_','.','e','x','e',0};
32 rva_rsrc_start
= page_size
* 3,
36 /* rodata @ [0x1000-0x3000) */
37 static const IMAGE_SECTION_HEADER sh_rodata_1
=
39 ".rodata", {2*page_size
}, page_size
, 2*page_size
, page_size
, 0, 0, 0, 0,
40 IMAGE_SCN_CNT_INITIALIZED_DATA
| IMAGE_SCN_MEM_READ
43 /* rodata @ [0x1000-0x2000) */
44 static const IMAGE_SECTION_HEADER sh_rodata_2
=
46 ".rodata", {page_size
}, page_size
, page_size
, page_size
, 0, 0, 0, 0,
47 IMAGE_SCN_CNT_INITIALIZED_DATA
| IMAGE_SCN_MEM_READ
50 /* rsrc @ [0x3000-0x4000) */
51 static const IMAGE_SECTION_HEADER sh_rsrc_1
=
53 ".rsrc\0\0", {page_size
}, rva_rsrc_start
, page_size
, rva_rsrc_start
, 0, 0, 0, 0,
54 IMAGE_SCN_CNT_INITIALIZED_DATA
| IMAGE_SCN_MEM_READ
57 /* rsrc @ [0x2000-0x4000) */
58 static const IMAGE_SECTION_HEADER sh_rsrc_2
=
60 ".rsrc\0\0", {2*page_size
}, rva_rsrc_start
-page_size
, 2*page_size
, rva_rsrc_start
-page_size
, 0, 0, 0, 0,
61 IMAGE_SCN_CNT_INITIALIZED_DATA
| IMAGE_SCN_MEM_READ
64 /* rsrc @ [0x2000-0x3000) */
65 static const IMAGE_SECTION_HEADER sh_rsrc_3
=
67 ".rsrc\0\0", {page_size
}, rva_rsrc_start
-page_size
, page_size
, rva_rsrc_start
-page_size
, 0, 0, 0, 0,
68 IMAGE_SCN_CNT_INITIALIZED_DATA
| IMAGE_SCN_MEM_READ
71 /* rsrc @ [0x3000-0x6000) */
72 static const IMAGE_SECTION_HEADER sh_rsrc_4
=
74 ".rsrc\0\0", {3*page_size
}, rva_rsrc_start
, 3*page_size
, rva_rsrc_start
, 0, 0, 0, 0,
75 IMAGE_SCN_CNT_INITIALIZED_DATA
| IMAGE_SCN_MEM_READ
78 /* rsrc @ [0x2000-0x5000) */
79 static const IMAGE_SECTION_HEADER sh_rsrc_5
=
81 ".rsrc\0\0", {3*page_size
}, 2*page_size
, 3*page_size
, 2*page_size
, 0, 0, 0, 0,
82 IMAGE_SCN_CNT_INITIALIZED_DATA
| IMAGE_SCN_MEM_READ
85 /* rsrc @ [0x3000-0x4000), small SizeOfRawData */
86 static const IMAGE_SECTION_HEADER sh_rsrc_6
=
88 ".rsrc\0\0", {page_size
}, rva_rsrc_start
, 8, rva_rsrc_start
, 0, 0, 0, 0,
89 IMAGE_SCN_CNT_INITIALIZED_DATA
| IMAGE_SCN_MEM_READ
92 /* reloc @ [0x4000-0x5000) */
93 static const IMAGE_SECTION_HEADER sh_junk
=
95 ".reloc\0", {page_size
}, 4*page_size
, page_size
, 4*page_size
, 0, 0, 0, 0,
96 IMAGE_SCN_CNT_INITIALIZED_DATA
| IMAGE_SCN_MEM_READ
99 /* reloc @ [0x6000-0x7000) */
100 static const IMAGE_SECTION_HEADER sh_junk_2
=
102 ".reloc\0", {page_size
}, 6*page_size
, page_size
, 6*page_size
, 0, 0, 0, 0,
103 IMAGE_SCN_CNT_INITIALIZED_DATA
| IMAGE_SCN_MEM_READ
106 typedef struct _sec_build
108 const IMAGE_SECTION_HEADER
*sect_in
[max_sections
];
111 typedef struct _sec_verify
113 const IMAGE_SECTION_HEADER
*sect_out
[max_sections
];
116 DWORD NumberOfNamedEntries
, NumberOfIdEntries
;
119 static const struct _sec_variants
122 sec_verify chk_none
, chk_delete
, chk_version
, chk_bigdata
;
125 /* .rsrc is the last section, data directory entry points to whole section */
127 {{&sh_rodata_1
, &sh_rsrc_1
, NULL
}},
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, 0},
130 {{&sh_rodata_1
, &sh_rsrc_1
, NULL
}, 4*page_size
, 1, 0, 1},
131 {{&sh_rodata_1
, &sh_rsrc_4
, NULL
}, 6*page_size
, 1, 0, 1}
133 /* .rsrc is the last section, data directory entry points to section end */
134 /* Vista+ - resources are moved to section start (trashing data that could be there), and section is trimmed */
135 /* NT4/2000/2003 - resources are moved to section start (trashing data that could be there); section isn't trimmed */
137 {{&sh_rodata_2
, &sh_rsrc_2
, NULL
}},
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, 0},
140 {{&sh_rodata_2
, &sh_rsrc_3
, NULL
}, 3*page_size
, 1, 0, 1},
141 {{&sh_rodata_2
, &sh_rsrc_5
, NULL
}, 5*page_size
, 1, 0, 1}
143 /* .rsrc is not the last section */
144 /* section is reused; sections after .rsrc are shifted to give space to rsrc (in-image offset and RVA!) */
146 {{&sh_rodata_1
, &sh_rsrc_1
, &sh_junk
}},
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, 0},
149 {{&sh_rodata_1
, &sh_rsrc_1
, &sh_junk
}, 5*page_size
, 1, 0, 1},
150 {{&sh_rodata_1
, &sh_rsrc_4
, &sh_junk_2
}, 7*page_size
, 1, 0, 1}
152 /* .rsrc is the last section, data directory entry points to whole section, file size is not aligned on FileAlign */
154 {{&sh_rodata_1
, &sh_rsrc_6
, NULL
}},
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, 0},
157 {{&sh_rodata_1
, &sh_rsrc_1
, NULL
}, 4*page_size
, 1, 0, 1},
158 {{&sh_rodata_1
, &sh_rsrc_4
, NULL
}, 6*page_size
, 1, 0, 1}
162 static int build_exe( const sec_build
* sec_descr
)
164 IMAGE_DOS_HEADER
*dos
;
165 IMAGE_NT_HEADERS
*nt
;
166 IMAGE_SECTION_HEADER
*sec
;
167 IMAGE_OPTIONAL_HEADER
*opt
;
169 DWORD written
, i
, file_size
;
170 BYTE page
[page_size
];
172 memset( page
, 0, sizeof page
);
175 dos
->e_magic
= IMAGE_DOS_SIGNATURE
;
176 dos
->e_lfanew
= sizeof *dos
;
178 nt
= (void*) &dos
[1];
180 nt
->Signature
= IMAGE_NT_SIGNATURE
;
181 nt
->FileHeader
.Machine
= IMAGE_FILE_MACHINE_I386
;
182 nt
->FileHeader
.NumberOfSections
= 0;
183 nt
->FileHeader
.SizeOfOptionalHeader
= sizeof nt
->OptionalHeader
;
184 nt
->FileHeader
.Characteristics
= IMAGE_FILE_EXECUTABLE_IMAGE
| IMAGE_FILE_DLL
;
186 opt
= &nt
->OptionalHeader
;
188 opt
->Magic
= IMAGE_NT_OPTIONAL_HDR_MAGIC
;
189 opt
->MajorLinkerVersion
= 1;
190 opt
->BaseOfCode
= 0x10;
191 opt
->ImageBase
= 0x10000000;
192 opt
->MajorOperatingSystemVersion
= 4;
193 opt
->MajorImageVersion
= 1;
194 opt
->MajorSubsystemVersion
= 4;
195 opt
->SizeOfHeaders
= sizeof *dos
+ sizeof *nt
+ sizeof *sec
* 2;
196 opt
->SizeOfImage
= page_size
;
197 opt
->Subsystem
= IMAGE_SUBSYSTEM_WINDOWS_CUI
;
199 /* if SectionAlignment and File alignment are not specified */
200 /* UpdateResource fails trying to create a huge temporary file */
201 opt
->SectionAlignment
= page_size
;
202 opt
->FileAlignment
= page_size
;
204 opt
->NumberOfRvaAndSizes
= IMAGE_FILE_RESOURCE_DIRECTORY
+ 1;
205 opt
->DataDirectory
[IMAGE_FILE_RESOURCE_DIRECTORY
].VirtualAddress
= rva_rsrc_start
;
206 opt
->DataDirectory
[IMAGE_FILE_RESOURCE_DIRECTORY
].Size
= page_size
;
208 sec
= (void*) &nt
[1];
211 for ( i
= 0; i
< max_sections
; i
++ )
212 if ( sec_descr
->sect_in
[i
] )
214 DWORD virt_end_of_section
= sec_descr
->sect_in
[i
]->Misc
.VirtualSize
+
215 sec_descr
->sect_in
[i
]->VirtualAddress
;
216 DWORD phys_end_of_section
= sec_descr
->sect_in
[i
]->SizeOfRawData
+
217 sec_descr
->sect_in
[i
]->PointerToRawData
;
218 memcpy( sec
+ nt
->FileHeader
.NumberOfSections
, sec_descr
->sect_in
[i
],
220 nt
->FileHeader
.NumberOfSections
++;
221 if ( opt
->SizeOfImage
< virt_end_of_section
)
222 opt
->SizeOfImage
= virt_end_of_section
;
223 if ( file_size
< phys_end_of_section
)
224 file_size
= phys_end_of_section
;
227 file
= CreateFileA(filename
, GENERIC_WRITE
, 0, NULL
, CREATE_ALWAYS
, 0, 0);
228 ok (file
!= INVALID_HANDLE_VALUE
, "failed to create file\n");
230 /* write out the header */
231 WriteFile( file
, page
, sizeof page
, &written
, NULL
);
233 /* write out zeroed pages for sections */
234 memset( page
, 0, sizeof page
);
235 for ( i
= page_size
; i
< file_size
; i
+= page_size
)
237 DWORD size
= min(page_size
, file_size
- i
);
238 WriteFile( file
, page
, size
, &written
, NULL
);
246 static void update_missing_exe( void )
250 SetLastError(0xdeadbeef);
251 res
= BeginUpdateResourceA( filename
, TRUE
);
252 GLE
= GetLastError();
253 ok( res
== NULL
, "BeginUpdateResource should fail\n");
256 static void update_empty_exe( void )
258 HANDLE file
, res
, test
;
261 file
= CreateFileA(filename
, GENERIC_WRITE
, 0, NULL
, CREATE_ALWAYS
, 0, 0);
262 ok (file
!= INVALID_HANDLE_VALUE
, "failed to create file\n");
266 res
= BeginUpdateResourceA( filename
, TRUE
);
267 if ( res
!= NULL
|| GetLastError() != ERROR_FILE_INVALID
)
269 ok( res
!= NULL
, "BeginUpdateResource failed\n");
271 /* check if it's possible to open the file now */
272 test
= CreateFileA(filename
, GENERIC_READ
, 0, NULL
, OPEN_EXISTING
, 0, 0);
273 ok (test
!= INVALID_HANDLE_VALUE
, "failed to create file\n");
277 r
= EndUpdateResourceA( res
, FALSE
);
278 ok( r
== FALSE
, "EndUpdateResource failed\n");
281 skip( "Can't update resource in empty file\n" );
283 res
= BeginUpdateResourceA( filename
, FALSE
);
284 ok( res
== NULL
, "BeginUpdateResource failed\n");
287 static void update_resources_none( void )
292 res
= BeginUpdateResourceA( filename
, FALSE
);
293 ok( res
!= NULL
, "BeginUpdateResource failed\n");
295 r
= EndUpdateResourceA( res
, FALSE
);
296 ok( r
, "EndUpdateResource failed\n");
299 static void update_resources_delete( void )
304 res
= BeginUpdateResourceA( filename
, TRUE
);
305 ok( res
!= NULL
, "BeginUpdateResource failed\n");
307 r
= EndUpdateResourceA( res
, FALSE
);
308 ok( r
, "EndUpdateResource failed\n");
311 static void update_resources_version( void )
315 char foo
[] = "red and white";
317 res
= BeginUpdateResourceA( filename
, TRUE
);
318 ok( res
!= NULL
, "BeginUpdateResource failed\n");
320 if (0) /* this causes subsequent tests to fail on Vista */
322 r
= UpdateResourceA( res
,
323 MAKEINTRESOURCEA(0x1230),
324 MAKEINTRESOURCEA(0x4567),
327 ok( r
== FALSE
, "UpdateResource failed\n");
330 r
= UpdateResourceA( res
,
331 MAKEINTRESOURCEA(0x1230),
332 MAKEINTRESOURCEA(0x4567),
335 ok( r
== TRUE
, "UpdateResource failed: %ld\n", GetLastError());
337 r
= EndUpdateResourceA( res
, FALSE
);
338 ok( r
, "EndUpdateResource failed: %ld\n", GetLastError());
341 static void update_resources_bigdata( void )
345 char foo
[2*page_size
] = "foobar";
347 res
= BeginUpdateResourceA( filename
, TRUE
);
348 ok( res
!= NULL
, "BeginUpdateResource succeeded\n");
350 r
= UpdateResourceA( res
,
351 MAKEINTRESOURCEA(0x3012),
352 MAKEINTRESOURCEA(0x5647),
355 ok( r
== TRUE
, "UpdateResource failed: %ld\n", GetLastError());
357 r
= EndUpdateResourceA( res
, FALSE
);
358 ok( r
, "EndUpdateResource failed\n");
361 static void update_resources_name( void )
363 char foo
[] = "resource data", res_name
[] = "name", res_type
[] = "type";
369 res
= BeginUpdateResourceA( filename
, TRUE
);
370 ok( res
!= NULL
, "BeginUpdateResource failed: %lu\n", GetLastError() );
373 ret
= UpdateResourceA( res
, res_type
, res_name
, MAKELANGID(LANG_NEUTRAL
, SUBLANG_NEUTRAL
), foo
, sizeof(foo
) );
374 ok( ret
== TRUE
, "UpdateResource failed: %lu\n", GetLastError() );
376 ret
= EndUpdateResourceA( res
, FALSE
);
377 ok( ret
, "EndUpdateResource failed: %lu\n", GetLastError() );
380 module
= LoadLibraryExA( filename
, NULL
, LOAD_LIBRARY_AS_DATAFILE
);
381 ok( module
!= NULL
, "LoadLibraryEx failed: %lu\n", GetLastError() );
382 if ( !module
) return;
384 rsrc
= FindResourceA( module
, res_name
, res_type
);
386 broken( GetLastError() == ERROR_RESOURCE_TYPE_NOT_FOUND
) /* win2008 */,
387 "FindResource failed: %lu\n", GetLastError() );
389 ret
= FreeLibrary(module
);
390 ok( ret
, "FreeLibrary failed: %lu\n", GetLastError() );
393 static void check_exe( const sec_verify
*verify
)
396 IMAGE_DOS_HEADER
*dos
;
397 IMAGE_NT_HEADERS
*nt
;
398 IMAGE_OPTIONAL_HEADER
*opt
;
399 IMAGE_SECTION_HEADER
*sec
;
400 IMAGE_RESOURCE_DIRECTORY
*dir
;
401 HANDLE file
, mapping
;
402 DWORD length
, sec_count
= 0;
404 file
= CreateFileA(filename
, GENERIC_READ
, 0, NULL
, OPEN_EXISTING
, 0, 0);
405 ok (file
!= INVALID_HANDLE_VALUE
, "failed to create file (%ld)\n", GetLastError());
407 length
= GetFileSize( file
, NULL
);
408 ok( length
>= verify
->length
, "file size wrong\n");
410 mapping
= CreateFileMappingA( file
, NULL
, PAGE_READONLY
, 0, 0, NULL
);
411 ok (mapping
!= NULL
, "failed to create file\n");
413 dos
= MapViewOfFile( mapping
, FILE_MAP_READ
, 0, 0, length
);
414 ok( dos
!= NULL
, "failed to map file\n");
419 nt
= (void*) ((BYTE
*) dos
+ dos
->e_lfanew
);
420 opt
= &nt
->OptionalHeader
;
421 sec
= (void*) &nt
[1];
423 for(i
= 0; i
< max_sections
; i
++)
424 if (verify
->sect_out
[i
])
426 ok( !memcmp(&verify
->sect_out
[i
]->Name
, &sec
[sec_count
].Name
, 8), "section %ld name wrong\n", sec_count
);
427 ok( verify
->sect_out
[i
]->VirtualAddress
== sec
[sec_count
].VirtualAddress
, "section %ld vaddr wrong\n", sec_count
);
428 ok( verify
->sect_out
[i
]->SizeOfRawData
<= sec
[sec_count
].SizeOfRawData
, "section %ld SizeOfRawData wrong (%ld vs %ld)\n", sec_count
, verify
->sect_out
[i
]->SizeOfRawData
,sec
[sec_count
].SizeOfRawData
);
429 ok( verify
->sect_out
[i
]->PointerToRawData
== sec
[sec_count
].PointerToRawData
, "section %ld PointerToRawData wrong\n", sec_count
);
430 ok( verify
->sect_out
[i
]->Characteristics
== sec
[sec_count
].Characteristics
, "section %ld characteristics wrong\n", sec_count
);
434 ok( nt
->FileHeader
.NumberOfSections
== sec_count
, "number of sections wrong\n" );
436 if (verify
->rsrc_section
>= 0 && verify
->rsrc_section
< nt
->FileHeader
.NumberOfSections
)
438 dir
= (void*) ((BYTE
*) dos
+ sec
[verify
->rsrc_section
].VirtualAddress
);
440 ok( dir
->Characteristics
== 0, "Characteristics wrong\n");
441 ok( dir
->TimeDateStamp
== 0, "TimeDateStamp wrong %lu\n", dir
->TimeDateStamp
);
442 ok( dir
->MajorVersion
== 4, "MajorVersion wrong\n");
443 ok( dir
->MinorVersion
== 0, "MinorVersion wrong\n");
445 ok( dir
->NumberOfNamedEntries
== verify
->NumberOfNamedEntries
, "NumberOfNamedEntries should be %ld instead of %d\n",
446 verify
->NumberOfNamedEntries
, dir
->NumberOfNamedEntries
);
447 ok( dir
->NumberOfIdEntries
== verify
->NumberOfIdEntries
, "NumberOfIdEntries should be %ld instead of %d\n",
448 verify
->NumberOfIdEntries
, dir
->NumberOfIdEntries
);
450 ok(opt
->DataDirectory
[IMAGE_FILE_RESOURCE_DIRECTORY
].VirtualAddress
== sec
[verify
->rsrc_section
].VirtualAddress
,
451 "VirtualAddress in optional header should be %ld instead of %ld\n",
452 sec
[verify
->rsrc_section
].VirtualAddress
, opt
->DataDirectory
[IMAGE_FILE_RESOURCE_DIRECTORY
].VirtualAddress
);
456 UnmapViewOfFile( dos
);
458 CloseHandle( mapping
);
463 static void test_find_resource(void)
467 rsrc
= FindResourceW( GetModuleHandleW(NULL
), MAKEINTRESOURCEW(1), (LPCWSTR
)RT_MENU
);
468 ok( rsrc
!= 0, "resource not found\n" );
469 rsrc
= FindResourceExW( GetModuleHandleW(NULL
), (LPCWSTR
)RT_MENU
, MAKEINTRESOURCEW(1),
470 MAKELANGID( LANG_NEUTRAL
, SUBLANG_NEUTRAL
));
471 ok( rsrc
!= 0, "resource not found\n" );
472 rsrc
= FindResourceExW( GetModuleHandleW(NULL
), (LPCWSTR
)RT_MENU
, MAKEINTRESOURCEW(1),
473 MAKELANGID( LANG_GERMAN
, SUBLANG_DEFAULT
));
474 ok( rsrc
!= 0, "resource not found\n" );
476 SetLastError( 0xdeadbeef );
477 rsrc
= FindResourceW( GetModuleHandleW(NULL
), MAKEINTRESOURCEW(1), (LPCWSTR
)RT_DIALOG
);
478 ok( !rsrc
, "resource found\n" );
479 ok( GetLastError() == ERROR_RESOURCE_TYPE_NOT_FOUND
, "wrong error %lu\n", GetLastError() );
481 SetLastError( 0xdeadbeef );
482 rsrc
= FindResourceW( GetModuleHandleW(NULL
), MAKEINTRESOURCEW(2), (LPCWSTR
)RT_MENU
);
483 ok( !rsrc
, "resource found\n" );
484 ok( GetLastError() == ERROR_RESOURCE_NAME_NOT_FOUND
, "wrong error %lu\n", GetLastError() );
486 SetLastError( 0xdeadbeef );
487 rsrc
= FindResourceExW( GetModuleHandleW(NULL
), (LPCWSTR
)RT_MENU
, MAKEINTRESOURCEW(1),
488 MAKELANGID( LANG_ENGLISH
, SUBLANG_DEFAULT
) );
489 ok( !rsrc
, "resource found\n" );
490 ok( GetLastError() == ERROR_RESOURCE_LANG_NOT_FOUND
, "wrong error %lu\n", GetLastError() );
492 SetLastError( 0xdeadbeef );
493 rsrc
= FindResourceExW( GetModuleHandleW(NULL
), (LPCWSTR
)RT_MENU
, MAKEINTRESOURCEW(1),
494 MAKELANGID( LANG_FRENCH
, SUBLANG_DEFAULT
) );
495 ok( !rsrc
, "resource found\n" );
496 ok( GetLastError() == ERROR_RESOURCE_LANG_NOT_FOUND
, "wrong error %lu\n", GetLastError() );
505 static void test_internal_structure(void)
508 QUEUEDUPDATES
*res_data
;
509 WCHAR
*res_filenameW
;
511 res
= BeginUpdateResourceW( filenameW
, FALSE
);
512 ok( res
!= NULL
, "BeginUpdateResourceW failed\n" );
513 res_data
= GlobalLock(res
);
514 ok( res_data
!= NULL
, "GlobalLock failed\n" );
515 res_filenameW
= GlobalLock( res_data
->pFileName
);
516 ok( res_filenameW
!= NULL
, "GlobalLock for res_filenameW failed\n" );
517 ok( !lstrcmpW( res_filenameW
, filenameW
), "Filename fields do not match\n" );
518 ok( GlobalUnlock( res_filenameW
), "GlobalUnlock res_filenamed failed\n" );
519 ok( GlobalUnlock( res_data
), "GlobalUnlock res_data failed\n" );
520 ok( EndUpdateResourceW( res
, TRUE
), "EndUpdateResourceW failed\n");
527 DeleteFileA( filename
);
528 update_missing_exe();
530 if (GLE
== ERROR_CALL_NOT_IMPLEMENTED
)
532 win_skip("Resource calls are not implemented\n");
538 for(i
=0; i
< ARRAY_SIZE(sec_variants
); i
++)
540 const struct _sec_variants
*sec
= &sec_variants
[i
];
541 build_exe( &sec
->build
);
542 test_internal_structure();
543 update_resources_none();
544 check_exe( &sec
->chk_none
);
545 update_resources_delete();
546 check_exe( &sec
->chk_delete
);
547 update_resources_version();
548 check_exe( &sec
->chk_version
);
549 update_resources_bigdata();
550 check_exe( &sec
->chk_bigdata
);
551 update_resources_name();
552 DeleteFileA( filename
);
554 test_find_resource();