i googled for quite a lot of time but i haven't found anything... i'm looking for a way to check if a data carrier is inserted: i have 4 free interfaces ( I:\ J:\ ...) which are not used, and always when i want open them with the application it tells me to insert a data carrier. how can i first check if there is a data carrier, without getting an error?
What actually happens when your data carrier is inserted? Does your existing system spot it and assign a drive letter, or do you actually have to handle that bit yourself too?
If your system hands out drive letters, you can use opendir of dirent.h functions (or Win32 equivalent) to try drive letters, and use the returned values to assess the existence or not of that drive/directory.
Assuming you are on Windows,
http://msdn.microsoft.com/en-us/library/bb762120%28VS.85%29.aspx
http://archive.msdn.microsoft.com/shellapplication (Change Notify Watcher Sample)
thanks to all... but i finally solved it by writing the info about the drives from shell to a file and reading it... not really fast but enough for my purposes...