?
Solved

What is DeviceIoControl api?

Posted on 1998-12-19
6
Medium Priority
?
708 Views
Last Modified: 2008-02-01
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
Comment
Question by:Olli083097
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 1

Expert Comment

by:muffinthedog
ID: 1451498
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
 
LVL 2

Accepted Solution

by:
dm_14 earned 90 total points
ID: 1451499
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
 

Author Comment

by:Olli083097
ID: 1451500
Where did you two get this documentation?

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:muffinthedog
ID: 1451501
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
 
LVL 2

Expert Comment

by:dm_14
ID: 1451502
Goto http://premium.microsoft.com/msdn/library/
Do a search on DeviceIoControl - tons of useful information available here.
0
 

Author Comment

by:Olli083097
ID: 1451503
muffinthedog: This is probably unfair, but...

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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question