![]() |
| ||
| Removable drives Hi every one Please help me: How can i found, if there is any disk in a removable drive (floppy drive or cd drive). I am programming with C++Builder. If there is any Win API function for this. Thank you very much. |
| ||
| Re: Removable drives #include <stdio.h> |
| ||
| Re: Removable drives Nice one. The OP asks for windows API and you give him bad C using non-standard headers. Look up GetDriveType() and GetVolumeInformation() and SetErrorMode() and GetLastError(). Alternatively use DeviceIoControl(). |
| ||
| Re: Removable drives HAHAHAHAHA Ok So I did not have my first cup of Coffee... I saw C++ and just went to work... smmmmacccckkk... Sorry for wrong info.. was just trying to help.. |
| ||
| Re: Removable drives Thank you Stoned_Coder very much. Your Guides were very useful for me. My problem was solved. My main problem was this: The WinXP shows a message "No disk in CD-ROM ..." each time i reference a file in that drive. The SetErrorMode(SEM_FAILCRITICALERRORS) solved my problem. I wrote (in C++Builder) the bellow function (Of cource WIN API have functions for this purpose but using them was very difficult and specific to each version of Windows) and tested it. It works. Please help me if this function has any problem. bool IsDriveReady(AnsiString tasDrive)<< moderator edit: added [code][/code] tags >> |
| All times are GMT -4. The time now is 7:39 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC