On 07/21/2010 10:23 AM, Andrew Eikum wrote:
Please more-less follow the format of the file and don't add yet one more.
- if(outLen == 0)
return 0;
Need space between "if" and "(".
- if(!buf){
Curly bracket goes on to separate line.
- buf = HeapAlloc(GetProcessHeap(), 0, outLen * sizeof(WCHAR));
- ret = GetPrivateProfileStringW(appName, keyName, NULL, buf, outLen, filename);
strcpyW(out, buf);
- HeapFree(GetProcessHeap(), 0, buf);
Why do you need extra buffer here? Use passed buffer instead.
Vitaliy.