Цитата(alexSl @ 30.9.2011, 15:59) | Код | ... HANDLE hDevice = INVALID_HANDLE_VALUE; // handle to the drive to be examined BOOL bErrorFlag = FALSE; hDevice = CreateFileW(wszPath, // drive to open 0, // no access to the drive FILE_SHARE_READ | // share mode FILE_SHARE_WRITE, NULL, // default security attributes OPEN_EXISTING, // disposition 0, // file attributes NULL); // do not copy file attributes
... bErrorFlag = WriteFile( hFile, // open file handle DataBuffer, // start of data to write dwBytesToWrite, // number of bytes to write &dwBytesWritten, // number of bytes that were written NULL); // no overlapped structure ...
|
Открывает файл устройства и пишет в него. |
а по подробнее можно?) |