I can't figure out how to get FindFirstFile working.
sr = FindFirstFile("E:\Documents and Settings\*",0);
if(sr != INVALID_HANDLE_VALUE)
{
users.insert(iter,"Hello");
}
else
{
cout << "No users detected! Exiting...";
return 0;
}
(yes I am aware it's currently only looking at the E drive)
As you've probably guessed, I am trying to find the dcouments folders for each user. However, the routine never finds any files and gives me the error message. I can'tfigure out how to use WIN32_FIND_DATA to specify folders, which may be the problem. Any suggestions?
Question
Varsity
I can't figure out how to get FindFirstFile working.
sr = FindFirstFile("E:\Documents and Settings\*",0); if(sr != INVALID_HANDLE_VALUE) { users.insert(iter,"Hello"); } else { cout << "No users detected! Exiting..."; return 0; }(yes I am aware it's currently only looking at the E drive)
As you've probably guessed, I am trying to find the dcouments folders for each user. However, the routine never finds any files and gives me the error message. I can'tfigure out how to use WIN32_FIND_DATA to specify folders, which may be the problem. Any suggestions?
Link to comment
Share on other sites
5 answers to this question
Recommended Posts