Solved

What is DeviceIoControl api?

Posted on 1998-12-19
6
685 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
  • 2
  • 2
  • 2
6 Comments
 
LVL 1

Expert Comment

by:muffinthedog
Comment Utility
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 30 total points
Comment Utility
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
Comment Utility
Where did you two get this documentation?

0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Expert Comment

by:muffinthedog
Comment Utility
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
Comment Utility
Goto http://premium.microsoft.com/msdn/library/
Do a search on DeviceIoControl - tons of useful information available here.
0
 

Author Comment

by:Olli083097
Comment Utility
muffinthedog: This is probably unfair, but...

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

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now