'The system cannot find the file specified.'

Started by
10 comments, last by Kippesoep 18 years, 9 months ago
Alright guys... I keep getting this error in GetLastError():
failed with error 2: The system cannot find the file specified.
But... I am not loading any files... So I un-did what I last typed... thinking that would fix it... nadda. So I commented out code and retried... no dice. Finally I 'nuked' my coding (commented out everything BUT the error retrieval code... so all there is in _tWinMain() is that)... again same error... And this was with no coding but the error retrieval! So i started a blank project... it's in that project, too. Then I used just DWORD dw = GetLastError()... still there... It makes no sense. One thing to note, that when I run this program in LTProf, all of my compiles want to link to some library(s) at "f:\vs70builds\3077\vc\crtbld\crt\src\" (and I do not have a F drive nor any folder that would look remotely like that). Do I have to reinstall VS? [Edited by - pDK on June 30, 2005 1:50:34 AM]
Advertisement
No clue, but I've got a tip for you... it's spelled "commented", not "committed". 'Comments' are bits the compiler ignores, or remarks made outside the conversation's vein. If something is 'committed', it is dedicated to some purpose.
RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.
You're right... but this was after a 22 hour crunch time :) (Don't beleive me? check my profile on the times I posted on this forum...)

I'm still having issues... I moved from my desktop to my laptop that has a clean build to see if that would work... still nothing.

I have limited it down to one line of code as well:
hDML = LoadLibrary("DML.dll");


this ussualy returns error 0x00000006 (aka: 'The handle is invalid.')

So... any other help (besides on my english [smile])?
Quote:Original post by pDK
hDML = LoadLibrary("DML.dll");


Only time I recall DML as a dll had to do with SQL possibly of Oracle origins.

This is something totaly different. Nothing to do with SQL nor Oracle. It is my own library.
Have you tried "SetLastError (0)" at the start of your program? When I set a watch for "err,hr" in the debugger (which shows the text of the error message represented by GetLastError), it usually shows the "file not found" message. Seems to be a very common state for this to be in. In other words: it may have nothing to do with your program.
Kippesoep
Quote:Original post by Kippesoep
[..] a watch for "err,hr" in the debugger (which shows the text of the error message represented by GetLastError) [..]
Hey, thanks for sharing this :)
That is what I did... and the errors then propagated off of it.

Right now, I am reinstalling VS and most of my SDKs... It is one thing for this bug to corrupt one build... but it is another to corrupt every build after (new and stable).
But what exactly is wrong with your app? In what way is it not working correctly other than calling getLastError returns non zero?

GetLastError is only usefull immdiatly after a call to an WinAPI function that supports GetLastError.

Its job is to tell you more information AFTER a function returns a fail code. Its not a general well-being monitor.



You are correct.

I do not have the exact list of errors that came up that initiated this problem (one was 14xx... something about no (DC)). But my program would not alloc any memory... nor free any for that matter. It would not register my windows' classes... and nor would it create any windows either. It was a mess.

But I just reinstalled VS, so I am going to try a stab at it again.

This topic is closed to new replies.

Advertisement