GetPrivateProfileInt not working in windows 7

I am calling GetPrivateProfileInt (_T("SectionName"), _T("KeyName"), 0,_T("C:\\Documents and Settings\\Desktop\\abc.ini")) in Windows 7. It returns an error "File not found" (extracted using GetLastError()) if "KeyName" is not present in "SectionName" whereas the same function works perfectly fine in Windows XP. If I add "KeyName" in ini file, its working absolutely fine.

I am missing out on some permissions or is it a bug in Windows 7?
Topic archived. No new replies allowed.