TheHaiden wrote:
Thank you for your time, Vicmarcal, if there is anything else that could help me, whether it be a guideline or a good kick in the right direction, please tell me.

I will try my best to help this project as much as I possibly can.
After giving you the link to our Testman "Findfirstfile" tests, i checked the failures and i found a nice/easy to catch bug.I am sure you will be able to discover why it is failing. Are you man enough?(jkjk)
This is the FindFirstFile test:
http://svn.reactos.org/svn/reactos/trun ... kup#l_2145
2140 SetLastError( 0xdeadbeaf );
2141 strcpy(buffer2, buffer);
2142 strcat(buffer2, "foo\\bar\\nul");
2143 handle = FindFirstFileA(buffer2, &data);
2144 err = GetLastError();
2145 ok ( handle == INVALID_HANDLE_VALUE, "FindFirstFile on %s should Fail\n", buffer2 );
2146 ok ( err == ERROR_PATH_NOT_FOUND, "Bad Error number %d\n", err );
I will explain this one as it is easy:
First,it sets lasts error to 0xdeadbeaf. If you want to know what SetLastError is for, just look MSDN

"buffer" contains C:\
strcpy is another "API" and strcat is another one. Search them in MSDN. (But if you have managed C then i am sure you know what they do)
Ok.Now line 2143.This is the real API test.All before was the "preparation":
So in line 2143: FindFirstFileA is being called as: handle=FindFirstFileA("C:\\foo\\bar\\nul", &data);
Of course
c:\foo\bar\nul is a Path that doesnt exist.
How SHOULD "FindFirstFile" behave when a false Path is given to it?MSDN has the answer. (ReactOS APIs have to mimic even the failures!).Google "MSDN FindFirstFile" or use my previous link.
MSDN says that when the Path is not reachable(doesn't exist) SHOULD return INVALID_HANDLE_VALUE and SHOULD set an specific error ERROR_PATH_NOT_FOUND.
So in 2145 it checks if the handle is INVALID_HANDLE_VALUE.If so,ReactOS "FindFirstFile" API behaves the same way than Windows "FindFirstFile" API, and the test is passed.
In 2146 the value of the Error is checked, as the Path is non reachable it should be ERROR_PATH_NOT_FOUND.
But, ey: Looking at the Winetest results, seems both are FAILING: Our API is not returning INVALID_HANDLE_VALUE neither setting the error to ERROR_PATH_NOT_FOUND. Why?
One of the best tools,that ReactOS has, is called DOXYGEN:
http://doxygen.reactos.org/
With it, you can view our source code in an easy way: Just write the function in the search box (left column) and hit enter.
Here you have the FindFirstFile:
Doxygened FindFirstFile
It is quite handy as ANY function there is really a link to where it is defined.So moving through functions is really FAST!!Also it tells you in which "file.c" is defined, so you can easily find it in your ReactOS sources. Play with it!
In this case FindFirstFileA stores the recived Path in a variable called
lpFileName and then calls to FindFirstFileEx, just click on its name and you will be redirected to the place where FindFirstFileEx is coded.
My suggestion is opening this new link in another Tab, so you can have both opened at the same time.
How does FindFirstFileEx behaves? Check MSDN.
FindFirstFileEx will call another API and so on. Keep always an eye in lpFileName, where is it checked?where is it modified?.
Your mission is to follow the lpFileName as somewhere (we don't know where yet) should be checked to know if it is a real path or a false path.
So 3 questions:
EASY: Which API in the chaincall((FindFirstFile->FindFirstFileEx->OtherAPI->OtherAPI....)is checking if the PATH exists?
MEDIUM: When is actually our ReactOS FindFirstFile API returning INVALID_HANDLE_VALUE and ERROR_PATH_VALUE?
MEDIUM: After watching the chaincall where do you suggest to add the PATH check?
This example is perfect to train your skills, you will learn a lot with this example, if you have any doubts...paste them here...but ey: MSDN and GOOGLE and DOXYGEN has all the answers!!
If any other guy or tester wants to send me the solution,do it via PM!!