Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b4bc2c36
Commit
b4bc2c36
authored
Jan 03, 2007
by
Mike McCormack
Committed by
Alexandre Julliard
Jan 04, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Don't try update version resources with invalid data, as it fails on Windows 2003.
parent
e4eac235
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
19 deletions
+3
-19
resource.c
dlls/kernel32/tests/resource.c
+3
-19
No files found.
dlls/kernel32/tests/resource.c
View file @
b4bc2c36
...
...
@@ -161,31 +161,15 @@ static void update_resources_delete( void )
todo_wine
ok
(
r
,
"EndUpdateResouce failed
\n
"
);
}
struct
verhdr
{
WORD
wLength
;
WORD
wValueLength
;
WORD
wType
;
WCHAR
key
[
1
];
};
void
update_resources_version
(
void
)
{
HANDLE
res
=
NULL
;
BOOL
r
;
struct
verhdr
hdr
;
char
foo
[]
=
"red and white"
;
res
=
BeginUpdateResource
(
filename
,
TRUE
);
ok
(
res
!=
NULL
,
"BeginUpdateResource failed
\n
"
);
memset
(
&
hdr
,
0
,
sizeof
hdr
);
r
=
UpdateResource
(
res
,
RT_VERSION
,
MAKEINTRESOURCE
(
VS_VERSION_INFO
),
MAKELANGID
(
LANG_ENGLISH
,
SUBLANG_NEUTRAL
),
&
hdr
,
sizeof
hdr
);
ok
(
r
,
"UpdateResouce failed
\n
"
);
r
=
UpdateResource
(
res
,
MAKEINTRESOURCE
(
0x1230
),
MAKEINTRESOURCE
(
0x4567
),
...
...
@@ -219,10 +203,10 @@ void check_empty( IMAGE_RESOURCE_DIRECTORY *dir )
todo_wine
ok
(
!
memcmp
(
pad
,
"PADDINGXXPADDING"
,
16
),
"padding wrong
\n
"
);
}
void
check_
version
(
IMAGE_RESOURCE_DIRECTORY
*
dir
)
void
check_
not_empty
(
IMAGE_RESOURCE_DIRECTORY
*
dir
)
{
ok
(
dir
->
NumberOfNamedEntries
==
0
,
"NumberOfNamedEntries should be 0 instead of %d
\n
"
,
dir
->
NumberOfNamedEntries
);
todo_wine
ok
(
dir
->
NumberOfIdEntries
==
2
,
"NumberOfIdEntries should be 2
instead of %d
\n
"
,
dir
->
NumberOfIdEntries
);
todo_wine
ok
(
dir
->
NumberOfIdEntries
==
1
,
"NumberOfIdEntries should be 1
instead of %d
\n
"
,
dir
->
NumberOfIdEntries
);
}
void
check_exe
(
res_check_func
fn
)
...
...
@@ -287,6 +271,6 @@ START_TEST(resource)
update_resources_delete
();
check_exe
(
check_empty
);
update_resources_version
();
check_exe
(
check_
version
);
check_exe
(
check_
not_empty
);
DeleteFile
(
filename
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment