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
e84c42d9
Commit
e84c42d9
authored
Oct 01, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
version: Use the find_resource function instead of the 16-bit entry points to…
version: Use the find_resource function instead of the 16-bit entry points to load 16-bit resources.
parent
e04b9984
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
15 deletions
+25
-15
info.c
dlls/version/info.c
+25
-15
No files found.
dlls/version/info.c
View file @
e84c42d9
...
...
@@ -30,6 +30,7 @@
#include "winbase.h"
#include "winver.h"
#include "winternl.h"
#include "lzexpand.h"
#include "wine/winuser16.h"
#include "wine/unicode.h"
#include "winerror.h"
...
...
@@ -37,6 +38,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ver
);
extern
DWORD
find_resource
(
HFILE
lzfd
,
LPCSTR
type
,
LPCSTR
id
,
DWORD
*
reslen
,
DWORD
*
offset
);
/******************************************************************************
*
* This function will print via standard TRACE, debug info regarding
...
...
@@ -344,23 +347,30 @@ static DWORD VERSION_GetFileVersionInfo_16( LPCSTR filename, DWORD datasize, LPV
}
/* first try without loading a 16-bit module */
if
(
is_builtin
)
len
=
0
;
else
len
=
GetFileResourceSize16
(
filename
,
MAKEINTRESOURCEA
(
VS_FILE_INFO
),
MAKEINTRESOURCEA
(
VS_VERSION_INFO
),
&
offset
);
if
(
len
)
{
if
(
!
data
)
return
len
;
len
=
GetFileResource16
(
filename
,
MAKEINTRESOURCEA
(
VS_FILE_INFO
),
MAKEINTRESOURCEA
(
VS_VERSION_INFO
),
offset
,
datasize
,
data
);
len
=
0
;
if
(
!
is_builtin
)
{
OFSTRUCT
ofs
;
HFILE
lzfd
=
LZOpenFileA
(
(
LPSTR
)
filename
,
&
ofs
,
OF_READ
);
if
(
lzfd
>=
0
)
{
if
(
find_resource
(
lzfd
,
MAKEINTRESOURCEA
(
VS_FILE_INFO
),
MAKEINTRESOURCEA
(
VS_VERSION_INFO
),
&
len
,
&
offset
))
{
if
(
data
)
{
LZSeek
(
lzfd
,
offset
,
0
/* SEEK_SET */
);
len
=
LZRead
(
lzfd
,
data
,
min
(
len
,
datasize
)
);
}
}
LZClose
(
lzfd
);
}
if
(
len
)
{
if
(
!
data
)
return
len
;
vffi
=
(
VS_FIXEDFILEINFO
*
)
VersionInfo16_Value
(
(
VS_VERSION_INFO_STRUCT16
*
)
data
);
if
(
vffi
->
dwSignature
==
VS_FFI_SIGNATURE
)
...
...
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