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
bcc80032
Commit
bcc80032
authored
Jan 28, 2004
by
Robert Shearman
Committed by
Alexandre Julliard
Jan 28, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow VerQueryValueW to query 16-bit resources.
parent
39628f49
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
28 deletions
+48
-28
info.c
dlls/version/info.c
+48
-28
No files found.
dlls/version/info.c
View file @
bcc80032
...
...
@@ -626,32 +626,13 @@ static VS_VERSION_INFO_STRUCT32 *VersionInfo32_FindChild( VS_VERSION_INFO_STRUCT
}
/***********************************************************************
* VerQueryValueA [VERSION.@]
* VersionInfo16_QueryValue [internal]
*
* Gets a value from a 16-bit NE resource
*/
DWORD
WINAPI
Ver
QueryValueA
(
LPVOID
pBlock
,
LPCSTR
lpSubBlock
,
DWORD
WINAPI
Ver
sionInfo16_QueryValue
(
VS_VERSION_INFO_STRUCT16
*
info
,
LPCSTR
lpSubBlock
,
LPVOID
*
lplpBuffer
,
UINT
*
puLen
)
{
VS_VERSION_INFO_STRUCT16
*
info
=
(
VS_VERSION_INFO_STRUCT16
*
)
pBlock
;
if
(
!
VersionInfoIs16
(
info
)
)
{
INT
len
;
LPWSTR
wide_str
;
DWORD
give
;
/* <lawson_whitney@juno.com> Feb 2001 */
/* AOL 5.0 does this, expecting to get this: */
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpSubBlock
,
-
1
,
NULL
,
0
);
wide_str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
lpSubBlock
,
-
1
,
wide_str
,
len
);
give
=
VerQueryValueW
(
pBlock
,
wide_str
,
lplpBuffer
,
puLen
);
HeapFree
(
GetProcessHeap
(),
0
,
wide_str
);
return
give
;
}
TRACE
(
"(%p,%s,%p,%p)
\n
"
,
pBlock
,
debugstr_a
(
lpSubBlock
),
lplpBuffer
,
puLen
);
while
(
*
lpSubBlock
)
{
/* Find next path component */
...
...
@@ -683,21 +664,60 @@ DWORD WINAPI VerQueryValueA( LPVOID pBlock, LPCSTR lpSubBlock,
}
/***********************************************************************
* VerQueryValueA [VERSION.@]
*/
DWORD
WINAPI
VerQueryValueA
(
LPVOID
pBlock
,
LPCSTR
lpSubBlock
,
LPVOID
*
lplpBuffer
,
UINT
*
puLen
)
{
VS_VERSION_INFO_STRUCT16
*
info
=
(
VS_VERSION_INFO_STRUCT16
*
)
pBlock
;
TRACE
(
"(%p,%s,%p,%p)
\n
"
,
pBlock
,
debugstr_a
(
lpSubBlock
),
lplpBuffer
,
puLen
);
if
(
!
VersionInfoIs16
(
info
)
)
{
INT
len
;
LPWSTR
wide_str
;
DWORD
give
;
/* <lawson_whitney@juno.com> Feb 2001 */
/* AOL 5.0 does this, expecting to get this: */
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpSubBlock
,
-
1
,
NULL
,
0
);
wide_str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
lpSubBlock
,
-
1
,
wide_str
,
len
);
give
=
VerQueryValueW
(
pBlock
,
wide_str
,
lplpBuffer
,
puLen
);
HeapFree
(
GetProcessHeap
(),
0
,
wide_str
);
return
give
;
}
return
VersionInfo16_QueryValue
(
info
,
lpSubBlock
,
lplpBuffer
,
puLen
);
}
/***********************************************************************
* VerQueryValueW [VERSION.@]
*/
DWORD
WINAPI
VerQueryValueW
(
LPVOID
pBlock
,
LPCWSTR
lpSubBlock
,
LPVOID
*
lplpBuffer
,
UINT
*
puLen
)
{
VS_VERSION_INFO_STRUCT32
*
info
=
(
VS_VERSION_INFO_STRUCT32
*
)
pBlock
;
if
(
VersionInfoIs16
(
info
)
)
{
ERR
(
"called on NE resource!
\n
"
);
return
FALSE
;
}
TRACE
(
"(%p,%s,%p,%p)
\n
"
,
pBlock
,
debugstr_w
(
lpSubBlock
),
lplpBuffer
,
puLen
);
if
(
VersionInfoIs16
(
info
)
)
{
DWORD
ret
;
int
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
lpSubBlock
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
LPSTR
lpSubBlockA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
char
));
if
(
!
lpSubBlockA
)
return
FALSE
;
WideCharToMultiByte
(
CP_ACP
,
0
,
lpSubBlock
,
-
1
,
lpSubBlockA
,
len
,
NULL
,
NULL
);
ret
=
VersionInfo16_QueryValue
(
pBlock
,
lpSubBlockA
,
lplpBuffer
,
puLen
);
HeapFree
(
GetProcessHeap
(),
0
,
lpSubBlockA
);
return
ret
;
}
while
(
*
lpSubBlock
)
{
/* Find next path component */
...
...
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