Okay. I am trying to read a file in VC++ MFC using API. I don't want to use all of this stupid C++ built in commands. I am trying to obtain a handle to a file so that I can read it later on, however It wont give me a valid handle. It keeps returning -1. I thought it might be the filename so I tried "\\" as directory changes but still didnt work. Here is the source I am trying, Its messy... but I figure it should work.
//UNDER HERE IS MY PROBLEMS:
blah.nLength = sizeof(SECURITY_ATTRIBUTES);
hHandle = CreateFile("C:\documents and settings\xei\desktop\StudyGuide.txt",
//UP THERE IS MY PROBLEMS;
//This messages the Handle of the file. It seems to be -1 all of the time.
lHandle = (long)hHandle;
sHandle = new char;
sHandle = (char)0;
delete  sHandle;