1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| {
////dismount drive
sprintf_s(strdevice, "\\\\.\\%c:", lpCmdLine[0]);
}
if (strdevice[0] != 0)
{
/* if ((MessageBox("Confirme dismount", 0, MB_YESNO)) == IDNO)
return;*/
int err = 0;
DWORD dt = 0;
HANDLE f = CreateFileA(strdevice, // lpFileName
GENERIC_READ | GENERIC_WRITE, // dwDesiredAccess
FILE_SHARE_READ | FILE_SHARE_WRITE, // dwShareMode
NULL, // lpSecurityAttributes
OPEN_EXISTING, // dwCreationDistribution
0, // dwFlagsAndAttributes
NULL // hTemplateFile
);
int err=GetLastError(); |