I have this code:
But even when my ini file contains the text "foo" the program still returns my if-else statment as false. Why is it doing this? The method works fine in DOS programming.Code:hFile=CreateFile("Settings.ini", GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); ReadFile(hFile, Buffer, 3, &dwBytes, NULL); if(Buffer=="foo"){ Beep(2000,2000); } else { Beep(500,500); }