• Welcome to Valhalla Legends Archive.
 

Directory Problems

Started by Mephisto, December 18, 2004, 08:57 PM

Previous topic - Next topic

Mephisto

Which functions in the Win32 API (or functions at all) cause the directory a program looks in to be changed to the default directory?

MyndFyre

Can you be more specific?  I'm not entirely sure that your question was coherent (or maybe I'm incoherent this time of night), but can you describe what problems you are experiencing or what effect you are trying to reproduce?
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Zakath

The default system directory can be found with %systemroot%. Is that what you're looking for?
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

Banana fanna fo fanna


Arta

I think he means, which API can change the default directory.

Mephisto

#5
The problem is that after my bot loads for about ~20 minutes depending possibly on wha the channel conditions are it gives me a failure to load configuration error whenever it tries to load the file again.  I have no idea why either, and the only thing I can think of is that it's switching the directory somewhere else, but oddly enough everytime I load the configuration I reset the current directory back to the one the exe is in (where the configuration is).  The reason I asked is because Arta had these problems one time as well, and suggested it might be an API call switching the directory on you or something.

Anyways, I'll look into it more and try to do some more debugging and ask more specific questions if I have any problems.

Arta

I actually kind've doubt that it is that now. I just remembered that I had that problem in Delphi with a VCL control, so it's unlikely to be affecting you :)

I'd check to make sure your that file class you wrote is tidying up properly. Are you making a new instance of the class each time you load the file? If not, make sure all your functions tidy up after themselves -- don't leave the destructor to do all that if it's not being used.