Solved

What is DeviceIoControl api?

Posted on 1998-12-19
6
703 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 30 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

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!

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

717 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