Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 738
  • Last Modified:

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
0
Olli083097
Asked:
Olli083097
  • 2
  • 2
  • 2
1 Solution
 
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
 
dm_14Commented:
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
 
Olli083097Author Commented:
Where did you two get this documentation?

0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now