-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2015-02-12 um 20:15 schrieb Mark Jansen:
LPWSTR lpSubBlockW;
UINT dum = 0;
if (!puLen)
puLen = &dum; len = MultiByteToWideChar(CP_ACP, 0, lpSubBlock, -1, NULL, 0); lpSubBlockW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
@@ -965,7 +968,7 @@ BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock,
HeapFree(GetProcessHeap(), 0, lpSubBlockW);
if (ret && isText)
if (ret && isText && *puLen)
I am afraid I have no idea what this patch is doing. I am not even sure I understand the original function properly :-( . VerQueryValueA seems like an A to W wrapper for VersionInfo32_QueryValue, but with the quirky behavior that it appends the ascii string after the unicode string.
Can you elaborate a bit on what exactly goes wrong? What are the input values, and what does VersionInfo32_QueryValue return?