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
ab91c216
Commit
ab91c216
authored
May 31, 2007
by
Francois Gouget
Committed by
Alexandre Julliard
May 31, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
version: Fix the VerQueryValueA/W() prototypes.
parent
d252693a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
17 deletions
+23
-17
info.c
dlls/version/info.c
+21
-15
winver.h
include/winver.h
+2
-2
No files found.
dlls/version/info.c
View file @
ab91c216
...
@@ -206,7 +206,7 @@ typedef struct
...
@@ -206,7 +206,7 @@ typedef struct
}
VS_VERSION_INFO_STRUCT32
;
}
VS_VERSION_INFO_STRUCT32
;
#define VersionInfoIs16( ver ) \
#define VersionInfoIs16( ver ) \
( ((VS_VERSION_INFO_STRUCT16 *)ver)->szKey[0] >= ' ' )
( ((
const
VS_VERSION_INFO_STRUCT16 *)ver)->szKey[0] >= ' ' )
#define DWORD_ALIGN( base, ptr ) \
#define DWORD_ALIGN( base, ptr ) \
( (LPBYTE)(base) + ((((LPBYTE)(ptr) - (LPBYTE)(base)) + 3) & ~3) )
( (LPBYTE)(base) + ((((LPBYTE)(ptr) - (LPBYTE)(base)) + 3) & ~3) )
...
@@ -217,10 +217,10 @@ typedef struct
...
@@ -217,10 +217,10 @@ typedef struct
DWORD_ALIGN( (ver), (ver)->szKey + strlenW((ver)->szKey) + 1 )
DWORD_ALIGN( (ver), (ver)->szKey + strlenW((ver)->szKey) + 1 )
#define VersionInfo16_Children( ver ) \
#define VersionInfo16_Children( ver ) \
(VS_VERSION_INFO_STRUCT16 *)( VersionInfo16_Value( ver ) + \
(
const
VS_VERSION_INFO_STRUCT16 *)( VersionInfo16_Value( ver ) + \
( ( (ver)->wValueLength + 3 ) & ~3 ) )
( ( (ver)->wValueLength + 3 ) & ~3 ) )
#define VersionInfo32_Children( ver ) \
#define VersionInfo32_Children( ver ) \
(VS_VERSION_INFO_STRUCT32 *)( VersionInfo32_Value( ver ) + \
(
const
VS_VERSION_INFO_STRUCT32 *)( VersionInfo32_Value( ver ) + \
( ( (ver)->wValueLength * \
( ( (ver)->wValueLength * \
((ver)->wType? 2 : 1) + 3 ) & ~3 ) )
((ver)->wType? 2 : 1) + 3 ) & ~3 ) )
...
@@ -632,10 +632,10 @@ BOOL WINAPI GetFileVersionInfoA( LPCSTR filename, DWORD handle,
...
@@ -632,10 +632,10 @@ BOOL WINAPI GetFileVersionInfoA( LPCSTR filename, DWORD handle,
/***********************************************************************
/***********************************************************************
* VersionInfo16_FindChild [internal]
* VersionInfo16_FindChild [internal]
*/
*/
static
VS_VERSION_INFO_STRUCT16
*
VersionInfo16_FindChild
(
VS_VERSION_INFO_STRUCT16
*
info
,
static
const
VS_VERSION_INFO_STRUCT16
*
VersionInfo16_FindChild
(
const
VS_VERSION_INFO_STRUCT16
*
info
,
LPCSTR
szKey
,
UINT
cbKey
)
LPCSTR
szKey
,
UINT
cbKey
)
{
{
VS_VERSION_INFO_STRUCT16
*
child
=
VersionInfo16_Children
(
info
);
const
VS_VERSION_INFO_STRUCT16
*
child
=
VersionInfo16_Children
(
info
);
while
((
char
*
)
child
<
(
char
*
)
info
+
info
->
wLength
)
while
((
char
*
)
child
<
(
char
*
)
info
+
info
->
wLength
)
{
{
...
@@ -652,10 +652,10 @@ static VS_VERSION_INFO_STRUCT16 *VersionInfo16_FindChild( VS_VERSION_INFO_STRUCT
...
@@ -652,10 +652,10 @@ static VS_VERSION_INFO_STRUCT16 *VersionInfo16_FindChild( VS_VERSION_INFO_STRUCT
/***********************************************************************
/***********************************************************************
* VersionInfo32_FindChild [internal]
* VersionInfo32_FindChild [internal]
*/
*/
static
VS_VERSION_INFO_STRUCT32
*
VersionInfo32_FindChild
(
VS_VERSION_INFO_STRUCT32
*
info
,
static
const
VS_VERSION_INFO_STRUCT32
*
VersionInfo32_FindChild
(
const
VS_VERSION_INFO_STRUCT32
*
info
,
LPCWSTR
szKey
,
UINT
cbKey
)
LPCWSTR
szKey
,
UINT
cbKey
)
{
{
VS_VERSION_INFO_STRUCT32
*
child
=
VersionInfo32_Children
(
info
);
const
VS_VERSION_INFO_STRUCT32
*
child
=
VersionInfo32_Children
(
info
);
while
((
char
*
)
child
<
(
char
*
)
info
+
info
->
wLength
)
while
((
char
*
)
child
<
(
char
*
)
info
+
info
->
wLength
)
{
{
...
@@ -673,7 +673,7 @@ static VS_VERSION_INFO_STRUCT32 *VersionInfo32_FindChild( VS_VERSION_INFO_STRUCT
...
@@ -673,7 +673,7 @@ static VS_VERSION_INFO_STRUCT32 *VersionInfo32_FindChild( VS_VERSION_INFO_STRUCT
*
*
* Gets a value from a 16-bit NE resource
* Gets a value from a 16-bit NE resource
*/
*/
static
BOOL
WINAPI
VersionInfo16_QueryValue
(
VS_VERSION_INFO_STRUCT16
*
info
,
LPCSTR
lpSubBlock
,
static
BOOL
WINAPI
VersionInfo16_QueryValue
(
const
VS_VERSION_INFO_STRUCT16
*
info
,
LPCSTR
lpSubBlock
,
LPVOID
*
lplpBuffer
,
UINT
*
puLen
)
LPVOID
*
lplpBuffer
,
UINT
*
puLen
)
{
{
while
(
*
lpSubBlock
)
while
(
*
lpSubBlock
)
...
@@ -717,7 +717,7 @@ static BOOL WINAPI VersionInfo16_QueryValue( VS_VERSION_INFO_STRUCT16 *info, LPC
...
@@ -717,7 +717,7 @@ static BOOL WINAPI VersionInfo16_QueryValue( VS_VERSION_INFO_STRUCT16 *info, LPC
*
*
* Gets a value from a 32-bit PE resource
* Gets a value from a 32-bit PE resource
*/
*/
static
BOOL
WINAPI
VersionInfo32_QueryValue
(
VS_VERSION_INFO_STRUCT32
*
info
,
LPCWSTR
lpSubBlock
,
static
BOOL
WINAPI
VersionInfo32_QueryValue
(
const
VS_VERSION_INFO_STRUCT32
*
info
,
LPCWSTR
lpSubBlock
,
LPVOID
*
lplpBuffer
,
UINT
*
puLen
)
LPVOID
*
lplpBuffer
,
UINT
*
puLen
)
{
{
TRACE
(
"lpSubBlock : (%s)
\n
"
,
debugstr_w
(
lpSubBlock
));
TRACE
(
"lpSubBlock : (%s)
\n
"
,
debugstr_w
(
lpSubBlock
));
...
@@ -761,12 +761,12 @@ static BOOL WINAPI VersionInfo32_QueryValue( VS_VERSION_INFO_STRUCT32 *info, LPC
...
@@ -761,12 +761,12 @@ static BOOL WINAPI VersionInfo32_QueryValue( VS_VERSION_INFO_STRUCT32 *info, LPC
/***********************************************************************
/***********************************************************************
* VerQueryValueA [VERSION.@]
* VerQueryValueA [VERSION.@]
*/
*/
BOOL
WINAPI
VerQueryValueA
(
LPVOID
pBlock
,
LPCSTR
lpSubBlock
,
BOOL
WINAPI
VerQueryValueA
(
LP
C
VOID
pBlock
,
LPCSTR
lpSubBlock
,
LPVOID
*
lplpBuffer
,
UINT
*
puLen
)
LPVOID
*
lplpBuffer
,
UINT
*
puLen
)
{
{
static
const
char
rootA
[]
=
"
\\
"
;
static
const
char
rootA
[]
=
"
\\
"
;
static
const
char
varfileinfoA
[]
=
"
\\
VarFileInfo
\\
Translation"
;
static
const
char
varfileinfoA
[]
=
"
\\
VarFileInfo
\\
Translation"
;
VS_VERSION_INFO_STRUCT16
*
info
=
(
VS_VERSION_INFO_STRUCT16
*
)
pBlock
;
const
VS_VERSION_INFO_STRUCT16
*
info
=
(
const
VS_VERSION_INFO_STRUCT16
*
)
pBlock
;
TRACE
(
"(%p,%s,%p,%p)
\n
"
,
TRACE
(
"(%p,%s,%p,%p)
\n
"
,
pBlock
,
debugstr_a
(
lpSubBlock
),
lplpBuffer
,
puLen
);
pBlock
,
debugstr_a
(
lpSubBlock
),
lplpBuffer
,
puLen
);
...
@@ -791,8 +791,11 @@ BOOL WINAPI VerQueryValueA( LPVOID pBlock, LPCSTR lpSubBlock,
...
@@ -791,8 +791,11 @@ BOOL WINAPI VerQueryValueA( LPVOID pBlock, LPCSTR lpSubBlock,
if
(
ret
&&
strcasecmp
(
lpSubBlock
,
rootA
)
&&
strcasecmp
(
lpSubBlock
,
varfileinfoA
))
if
(
ret
&&
strcasecmp
(
lpSubBlock
,
rootA
)
&&
strcasecmp
(
lpSubBlock
,
varfileinfoA
))
{
{
/* Set lpBuffer so it points to the 'empty' area where we store
* the converted strings
*/
LPSTR
lpBufferA
=
(
LPSTR
)
pBlock
+
info
->
wLength
+
4
;
LPSTR
lpBufferA
=
(
LPSTR
)
pBlock
+
info
->
wLength
+
4
;
DWORD
pos
=
(
LP
STR
)
*
lplpBuffer
-
(
LP
STR
)
pBlock
;
DWORD
pos
=
(
LP
CSTR
)
*
lplpBuffer
-
(
LPC
STR
)
pBlock
;
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPCWSTR
)
*
lplpBuffer
,
-
1
,
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPCWSTR
)
*
lplpBuffer
,
-
1
,
lpBufferA
+
pos
,
info
->
wLength
-
pos
,
NULL
,
NULL
);
lpBufferA
+
pos
,
info
->
wLength
-
pos
,
NULL
,
NULL
);
...
@@ -808,14 +811,14 @@ BOOL WINAPI VerQueryValueA( LPVOID pBlock, LPCSTR lpSubBlock,
...
@@ -808,14 +811,14 @@ BOOL WINAPI VerQueryValueA( LPVOID pBlock, LPCSTR lpSubBlock,
/***********************************************************************
/***********************************************************************
* VerQueryValueW [VERSION.@]
* VerQueryValueW [VERSION.@]
*/
*/
BOOL
WINAPI
VerQueryValueW
(
LPVOID
pBlock
,
LPCWSTR
lpSubBlock
,
BOOL
WINAPI
VerQueryValueW
(
LP
C
VOID
pBlock
,
LPCWSTR
lpSubBlock
,
LPVOID
*
lplpBuffer
,
UINT
*
puLen
)
LPVOID
*
lplpBuffer
,
UINT
*
puLen
)
{
{
static
const
WCHAR
rootW
[]
=
{
'\\'
,
0
};
static
const
WCHAR
rootW
[]
=
{
'\\'
,
0
};
static
const
WCHAR
varfileinfoW
[]
=
{
'\\'
,
'V'
,
'a'
,
'r'
,
'F'
,
'i'
,
'l'
,
'e'
,
'I'
,
'n'
,
'f'
,
'o'
,
static
const
WCHAR
varfileinfoW
[]
=
{
'\\'
,
'V'
,
'a'
,
'r'
,
'F'
,
'i'
,
'l'
,
'e'
,
'I'
,
'n'
,
'f'
,
'o'
,
'\\'
,
'T'
,
'r'
,
'a'
,
'n'
,
's'
,
'l'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
'\\'
,
'T'
,
'r'
,
'a'
,
'n'
,
's'
,
'l'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
VS_VERSION_INFO_STRUCT32
*
info
=
(
VS_VERSION_INFO_STRUCT32
*
)
pBlock
;
const
VS_VERSION_INFO_STRUCT32
*
info
=
(
const
VS_VERSION_INFO_STRUCT32
*
)
pBlock
;
TRACE
(
"(%p,%s,%p,%p)
\n
"
,
TRACE
(
"(%p,%s,%p,%p)
\n
"
,
pBlock
,
debugstr_w
(
lpSubBlock
),
lplpBuffer
,
puLen
);
pBlock
,
debugstr_w
(
lpSubBlock
),
lplpBuffer
,
puLen
);
...
@@ -840,8 +843,11 @@ BOOL WINAPI VerQueryValueW( LPVOID pBlock, LPCWSTR lpSubBlock,
...
@@ -840,8 +843,11 @@ BOOL WINAPI VerQueryValueW( LPVOID pBlock, LPCWSTR lpSubBlock,
if
(
ret
&&
strcmpiW
(
lpSubBlock
,
rootW
)
&&
strcmpiW
(
lpSubBlock
,
varfileinfoW
))
if
(
ret
&&
strcmpiW
(
lpSubBlock
,
rootW
)
&&
strcmpiW
(
lpSubBlock
,
varfileinfoW
))
{
{
/* Set lpBuffer so it points to the 'empty' area where we store
* the converted strings
*/
LPWSTR
lpBufferW
=
(
LPWSTR
)((
LPSTR
)
pBlock
+
info
->
wLength
);
LPWSTR
lpBufferW
=
(
LPWSTR
)((
LPSTR
)
pBlock
+
info
->
wLength
);
DWORD
pos
=
(
LP
STR
)
*
lplpBuffer
-
(
LP
STR
)
pBlock
;
DWORD
pos
=
(
LP
CSTR
)
*
lplpBuffer
-
(
LPC
STR
)
pBlock
;
DWORD
max
=
(
info
->
wLength
-
sizeof
(
VS_FIXEDFILEINFO
))
*
4
-
info
->
wLength
;
DWORD
max
=
(
info
->
wLength
-
sizeof
(
VS_FIXEDFILEINFO
))
*
4
-
info
->
wLength
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)
*
lplpBuffer
,
-
1
,
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)
*
lplpBuffer
,
-
1
,
...
...
include/winver.h
View file @
ab91c216
...
@@ -159,8 +159,8 @@ DWORD WINAPI VerInstallFileW(UINT,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWST
...
@@ -159,8 +159,8 @@ DWORD WINAPI VerInstallFileW(UINT,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWSTR,LPWST
DWORD
WINAPI
VerLanguageNameA
(
UINT
,
LPSTR
,
UINT
);
DWORD
WINAPI
VerLanguageNameA
(
UINT
,
LPSTR
,
UINT
);
DWORD
WINAPI
VerLanguageNameW
(
UINT
,
LPWSTR
,
UINT
);
DWORD
WINAPI
VerLanguageNameW
(
UINT
,
LPWSTR
,
UINT
);
#define VerLanguageName WINELIB_NAME_AW(VerLanguageName)
#define VerLanguageName WINELIB_NAME_AW(VerLanguageName)
BOOL
WINAPI
VerQueryValueA
(
LPVOID
,
LPCSTR
,
LPVOID
*
,
UINT
*
);
BOOL
WINAPI
VerQueryValueA
(
LP
C
VOID
,
LPCSTR
,
LPVOID
*
,
UINT
*
);
BOOL
WINAPI
VerQueryValueW
(
LPVOID
,
LPCWSTR
,
LPVOID
*
,
UINT
*
);
BOOL
WINAPI
VerQueryValueW
(
LP
C
VOID
,
LPCWSTR
,
LPVOID
*
,
UINT
*
);
#define VerQueryValue WINELIB_NAME_AW(VerQueryValue)
#define VerQueryValue WINELIB_NAME_AW(VerQueryValue)
DWORD
WINAPI
GetFileVersionInfoSizeA
(
LPCSTR
,
LPDWORD
);
DWORD
WINAPI
GetFileVersionInfoSizeA
(
LPCSTR
,
LPDWORD
);
DWORD
WINAPI
GetFileVersionInfoSizeW
(
LPCWSTR
,
LPDWORD
);
DWORD
WINAPI
GetFileVersionInfoSizeW
(
LPCWSTR
,
LPDWORD
);
...
...
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