Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4868e715
Commit
4868e715
authored
Mar 14, 2001
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 14, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return from GetFileVersionInfo(Size) if specified file found, but
VS_VERSION_INFO resource not.
parent
147ddfef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
12 deletions
+26
-12
info.c
dlls/version/info.c
+26
-12
No files found.
dlls/version/info.c
View file @
4868e715
...
...
@@ -263,7 +263,8 @@ void ConvertVersionInfo32To16( VS_VERSION_INFO_STRUCT32 *info32,
/***********************************************************************
* VERSION_GetFileVersionInfo_PE [internal]
*
* NOTE: returns size of the PE VERSION resource.
* NOTE: returns size of the PE VERSION resource or 0xFFFFFFFF
* in the case if file exists, but VERSION_INFO not found.
* FIXME: handle is not used.
*/
static
DWORD
WINAPI
VERSION_GetFileVersionInfo_PE
(
LPCSTR
filename
,
LPDWORD
handle
,
...
...
@@ -297,7 +298,7 @@ static DWORD WINAPI VERSION_GetFileVersionInfo_PE( LPCSTR filename, LPDWORD hand
{
WARN
(
"Could not find VS_VERSION_INFO in %s
\n
"
,
debugstr_a
(
filename
));
if
(
do_free_library
)
FreeLibrary
(
hModule
);
return
0
;
return
0
xFFFFFFFF
;
}
len
=
SizeofResource
(
hModule
,
hRsrc
);
hMem
=
LoadResource
(
hModule
,
hRsrc
);
...
...
@@ -305,7 +306,7 @@ static DWORD WINAPI VERSION_GetFileVersionInfo_PE( LPCSTR filename, LPDWORD hand
{
WARN
(
"Could not load VS_VERSION_INFO from %s
\n
"
,
debugstr_a
(
filename
));
if
(
do_free_library
)
FreeLibrary
(
hModule
);
return
0
;
return
0
xFFFFFFFF
;
}
buf
=
LockResource
(
hMem
);
...
...
@@ -315,7 +316,7 @@ static DWORD WINAPI VERSION_GetFileVersionInfo_PE( LPCSTR filename, LPDWORD hand
{
WARN
(
"vffi->dwSignature is 0x%08lx, but not 0x%08lx!
\n
"
,
vffi
->
dwSignature
,
VS_FFI_SIGNATURE
);
len
=
0
;
len
=
0xFFFFFFFF
;
goto
END
;
}
...
...
@@ -327,7 +328,7 @@ static DWORD WINAPI VERSION_GetFileVersionInfo_PE( LPCSTR filename, LPDWORD hand
if
(
datasize
>=
len
)
memcpy
(
data
,
buf
,
len
);
else
len
=
0
;
len
=
0
xFFFFFFFF
;
}
END:
FreeResource
(
hMem
);
...
...
@@ -339,7 +340,8 @@ END:
/***********************************************************************
* VERSION_GetFileVersionInfo_16 [internal]
*
* NOTE: returns size of the 16-bit VERSION resource.
* NOTE: returns size of the 16-bit VERSION resource or 0xFFFFFFFF
* in the case if file exists, but VERSION_INFO not found.
* FIXME: handle is not used.
*/
static
DWORD
WINAPI
VERSION_GetFileVersionInfo_16
(
LPCSTR
filename
,
LPDWORD
handle
,
...
...
@@ -373,7 +375,7 @@ static DWORD WINAPI VERSION_GetFileVersionInfo_16( LPCSTR filename, LPDWORD hand
{
WARN
(
"Could not find VS_VERSION_INFO in %s
\n
"
,
debugstr_a
(
filename
));
if
(
do_free_library
)
FreeLibrary16
(
hModule
);
return
0
;
return
0
xFFFFFFFF
;
}
len
=
SizeofResource16
(
hModule
,
hRsrc
);
hMem
=
LoadResource16
(
hModule
,
hRsrc
);
...
...
@@ -381,7 +383,7 @@ static DWORD WINAPI VERSION_GetFileVersionInfo_16( LPCSTR filename, LPDWORD hand
{
WARN
(
"Could not load VS_VERSION_INFO from %s
\n
"
,
debugstr_a
(
filename
));
if
(
do_free_library
)
FreeLibrary16
(
hModule
);
return
0
;
return
0
xFFFFFFFF
;
}
buf
=
LockResource16
(
hMem
);
...
...
@@ -394,7 +396,7 @@ static DWORD WINAPI VERSION_GetFileVersionInfo_16( LPCSTR filename, LPDWORD hand
{
WARN
(
"vffi->dwSignature is 0x%08lx, but not 0x%08lx!
\n
"
,
vffi
->
dwSignature
,
VS_FFI_SIGNATURE
);
len
=
0
;
len
=
0xFFFFFFFF
;
goto
END
;
}
...
...
@@ -406,7 +408,7 @@ static DWORD WINAPI VERSION_GetFileVersionInfo_16( LPCSTR filename, LPDWORD hand
if
(
datasize
>=
len
)
memcpy
(
data
,
buf
,
len
);
else
len
=
0
;
len
=
0
xFFFFFFFF
;
}
END:
FreeResource16
(
hMem
);
...
...
@@ -427,8 +429,12 @@ DWORD WINAPI GetFileVersionInfoSizeA( LPCSTR filename, LPDWORD handle )
TRACE
(
"(%s,%p)
\n
"
,
debugstr_a
(
filename
),
handle
);
len
=
VERSION_GetFileVersionInfo_PE
(
filename
,
handle
,
0
,
NULL
);
/* 0xFFFFFFFF means: file exists, but VERSION_INFO not found */
if
(
len
==
0xFFFFFFFF
)
return
0
;
if
(
len
)
return
len
;
len
=
VERSION_GetFileVersionInfo_16
(
filename
,
handle
,
0
,
NULL
);
/* 0xFFFFFFFF means: file exists, but VERSION_INFO not found */
if
(
len
==
0xFFFFFFFF
)
return
0
;
if
(
len
)
return
len
;
len
=
GetFileResourceSize16
(
filename
,
...
...
@@ -485,12 +491,20 @@ DWORD WINAPI GetFileVersionInfoSizeW( LPCWSTR filename, LPDWORD handle )
DWORD
WINAPI
GetFileVersionInfoA
(
LPCSTR
filename
,
DWORD
handle
,
DWORD
datasize
,
LPVOID
data
)
{
DWORD
len
;
TRACE
(
"(%s,%ld,size=%ld,data=%p)
\n
"
,
debugstr_a
(
filename
),
handle
,
datasize
,
data
);
if
(
VERSION_GetFileVersionInfo_PE
(
filename
,
&
handle
,
datasize
,
data
))
len
=
VERSION_GetFileVersionInfo_PE
(
filename
,
&
handle
,
datasize
,
data
);
/* 0xFFFFFFFF means: file exists, but VERSION_INFO not found */
if
(
len
==
0xFFFFFFFF
)
return
FALSE
;
if
(
len
)
goto
DO_CONVERT
;
if
(
VERSION_GetFileVersionInfo_16
(
filename
,
&
handle
,
datasize
,
data
))
len
=
VERSION_GetFileVersionInfo_16
(
filename
,
&
handle
,
datasize
,
data
);
/* 0xFFFFFFFF means: file exists, but VERSION_INFO not found */
if
(
len
==
0xFFFFFFFF
)
return
FALSE
;
if
(
len
)
goto
DO_CONVERT
;
if
(
!
GetFileResource16
(
filename
,
MAKEINTRESOURCEA
(
VS_FILE_INFO
),
...
...
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