Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

GekkoCube

Very strange VC++ problem.

This topic is 5648 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I never had this happen to me before - ever! Today I took the DirectX 8.1 ''CreateDevice'' tutorial/sample code and used it to start my own project (brand new). After implementing the basics with my own files I compiled, built it, and ran it. everything was fine and dandy. Then, suddenly, as I was trying to save my work in a particular file called "defines.h" (tried to save using the single-disk save button menu bar), I got a message saying, "Cannot save file...this file may be in use by another application." This naturally lead me to believe that i wasnt closing my exe properly, but im doing what the tutorial did, plus i never created anything other than the d3d8 device. even stranger, and the thing that bothers me the most, is that the file (defines.h) will be deleted somehow! At one time I lost my defines.h file AND my main.cpp file!! What on earth is going on? I hope its not a virus!

Share this post


Link to post
Share on other sites
Advertisement
I also had this problem once. Norton Anti-virus somehow locked my source files. Try to fiddle with the settings in any anti-virus stuff you have running and see if it helps.


"Oh no, not again" - Agrajag

Share this post


Link to post
Share on other sites
One more thing, this problem of the disability to save the file and automatically being deleted, it seems to be provoked by the save-file button.

However, if i click the save-all button, there is no problem.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Caused due to Norton Antivirus.

Share this post


Link to post
Share on other sites
locking of source files?
you mean Norton Antivirus (which i have) will lock c++ source files???
but this has never happened to me before - however, i believe this is the first time i created a new win32 application project with this new computer.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
When you are getting this message - press CTRL+ALT+DELETE in Win2K / XP or right-click on the task bar in 9x and, in both cases, choose "Task Manager". Under the Processes tab, look for your programs exe file to see if it is still running (do this, of course, after having run and then closed your program). It should not be there if your program is closing properly.

If it is then you can "end task" it and try your save again. i would try this immediately if, for example, my program would not recompile after runnning. If this doesn''t work you could try "end tasking" other .exes to see if you close the one that has control of your file (e.g. norton anti virus exes).

Share this post


Link to post
Share on other sites
When you are getting this message - press CTRL+ALT+DELETE in Win2K / XP or right-click on the task bar in 9x and, in both cases, choose "Task Manager". Under the Processes tab, look for your programs exe file to see if it is still running (do this, of course, after having run and then closed your program). It should not be there if your program is closing properly.

If it is then you can "end task" it and try your save again. i would try this immediately if, for example, my program would not recompile after runnning. If this doesn''t work you could try "end tasking" other .exes to see if you close the one that has control of your file (e.g. norton anti virus exes).

Share this post


Link to post
Share on other sites
I did a lot of Usenet searching, and it seems to be a common problem. Most people suggested turning off Nortons Auto-Protect function. "Solved" the problem for me. It''s worth a try, no? Or get some other virus protection.

Share this post


Link to post
Share on other sites
I did what you suggested, i disabled auto-protect for my Norton Antivirus software. i also tried closing Norton altogether.
But this does not help.

Things to note:
Other projects do not have this problem.
And using the save button brings this problem, using save all or using ctrl-s does not affect it at all.

When you had this "problem" did your file(s) delete automatically from the directory??? This is the thing that bothers me the MOST!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Then make a copy of your files in a different directory. This is called a "backup". Also, try reinstalling Visual Studio. You have probably corrupted it with your faffing about.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!