Code:strsTemp << _T("\\StringFileInfo\\")
<< std::setw(4) << std::setfill(_T('0'))
<< std::hex
<< m_pLanguageInformation->m_wLanguage
<< std::setw(4)
<< std::hex
<< m_pLanguageInformation->m_wCodePage
<< _T("\\")
<< refcstrKey;
Printable View
Code:strsTemp << _T("\\StringFileInfo\\")
<< std::setw(4) << std::setfill(_T('0'))
<< std::hex
<< m_pLanguageInformation->m_wLanguage
<< std::setw(4)
<< std::hex
<< m_pLanguageInformation->m_wCodePage
<< _T("\\")
<< refcstrKey;
Ok... I did that... but I missed the '0'... my code now looks like this:
and I get this compile error:Code:if(m_pucResourceData)
{
UINT uiSize = 0;
std::wstringstream strsTemp;
LPVOID pvValue = 0;
// Build query string
strsTemp << _T("\\StringFileInfo\\") << std::setw(4) << std::setfill(_T('0')) << std::hex
<< m_pLanguageInformation->m_wLanguage << std::setw(4) << std::hex
Compiler Error-> << m_pLanguageInformation->m_wCodePage << _T("\\") << refcstrKey;
if(::VerQueryValue(static_cast<LPVOID>(m_pucResourceData),
const_cast<LPTSTR>(strsTemp.str().c_str()),
static_cast<LPVOID *>(&pvValue),
&uiSize) != FALSE)
return static_cast<LPTSTR>(pvValue);
}
??Code:error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'const std::string' (or there is no acceptable conversion) version.h 117
error C2664: 'std::basic_string<_Elem,_Traits,_Ax>::basic_string(const _Elem *)' : cannot convert parameter 1 from 'LPTSTR' to 'const char *' version.h 123
:confused:
one or more of there variables is/are still a std::string and not a std::wstring.
Check out wich one is.Code:m_pLanguageInformation->m_wLanguage
m_pLanguageInformation->m_wCodePage
refcstrKey
You were correct! it was refstrKey... :)
Now what do I do with the return value cast?
Thankyou... again.
dunno, its up to you. It returns a non-const TCHAR string winch in UNICODE version is wchar_t.
Yep... I have it working now.
There were several other errors, which magically appeared, but I have them fixed now
Thank you so much to everyone who took the time to help me.
It was greatly appreciated.
:-)