Ответ для Pasha7308 21.11.2007 | 11:18
--------------------
[q]The following code demonstrates how to accomplish safe ejection using the steps described above:
#include
#include
#include
#include
// Prototypes
BOOL EjectVolume(TCHAR cDriveLetter);
HANDLE OpenVolume(TCHAR cDriveLetter);
BOOL LockVolume(HANDLE hVolume);
BOOL DismountVolume(HANDLE hVolume);
BOOL PreventRemovalOfVolume(HANDLE hVolume, BOOL fPrevent);
BOOL AutoEjectVolume(HANDLE hVolume);
BOOL CloseVolume(HANDLE hVolume);
LPTSTR szVolumeFormat = TEXT("\\.\%c:");
LPTSTR szRootFormat = TEXT("%c:\");
LPTSTR...
читать все сообщение