programming4us
programming4us
ENTERPRISE

Windows 7 : Programming Multiple I/O Queues and Programming I/O - Creating and Configuring the Queues (part 2)

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

2.2. Code to Create Queues for Read Requests

The driver creates a manual queue for read requests in the same way that it did for write requests. The only difference is that it configures the queue for request dispatching, so that KMDF places read requests directly into the queue. The driver creates the queue as follows:

WDF_IO_QUEUE_CONFIG_INIT (
&ioQueueConfig,
WdfIoQueueDispatchManual
);

status = WdfIoQueueCreate (
FdoData->WdfDevice,
&ioQueueConfig,
WDF_NO_OBJECT_ATTRIBUTES,
&FdoData->PendingReadQueue
);

if (!NT_SUCCESS (status))
{
return status;
}

Status = WdfDeviceConfigureRequestDispatching (
FdoData->WdfDevice,
FdoData->PendingReadQueue,
WdfRequesttypeRead
);
if (!NT_SUCCESS (status))
{
ASSERT (NT_SUCCESS (status));
return status;
}


2.3. Code to Create Queues for Device I/O Control Requests

The driver creates a second pair of parallel and internal manual queues for IRP_MJ_DEVICE_IO_CONTROL requests, just as it did for write requests, as follows:

WDF_IO_QUEUE_CONFIG_INIT (
&ioQueueConfig,
WdfIoQueueDispatchParallel
);

ioQueueConfig.EvtIoDeviceControl =
PciDrvEvtIoDeviceControl;

status = WdfIoQueueCreate (
FdoData->WdfDevice,
&ioQueueConfig,
WDF_NO_OBJECT_ATTRIBUTES,
&FdoData->IoctlQueue
);

if (!NT_SUCCESS (status))
{
return status;
}

status = WdfDeviceConfigureRequestDispatching (
FdoData->WdfDevice,
FdoData->IoctlQueue,
WdfRequestTypeDeviceControl
);

if (!NT_SUCCESS (status))
{
ASSERT (NT_SUCCESS (status));
return status;
}

// Create internal queue for pending IOCTL requests.

WDF_IO_QUEUE_CONFIG_INIT (
&ioQueueConfig,
WdfIoQueueDispatchManual
);

status = WdfIoQueueCreate (
FdoData->WdfDevice,
&ioQueueConfig,
WDF_NO_OBJECT_ATTRIBUTES,
&FdoData-PendingIoctlQueue
);

if (!NT_SUCCESS (status))
{
return status;
}


The driver configures these two queues exactly as it did the parallel and manual queues for write requests. The only difference is that it set a callback for EvtDeviceIoControl instead of EvtIoWrite and configures request dispatching for WdfRequestTypeDeviceControl instead of WdfRequestTypeWrite.

Other  
  •  Microsoft Exchange Server 2010 : Managing Mailbox and public Folder Databases (part 2) - Moving Databases
  •  Microsoft Exchange Server 2010 : Managing Mailbox and public Folder Databases (part 1) - Mounting and Dismounting Databases
  •  Microsoft Exchange Server 2010 : Using Public Folder Databases (part 4) - Configuring Public Folder Referrals, Recovering Deleted Items from Public Folder Databases
  •  Microsoft Exchange Server 2010 : Using Public Folder Databases (part 3) - Configuring Public Folder Replication
  •  Microsoft Exchange Server 2010 : Using Public Folder Databases (part 2) - Setting Public Folder Database Limits
  •  Microsoft Exchange Server 2010 : Using Public Folder Databases (part 1) - Creating Public Folder Databases
  •  Microsoft Exchange Server 2010 : Working with Active Mailbox Databases (part 3) - Recovering Deleted Mailboxes , Recovering Deleted Items from Mailbox Databases
  •  Microsoft Exchange Server 2010 : Working with Active Mailbox Databases (part 2) - Setting Mailbox Database Limits and Deletion retention
  •  Microsoft Exchange Server 2010 : Working with Active Mailbox Databases (part 1) - Creating Mailbox Databases
  •  Microsoft Exchange Server 2010 : Managing Public Folder Settings (part 3) - Manipulating, Renaming, and Recovering Public Folders
  •  
    Top 10
    Free Mobile And Desktop Apps For Accessing Restricted Websites
    MASERATI QUATTROPORTE; DIESEL : Lure of Italian limos
    TOYOTA CAMRY 2; 2.5 : Camry now more comely
    KIA SORENTO 2.2CRDi : Fuel-sipping slugger
    How To Setup, Password Protect & Encrypt Wireless Internet Connection
    Emulate And Run iPad Apps On Windows, Mac OS X & Linux With iPadian
    Backup & Restore Game Progress From Any Game With SaveGameProgress
    Generate A Facebook Timeline Cover Using A Free App
    New App for Women ‘Remix’ Offers Fashion Advice & Style Tips
    SG50 Ferrari F12berlinetta : Prancing Horse for Lion City's 50th
    - Messages forwarded by Outlook rule go nowhere
    - Create and Deploy Windows 7 Image
    - How do I check to see if my exchange 2003 is an open relay? (not using a open relay tester tool online, but on the console)
    - Creating and using an unencrypted cookie in ASP.NET
    - Directories
    - Poor Performance on Sharepoint 2010 Server
    - SBS 2008 ~ The e-mail alias already exists...
    - Public to Private IP - DNS Changes
    - Send Email from Winform application
    - How to create a .mdb file from ms sql server database.......
    programming4us programming4us
    programming4us
     
     
    programming4us