RobGrant
6th January 2005 15:00 UTC
Question about $PLUGINSDIR
Without finding the relevent section in the source, I couldn't see an obvious way of finding this out. I need to know if in Windows the $PLUGINSDIR target drive is checked to make sure it has enough space on it before the temporary directory is created. For example, if C: has no more space on it, will an error occur, or will it seek for another drive and check if that is big enough or what?
Thanks
Rob G
kichik
6th January 2005 15:03 UTC
It always uses the temporary directory. The temporary directory is either the system temporary directory or $WINDIR\Temp if the temporary directory is invalid. There is no space check for that.
The source code can be found in CEXEBuild::add_plugins_dir_initializer() in build.cpp.
RobGrant
6th January 2005 15:19 UTC
Hmmm I'm tempted to add a check in if I can work it out reasonably quickly. Anyone got any pointers to Windows API calls to query space left on a drive, and how to find out what drives exist on a machine?
Also I'd need to know how to sum the size of the files placed in the $PLUGINSDIR...anyone fancy doing this for me? :)
Takhir
6th January 2005 16:22 UTC
SHGetDiskFreeSpaceA("c", ...) - shell32.dll ;)