Not
Bu sayfaya erişim yetkilendirme gerektiriyor. Oturum açmayı veya dizinleri değiştirmeyi deneyebilirsiniz.
Bu sayfaya erişim yetkilendirme gerektiriyor. Dizinleri değiştirmeyi deneyebilirsiniz.
I/O control codes are contained in IRP_MJ_DEVICE_CONTROL and IRP_MJ_INTERNAL_DEVICE_CONTROL requests. The I/O manager creates these requests as a result of calls to DeviceIoControl and IoBuildDeviceIoControlRequest.
Because DeviceIoControl and IoBuildDeviceIoControlRequest accept both an input buffer and an output buffer as arguments, all IRP_MJ_DEVICE_CONTROL and IRP_MJ_INTERNAL_DEVICE_CONTROL requests supply both an input buffer and an output buffer. Sistemin bu arabellekleri tanımlama şekli, veri aktarım türüne bağlıdır. The transfer type is specified by the TransferType value in the CTL_CODE macro that creates IOCTL code values.
The system describes buffers for each TransferType value as follows.
METHOD_BUFFERED
For this transfer type, IRPs supply a pointer to a buffer at Irp->AssociatedIrp.SystemBuffer. This buffer represents both the input buffer and the output buffer that are specified in calls to DeviceIoControl and IoBuildDeviceIoControlRequest. Sürücü verileri bu arabellekten dışarıya ve sonra yeniden bu arabelleğe aktarır.
For input data, the buffer size is specified by Parameters.DeviceIoControl.InputBufferLength in the driver's IO_STACK_LOCATION structure. For output data, the buffer size is specified by Parameters.DeviceIoControl.OutputBufferLength in the driver's IO_STACK_LOCATION structure.
Sistemin tek giriş/çıkış arabelleği için ayırmış olduğu alanın boyutu, iki uzunluklu değerin daha büyüktür.
METHOD_IN_DIRECT veya METHOD_OUT_DIRECT
For these transfer types, IRPs supply a pointer to a buffer at Irp->AssociatedIrp.SystemBuffer. This represents the first buffer that is specified in calls to DeviceIoControl and IoBuildDeviceIoControlRequest. The buffer size is specified by Parameters.DeviceIoControl.InputBufferLength in the driver's IO_STACK_LOCATION structure.
For these transfer types, IRPs also supply a pointer to an MDL at Irp->MdlAddress. This represents the second buffer that is specified in calls to DeviceIoControl and IoBuildDeviceIoControlRequest. Bu arabellek, aşağıdaki gibi giriş arabelleği veya çıkış arabelleği olarak kullanılabilir:
METHOD_IN_DIRECT, IRP'yi işleyen sürücü çağrıldığında arabellekteki verileri alırsa belirtilir. MDL bir giriş arabelleği açıklar ve METHOD_IN_DIRECT belirterek yürütülen iş parçacığının arabelleğe okuma erişimi olmasını sağlar.
METHOD_OUT_DIRECT, IRP'yi işleyen sürücü IRP'yi tamamlamadan önce arabelleğe veri yazdığı durumda belirtilecek bir seçenek olarak açıklanır. MDL bir çıkış arabelleği açıklar ve METHOD_OUT_DIRECT belirterek, yürütülen iş parçacığının arabelleğe yazma erişimi olmasını sağlar.
For both of these transfer types, Parameters.DeviceIoControl.OutputBufferLength specifies the size of the buffer that is described by the MDL.
METHOD_NEITHER
G/Ç yöneticisi herhangi bir sistem arabelleği veya MDL sağlamaz. The IRP supplies the user-mode virtual addresses of the input and output buffers that were specified to DeviceIoControl or IoBuildDeviceIoControlRequest, without validating or mapping them.
The input buffer's address is supplied by Parameters.DeviceIoControl.Type3InputBuffer in the driver's IO_STACK_LOCATION structure, and the output buffer's address is specified by Irp->UserBuffer.
Buffer sizes are supplied by Parameters.DeviceIoControl.InputBufferLength and Parameters.DeviceIoControl.OutputBufferLength in the driver's IO_STACK_LOCATION structure.
For more information about the CTL_CODE macro and the transfer types listed above, see Defining I/O Control Codes.