Sign in to follow this  
pDK

'The system cannot find the file specified.'

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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])?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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.



Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this