177 nt = (
void*) &
dos[1];
206 sec = (
void*) &
nt[1];
251 ok(
res ==
NULL,
"BeginUpdateResource should fail\n");
267 ok(
res !=
NULL,
"BeginUpdateResource failed\n");
276 ok(
r ==
FALSE,
"EndUpdateResource failed\n");
279 skip(
"Can't update resource in empty file\n" );
282 ok(
res ==
NULL,
"BeginUpdateResource failed\n");
291 ok(
res !=
NULL,
"BeginUpdateResource failed\n");
294 ok(
r,
"EndUpdateResource failed\n");
303 ok(
res !=
NULL,
"BeginUpdateResource failed\n");
306 ok(
r,
"EndUpdateResource failed\n");
313 char foo[] =
"red and white";
316 ok(
res !=
NULL,
"BeginUpdateResource failed\n");
325 ok(
r ==
FALSE,
"UpdateResource failed\n");
346 ok(
res !=
NULL,
"BeginUpdateResource succeeded\n");
356 ok(
r,
"EndUpdateResource failed\n");
380 ok(
dos !=
NULL,
"failed to map file\n");
387 sec = (
void*) &
nt[1];
406 ok(
dir->Characteristics == 0,
"Characteristics wrong\n");
408 "TimeDateStamp wrong %u\n",
dir->TimeDateStamp);
409 ok(
dir->MajorVersion == 4,
"MajorVersion wrong\n");
410 ok(
dir->MinorVersion == 0,
"MinorVersion wrong\n");
414 ok(
dir->NumberOfIdEntries == verify->
NumberOfIdEntries,
"NumberOfIdEntries should be %d instead of %d\n",
418 "VirtualAddress in optional header should be %d instead of %d\n",
435 ok( rsrc != 0,
"resource not found\n" );
438 ok( rsrc != 0,
"resource not found\n" );
441 ok( rsrc != 0,
"resource not found\n" );
445 ok( !rsrc,
"resource found\n" );
450 ok( !rsrc,
"resource found\n" );
456 ok( !rsrc,
"resource found\n" );
462 ok( !rsrc,
"resource found\n" );
475 win_skip(
"Resource calls are not implemented\n");
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define ERROR_CALL_NOT_IMPLEMENTED
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
DWORD WINAPI GetTickCount(VOID)
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
BOOL WINAPI UpdateResourceA(HANDLE hUpdate, LPCSTR lpType, LPCSTR lpName, WORD wLanguage, LPVOID lpData, DWORD cbData)
HANDLE WINAPI BeginUpdateResourceA(LPCSTR pFileName, BOOL bDeleteExistingResources)
HRSRC WINAPI FindResourceExW(HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD lang)
BOOL WINAPI EndUpdateResourceA(HANDLE hUpdate, BOOL fDiscard)
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
GLdouble GLdouble GLdouble r
GLuint GLsizei GLsizei * length
GLenum GLenum GLenum GLenum mapping
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
#define memcpy(s1, s2, n)
static void update_resources_version(void)
static void update_missing_exe(void)
static const IMAGE_SECTION_HEADER sh_rsrc_4
static const IMAGE_SECTION_HEADER sh_junk
static int build_exe(const sec_build *sec_descr)
static void update_empty_exe(void)
static const IMAGE_SECTION_HEADER sh_rsrc_2
static void update_resources_none(void)
struct _sec_build sec_build
static const IMAGE_SECTION_HEADER sh_rsrc_1
static void update_resources_delete(void)
static const IMAGE_SECTION_HEADER sh_rsrc_6
static const IMAGE_SECTION_HEADER sh_rodata_1
static void update_resources_bigdata(void)
static const IMAGE_SECTION_HEADER sh_rsrc_5
static const struct _sec_variants sec_variants[]
static const IMAGE_SECTION_HEADER sh_junk_2
static const IMAGE_SECTION_HEADER sh_rsrc_3
static const IMAGE_SECTION_HEADER sh_rodata_2
static void test_find_resource(void)
struct _sec_verify sec_verify
static void check_exe(const sec_verify *verify)
#define IMAGE_SUBSYSTEM_WINDOWS_CUI
#define IMAGE_SCN_CNT_INITIALIZED_DATA
#define IMAGE_SCN_MEM_READ
#define IMAGE_NT_OPTIONAL_HDR_MAGIC
#define IMAGE_FILE_EXECUTABLE_IMAGE
#define IMAGE_FILE_MACHINE_I386
#define IMAGE_NT_SIGNATURE
#define IMAGE_DOS_SIGNATURE
static unsigned int file_size
const IMAGE_SECTION_HEADER * sect_in[max_sections]
const IMAGE_SECTION_HEADER * sect_out[max_sections]
DWORD NumberOfNamedEntries
DWORD WINAPI GetLastError(void)
#define ERROR_RESOURCE_TYPE_NOT_FOUND
#define ERROR_RESOURCE_LANG_NOT_FOUND
#define ERROR_FILE_INVALID
#define ERROR_RESOURCE_NAME_NOT_FOUND
#define IMAGE_FILE_RESOURCE_DIRECTORY
#define MAKEINTRESOURCEA(i)
#define MAKEINTRESOURCEW(i)