Your example should work:
http://msdn.microsoft
i
const static LPCWSTR s_szTest = L"Test";
LPCWSTR getstring()
{
return m_szTest;
}
main()
{
//everyth
}
or make getstring as, for example:
BOOL getstring(LPWSTR szText, DWORD nCapacity)
{
wcsncat(szText,
return TRUE;
}
If you know about EAX - check yourself - put a breakpoint before getstring() call, "Go to assembly".
evilrix, I'm posting after you, sorry - but I have typed it. :)
It will be great, if you will continue here - I remember your artcile about it?





by: evilrixPosted on 2009-09-18 at 00:05:14ID: 25363394
1. All compilers/platforms will do this differently. The EAX register is often used for intrinsic return values from functions.
2. I don't think we can safely generlise about this either
3. Not sure what you mean,