3 / 3 / 0
Регистрация: 09.11.2009
Сообщений: 24
1

Описание API DeviceIoControl

13.11.2009, 23:23. Показов 5836. Ответов 1
Метки нет (Все метки)

подскажите где взять подробное описание функции DeviceIoControl (тут не далеко была эта тема - дали ссылку, но там пусто)
0

Помощь в написании контрольных, курсовых и дипломных работ здесь.

Programming
Эксперт
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
13.11.2009, 23:23
Ответы с готовыми решениями:

Функция DeviceIoControl
Мне нужно полное описание функции DeviceIoControl или подскажите книгу, где можно найти ее описание

Использование функции DeviceIoControl с кодом IOCTL_SCSI_PASS_THROUGH
Всем доброго времени суток. Пытаюсь передать диску скази запрос для чтения памяти, но есть...

Отправка устройству информации через DeviceIoControl
Теперь пытаюсь разобраться с DeviceIoControl. В прошлой программе с помощью...

Перечень констант кодов управления для DeviceIoControl
Здравствуйте ! Подскажите, пожалуйста, где я могу найти список значений констант? Задача -...

1
2808 / 1399 / 107
Регистрация: 07.03.2009
Сообщений: 4,446
13.11.2009, 23:29 2
Все по WinAPI смотрите на msdn.microsoft.com

DeviceIoControl

Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.

BOOL WINAPI DeviceIoControl(
__in HANDLE hDevice,
__in DWORD dwIoControlCode,
__in LPVOID lpInBuffer,
__in DWORD nInBufferSize,
__out LPVOID lpOutBuffer,
__in DWORD nOutBufferSize,
__out LPDWORD lpBytesReturned,
__in LPOVERLAPPED lpOverlapped
);

Parameters
hDevice
A handle to the device on which the operation is to be performed. The device is typically a volume, directory, file, or stream. To retrieve a device handle, use the CreateFile function. For more information, see Remarks.

dwIoControlCode
The control code for the operation. This value identifies the specific operation to be performed and the type of device on which to perform it.

For a list of the control codes, see Remarks. The documentation for each control code provides usage details for the lpInBuffer, nInBufferSize, lpOutBuffer, and nOutBufferSize parameters.

lpInBuffer
A pointer to the input buffer that contains the data required to perform the operation. The format of this data depends on the value of the dwIoControlCode parameter.

This parameter can be NULL if dwIoControlCode specifies an operation that does not require input data.

nInBufferSize
The size of the input buffer, in bytes.

lpOutBuffer
A pointer to the output buffer that is to receive the data returned by the operation. The format of this data depends on the value of the dwIoControlCode parameter.

This parameter can be NULL if dwIoControlCode specifies an operation that does not return data.

nOutBufferSize
The size of the output buffer, in bytes.

lpBytesReturned
A pointer to a variable that receives the size of the data stored in the output buffer, in bytes.

If the output buffer is too small to receive any data, the call fails, GetLastError returns ERROR_INSUFFICIENT_BUFFER, and lpBytesReturned is zero.

If the output buffer is too small to hold all of the data but can hold some entries, some drivers will return as much data as fits. In this case, the call fails, GetLastError returns ERROR_MORE_DATA, and lpBytesReturned indicates the amount of data received. Your application should call DeviceIoControl again with the same operation, specifying a new starting point.

If lpOverlapped is NULL, lpBytesReturned cannot be NULL. Even when an operation returns no output data and lpOutBuffer is NULL, DeviceIoControl makes use of lpBytesReturned. After such an operation, the value of lpBytesReturned is meaningless.

If lpOverlapped is not NULL, lpBytesReturned can be NULL. If this parameter is not NULL and the operation returns data, lpBytesReturned is meaningless until the overlapped operation has completed. To retrieve the number of bytes returned, call GetOverlappedResult. If hDevice is associated with an I/O completion port, you can retrieve the number of bytes returned by calling GetQueuedCompletionStatus.

lpOverlapped
A pointer to an OVERLAPPED structure.

If hDevice was opened without specifying FILE_FLAG_OVERLAPPED, lpOverlapped is ignored.

If hDevice was opened with the FILE_FLAG_OVERLAPPED flag, the operation is performed as an overlapped (asynchronous) operation. In this case, lpOverlapped must point to a valid OVERLAPPED structure that contains a handle to an event object. Otherwise, the function fails in unpredictable ways.

For overlapped operations, DeviceIoControl returns immediately, and the event object is signaled when the operation has been completed. Otherwise, the function does not return until the operation has been completed or an error occurs.

Return Value
If the operation completes successfully, the return value is nonzero.

If the operation fails or is pending, the return value is zero. To get extended error information, call GetLastError.
0
IT_Exp
Эксперт
87844 / 49110 / 22898
Регистрация: 17.06.2006
Сообщений: 92,604
13.11.2009, 23:29

Помощь в написании контрольных, курсовых и дипломных работ здесь.

API DeviceIoControl
В оригинальном коде с примером (рабочий код): WINBASEAPI BOOL WINAPI DeviceIoControl( ...

Описание 576-ти API на русском.
Если кому-нибудь нужно описание 576-ти API: http://nikolayam.narod.ru/api_help.zip

описание функции shellExecute WIN API!
Что нужно написать, что-бы при нажатии на кнопку запускалась определённая .ехе программа или...

Использование API в VB приложениях, описание функций.
Подскажите, где найти информацию по использованию функций API в VB приложениях, описание функций,...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
2
Ответ Создать тему
Опции темы

КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2021, vBulletin Solutions, Inc.