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
37871ce3
Commit
37871ce3
authored
Aug 29, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store the result of the A/W conversions in the extra buffer space.
parent
31d0e742
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
25 deletions
+12
-25
info.c
dlls/version/info.c
+11
-24
info.c
dlls/version/tests/info.c
+1
-1
No files found.
dlls/version/info.c
View file @
37871ce3
...
...
@@ -736,20 +736,13 @@ BOOL WINAPI VerQueryValueA( LPVOID pBlock, LPCSTR lpSubBlock,
if
(
ret
&&
strcasecmp
(
lpSubBlock
,
rootA
)
&&
strcasecmp
(
lpSubBlock
,
varfileinfoA
))
{
LPSTR
lplpBufferA
;
LPSTR
lpBufferA
=
(
LPSTR
)
pBlock
+
info
->
wLength
+
4
;
DWORD
pos
=
(
LPSTR
)
*
lplpBuffer
-
(
LPSTR
)
pBlock
;
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPCWSTR
)
*
lplpBuffer
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
lplpBufferA
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
char
));
if
(
!
lplpBufferA
)
return
FALSE
;
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPCWSTR
)
*
lplpBuffer
,
-
1
,
lplpBufferA
,
len
,
NULL
,
NULL
);
memcpy
(
*
lplpBuffer
,
lplpBufferA
,
len
);
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPCWSTR
)
*
lplpBuffer
,
-
1
,
lpBufferA
+
pos
,
info
->
wLength
-
pos
,
NULL
,
NULL
);
*
lplpBuffer
=
lpBufferA
+
pos
;
*
puLen
=
len
;
HeapFree
(
GetProcessHeap
(),
0
,
lplpBufferA
);
}
return
ret
;
}
...
...
@@ -792,20 +785,14 @@ BOOL WINAPI VerQueryValueW( LPVOID pBlock, LPCWSTR lpSubBlock,
if
(
ret
&&
strcmpiW
(
lpSubBlock
,
rootW
)
&&
strcmpiW
(
lpSubBlock
,
varfileinfoW
))
{
LPWSTR
lplpBufferW
;
LPWSTR
lpBufferW
=
(
LPWSTR
)((
LPSTR
)
pBlock
+
info
->
wLength
);
DWORD
pos
=
(
LPSTR
)
*
lplpBuffer
-
(
LPSTR
)
pBlock
;
DWORD
max
=
(
info
->
wLength
-
sizeof
(
VS_FIXEDFILEINFO
))
*
4
-
info
->
wLength
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)
*
lplpBuffer
,
-
1
,
NULL
,
0
);
lplpBufferW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
lplpBufferW
)
return
FALSE
;
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)
*
lplpBuffer
,
-
1
,
lplpBufferW
,
len
);
memcpy
(
*
lplpBuffer
,
lplpBufferW
,
len
*
sizeof
(
WCHAR
));
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPCSTR
)
*
lplpBuffer
,
-
1
,
lpBufferW
+
pos
,
max
/
sizeof
(
WCHAR
)
-
pos
);
*
lplpBuffer
=
lpBufferW
+
pos
;
*
puLen
=
len
;
HeapFree
(
GetProcessHeap
(),
0
,
lplpBufferW
);
}
return
ret
;
}
...
...
dlls/version/tests/info.c
View file @
37871ce3
...
...
@@ -391,7 +391,7 @@ static void test_32bit_win(void)
/* Test a second time */
retA
=
VerQueryValueA
(
pVersionInfoA
,
FileDescriptionA
,
(
LPVOID
*
)
&
pBufA
,
&
uiLengthA
);
ok
(
retA
,
"VerQueryValueA failed: GetLastError = 0x%08lx
\n
"
,
GetLastError
());
todo_wine
ok
(
!
lstrcmpA
(
WineFileDescriptionA
,
pBufA
),
"FileDescription should have been 'Wine version test'
\n
"
);
ok
(
!
lstrcmpA
(
WineFileDescriptionA
,
pBufA
),
"FileDescription should have been 'Wine version test'
\n
"
);
if
(
is_unicode_enabled
)
{
...
...
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