What is DeviceIoControl api?

What can this api be used for?

Declare Function DeviceIoControl Lib "kernel32" (ByVal hDevice As Long, ByVal dwIoControlCode As Long, lpInBuffer As Any, ByVal nInBufferSize As Long, lpOutBuffer As Any, ByVal nOutBufferSize As Long, lpBytesReturned As Long, lpOverlapped As OVERLAPPED) As Long
Olli083097Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
dm_14Connect With a Mentor Commented:
DeviceIoControl
The DeviceIoControl function sends a control code directly to a specified device driver, causing the corresponding device to perform the specified operation.

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

At a Glance
Header file: Winbase.h
Platforms: H/PC, Palm-size PC
Windows CE versions: 1.0 and later
Complete documentation: Microsoft Platform SDK


Remarks
No specific values are defined for the dwIoControlCode parameter. However, the writer of a custom device driver can define IOCTL_XXXX control codes, per the CTL_CODE macro. These control codes can then be advertised, and an application can use these control codes with DeviceIoControl to perform the driver-specific functions.

The lpOverlapped parameter is ignored and should be NULL.

See Also
CreateEvent, CreateFile


0
 
muffinthedogCommented:
Olli,
MS documentation...
The DeviceIoControl function sends a control code directly to a specified device driver, causing the corresponding device to perform the specified operation.


0
 
Olli083097Author Commented:
Where did you two get this documentation?

0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
muffinthedogCommented:
Olli,
    C documentation...
    Had my comment posted for awhile before dm_14 set it as an answer, but somehow he managed to answer the question 46 minutes before you asked it... Same documentation is available from MSDN.
0
 
dm_14Commented:
Goto http://premium.microsoft.com/msdn/library/
Do a search on DeviceIoControl - tons of useful information available here.
0
 
Olli083097Author Commented:
muffinthedog: This is probably unfair, but...

dm_14: Thanx for the answer, and the URL!
0
All Courses

From novice to tech pro — start learning today.