Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Система";
Текущий архив: 2003.02.24;
Скачать: [xml.tar.bz2];

Вниз

Чтение запись MBR   Найти похожие ветки 

 
maxim2   (2002-12-23 06:15) [0]

Привет всем!
Люди подскажите как?


 
Сергей   (2002-12-23 10:46) [1]

Тоже как-то надо былдо это дело замутить на Win2k. Оно ругалось типа того чтоо нет привелегий для прямого доступа к диску. Выход - написал прогу под ДОС!


 
MZU   (2002-12-23 23:50) [2]

Писать напрямую в ./Devices/Harddisk0


 
Danlicha   (2002-12-24 00:49) [3]

Physical Disks and Volumes

You can use the CreateFile function to open a physical disk drive or a volume. The function returns a handle that can be used with the DeviceIoControl function. This enables you to access the disk"s partition table. It is potentially dangerous to do so, since an incorrect write to a disk could make its contents inaccessible. The following requirements must be met for such a call to succeed:


The caller must have administrative privileges. For more information, see Running with Special Privileges.
The dwCreationDisposition parameter must have the OPEN_EXISTING flag.
When opening a volume or floppy disk, the dwShareMode parameter must have the FILE_SHARE_WRITE flag.
When opening a physical drive, x, the lpFileName string should be of the form \\.\PHYSICALDRIVEx. Hard disk numbers start at zero. The following table shows some example physical drive strings.

String Meaning
\\.\PHYSICALDRIVE0 Opens the first physical drive.
\\.\PHYSICALDRIVE2 Opens the third physical drive.


For an example showing how to open a physical drive, see Calling DeviceIoControl.

When opening a volume or floppy drive, x, the lpFileName string should be of the form \\.\x:. Do not use a trailing backslash. This would indicate the root directory of the drive. The following table shows some example drive strings.

String Meaning
\\.\A: Opens drive A (floppy drive).
\\.\C: Opens drive C (volume).


Windows 2000 and later: You can also open a volume by referring to its volume name. For more information, see Naming a Volume.

Volume handles may be opened as noncached at the discretion of the file system, even when the noncached option is not specified with CreateFile. You should assume that all Microsoft file systems open volume handles as noncached. The restrictions on noncached I/O for files apply to volumes as well.

A file system may or may not require buffer alignment even though the data is noncached. However, if the noncached option is specified when opening a volume, buffer alignment is enforced regardless of the file system on the volume. It is recommended on all file systems that you open volume handles as noncached and follow the noncached I/O restrictions.



Страницы: 1 вся ветка

Форум: "Система";
Текущий архив: 2003.02.24;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.012 c
1-76004
Anton.
2003-02-13 10:04
2003.02.24
Формат даты


3-75746
FreeLancer
2003-02-06 18:18
2003.02.24
Массовый INSERT


1-75983
NewAndrey
2003-02-12 20:06
2003.02.24
Некорректная работа с Excel


14-76091
cdadmitriy
2003-02-09 17:05
2003.02.24
Virtual COM port


6-76051
Beglec
2003-01-05 01:06
2003.02.24
Интересный вопрос про CGI





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский