PC Review


Reply
 
 
Peter
Guest
Posts: n/a
 
      1st Oct 2003
I need to transfer data from driver to user-mode.
My user-mode application calls DeviceIoControl with input NULL buffer and
valid output buffer.
My DeviceObject->Flags is set to DO_DIRECT_IO.

DeviceIoControl is called with defined control code.
When I define:
#define MY_IOCTL CTL_CODE(0x8000, 0x801, METHOD_OUT_DIRECT, FILE_READ_DATA)

In my dispatch function I dont see output buffer address which is passed
from user-mode.
There is NULL. But output buffer size is visible.
For example:
ioBuffer = pIrp->AssociatedIrp.SystemBuffer IT IS NULL !
outputBufferLength =
pStackLoc->Parameters.DeviceIoControl.OutputBufferLength IT IS OK !

But when I define:
#define MY_IOCTL CTL_CODE(0x8000, 0x801, 0, 0)

It is OK, I see output buffer address and I can to write it.

Why I can not to use first form CTL_CODE ?
Peter
Thanks !


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IOCTL_POWER values and CTL_CODE macro Mario Microsoft Dot NET Compact Framework 2 23rd Aug 2006 02:06 AM
CTL_CODE Peter Windows XP Drivers 0 1st Oct 2003 07:56 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:48 AM.