Re: [PATCH 4/6] gameux: add storing Title registry value
3 Sep
2010
3 Sep
'10
11:16 a.m.
On 9/3/2010 13:25, Mariusz PluciĆski wrote:
+ hr = IXMLDOMElement_get_text(lpXMLElement,&bstrValue); + if(SUCCEEDED(hr)) + { + nValueLen = SysStringLen(bstrValue)+1; + + GameData->sName = CoTaskMemAlloc(nValueLen*sizeof(WCHAR)); + if(GameData->sName == NULL) + hr = E_OUTOFMEMORY; + + if(SUCCEEDED(hr)) + lstrcpynW(GameData->sName, bstrValue, nValueLen); + + SysFreeString(bstrValue); + } Maybe it's better to store it as BSTR to avoid such checks/allocations.
5580
Age (days ago)
5580
Last active (days ago)
0 comments
1 participants
participants (1)
-
Nikolay Sivov