[Compuware Corporation] [Compuware NuMega home page]                [NuMega Lab]
[teal]

 [DriverStudio]    [Image][Image]
   Home
 [Driver Products]        Driver Technical Tips
   DriverStudio          Using IOCTL METHOD_IN/OUT_DIRECT
   DriverBundle
   Previews              When an application calls the Win32 API
   Compatibility         DeviceIoControl to access a device driver, it passes
 [Downloads]             a code to specify the operation that it is
                          requesting. The driver writer supplies a set of
 Wizards                  codes, each of which is formed using macro CTL_CODE.
   Utilities             One parameter to CTL_CODE specifies the buffer access
   NT source             method that the operation uses. The method may be one
 examples                 of the following:
   VxD source
 examples                    * METHOD_BUFFERED
   WDM source               * METHOD_IN_DIRECT
 examples                    * METHOD_OUT_DIRECT
 [Resources]                * METHOD_NEITHER
 Technical papers
   Useful links          The semantics of METHOD_IN_DIRECT and
   Technical tips        METHOD_OUT_DIRECT cause some confusion for driver
 [Support]               developers. The buffer pointed to by parameter
                          InputBuffer (unless NULL) is copied to a system
 Support                  buffer, and the system inserts a pointer to the
   Knowledge base        system buffer in the IRP sent to the driver. For the
   Problem               buffer to which parameter OutputBuffer points, the
 submission               systems creates an MDL, after probing and locking the
   Product               corresponding memory pages. The MDL address appears
 registration             in the IRP at field MdlAddress.
   Release notes
 [Shop NuMega]           The buffer pointed to by parameter InputBuffer never
 Buy it!                  receives any data from the driver. However, note that
   Price list            the buffer pointed to by parameter OutputBuffer is
   How to buy            sometimes an input buffer (METHOD_IN_DIRECT) and
   Sales offices         sometimes an output buffer (METHOD_OUT_DIRECT). In
                          the latter case, the buffer must be writable, or the
                          system will fail the call.
 [Y2K Compliance]
                          Click here to read about METHOD_NEITHER.

 [More information]       Back to technical tip start page.


  DriverCentral  DriverStudio  Free downloads  Resources  Support and
                          Services  Shop NuMega
     Compuware NuMega  Tel: +1 603 578-8400  Updated: 9 August 1999 
                      Problems? Contact our webmaster.
