Question

I have installed the OS in VirtualBox 4.3.8

I have compiled the Code that calls the CopyFile/CopyFileEx function in VC6, and VS2012 (for v10 and v11), but it refuses to work.

I am running the app in console mode, as Administrator. It gives error 2: The system cannot find the file specified.

However, this code works fine for both functions on XP, Server 2003, and Windows 7.

What is the problem? Is it permissions? How can I find out what the problem is?

Était-ce utile?

La solution

This is ERROR_FILE_NOT_FOUND. It's hard to look beyond the obvious explanation that the file name that you are providing when calling CopyFile refers to a file that does not exist.

Autres conseils

Altough you don't give much info about the code, I recommend to download and run Process Monitor in background (you can filter your process).

You will see more detailed info such us if the folder really exists, etc.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top