On 23.02.2015 15:42, Joachim Priesner wrote:
- if (IS_INTRESOURCE(text))
- {
SetLastError(S_OK);
LoadStringW(instance, LOWORD(text), (LPWSTR)result, 0);
return HRESULT_FROM_WIN32(GetLastError());
- }
You don't need SetLastError(), especially not with HRESULT value. And GetLastError() should only be used when LoadStringW() fails.
The rest looks good enough to me.