How to access data buffers in a completion routine for a KMDF driv

I'm porting a WDM upper filter driver to KMDF version. I have two questions 
about data accessing in a completion routine.

1. In the completion routine of my WDM upper filter driver, it was able to 
retrieve data from Irp->AssociatedIrp.SystemBuffer( The IRP is using Method 
Neither I/O, and the data was set by function driver). How to do this for my 
KMDF driver?

2. In the completion routine of my WDM upper filter driver, it was able to 
retrieve data by calling MmGetSystemAddressForMdlSafe(Irp->MdlAddress, 
NormalPagePriority)( The IRP is using Method Neither I/O, and the MDL was set 
by function driver). How to do this for my KMDF driver?

Thanks in advance.
0
Utf
1/20/2010 9:48:01 AM
development.device.drivers 941 articles. 0 followers. Follow

1 Replies
986 Views

Similar Articles

[PageSpeed] 28

See the WdfRequestRetrieveXxx functions, which are typically used to access 
the buffers of a WDFREQUEST.

It sounds like you might have slightly unusual requirements though, so you 
might also want to look at just using WdfRequestWdmGetIrp. This will give 
you access to the underlying IRP of the WDFREQUEST and you can get the 
buffers just as you did in WDM.

-scott

-- 
Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com


"Leafbanana" <Leafbanana@discussions.microsoft.com> wrote in message 
news:AC01E5EF-57F2-48F8-A647-6F0AFF733035@microsoft.com...
> I'm porting a WDM upper filter driver to KMDF version. I have two 
> questions
> about data accessing in a completion routine.
>
> 1. In the completion routine of my WDM upper filter driver, it was able to
> retrieve data from Irp->AssociatedIrp.SystemBuffer( The IRP is using 
> Method
> Neither I/O, and the data was set by function driver). How to do this for 
> my
> KMDF driver?
>
> 2. In the completion routine of my WDM upper filter driver, it was able to
> retrieve data by calling MmGetSystemAddressForMdlSafe(Irp->MdlAddress,
> NormalPagePriority)( The IRP is using Method Neither I/O, and the MDL was 
> set
> by function driver). How to do this for my KMDF driver?
>
> Thanks in advance. 

0
Scott
1/20/2010 3:31:27 PM
Reply:

Similar Artilces:

Macro or Formula needed to search data in cells
Hi I am looking for a way to create a formula/macro to do the following: My worksheet setup: A1:A30000 C1:C5000 01 02 03 04 05 06 07 08 09 10 01 04 05 06 08 09 12 22 23 27 02 03 04 05 06 07 08 09 10 11 01 03 05 06 07 08 09 14 22 32 03 04 05 06 07 08 09 10 11 12 04 05 06 07 08 09 10 11 12 13 etc Each cell contains a 10 number sequence. The range A1:A30000 is my randomly generated sequence. And C1:5000 is my database of archived sequences. If I wish to check if the combination in cell A1 is anywhere in the range C1:5000. I use the formula. =IF(COU...

Search for data in a column bring all related items in other colum
I have data in the excel sheet with .A column for OrderNo and B Column for items for that Order. A B ORD001 ITEM1 ITEM2 ITEM3 ORD002 ITEM4 ITEM1 ITEM5 There are more than thousand orders.I want search for an Order so that it brings all items with it. I cannot use filter in A column as it doesn't recognise blank cell.So Option to repeat order nos in A for every item involves a lot of data entry. Any Solution ? I'd fill those empty cells in column a with the previous value. And us...

Why does linked data from blank cells become a zero?
When linking data within the same workbook (to different tabs) any cell that is empty - shows up in the new tab as a ZERO (0).....what am I doing wrong? I want those cells to remain blank. That's just the way it is .. Instead of : =Sheet2!A1 you could use an error trap: =IF(Sheet2!A1="","",Sheet2!A1) Alternatively, we could suppress the display of extraneous zeros in the entire sheet via: Click Tools > Options > View tab > Uncheck "Zero values" > OK -- Rgds Max xl 97 --- GMT+8, 1� 22' N 103� 45' E xdemechanik <at>yahoo<dot&g...

How change dimensions of data label text box in pie chart?
In Excel 2003, I can't seem to re-shape the data labels text boxes in my pie chart. I can change the font and allignment of the text within the text box. But, if the text defaults onto two or three lines, I cannot stretch the text box out to get the text to stay on one line. Normally, you can pull on the the little handles on the text box. Is there a trick to this that I don't know about? This is a deficiency in Excel's charting capabilities. The text elements seem like regular text boxes, but you are unable to resize or reshape them. Even VBA can't do this. The workar...

Area, perimeter, and color in shape data
Hi everyone, I have Visio Professional 2007. First, I don't have great skill yet in making shape data. But also, I would like to have the following data show in the shape data for various geometrical shapes (like squares, rectangle, or circles, for example): - the area of the shape - the perimeter of the shape - the color of the shape Now, I understand that I can go to Tools > Add-Ons > Visio Extras > Shape Area and Perimeter to get the first two items. I also know that this information will change dynamically as I alter the shape. So far, so good. ...

Getting data point from an accel chart
I have an excel chart that I want to get the data points(x,y) from. The source data refers to cells in the same sheet, but I don't see any cell in that work sheet. Only the chart. I can run the cursor over the line and get the x,y coordinates for each point. I would like to copy the x,y values, to reproduce the curve in another program ...

Trying to automatically import specific data from Excel into Word:
Thanks in advance for anyone who can help me with this: I'll start by explaining the spreadsheet I created in Excel (an inventory / information worksheet): It is pretty simple; approximately 12 columns. The key column is the item number / UPC / bar code number, then after that there are various information columns including item name, description, condition, picture links, etc. Secondly, I created a template Microsoft Word document that is relatively long, but will have a few lines (give or take...about 7) customized for each item on the inventory. What I am trying to d...

ADDITIONAL INFO RE: Data execution prevention
Since my last post, I have some additional info that might help someone get an insight as to what the problem may actually be. First, I went to start/run and put in "sfc /scannow", and let it run fully. Everything copacetic there. The I checked Admin. tools for the read-out. Under the "Error" heading was this info: Faulting Application rundll32.exe version 5.1.2600.5512, faulting module unknown, version 0.0.0.0. fault address0x00000000 Clicking on the "Online Help" link brought up a blank page - no help. Hoping some terrifically insightful MV...

CRM Integration: data doesn't go from CRM to GP
I'm setting up CRM integration for GP. Setup went ok, data migration from GP to CRM ok. When I add data to GP, it copies to CRM ok. I can't seem to get any CRM data to copy to GP. No messages in event viewer. Services are all started (according to documentation) successfully. I'm pretty sure I've configured properly in Settings and Admin tool. My IntegrationUser account is a member of all the required groups. I've turned on 'create customers always' to test, so I should create customers in GP whenever I create an account in CRM, but that's not happe...

Access down grade?
Hi, all I have a user access 2k database with few form(access interface to execute access macroes. I need to down grade the forms to access 97. so I can use access 97 instead of access 2k. Tables and queries and macroes, I don't have problem to down grade but forms. ANy ideas? Thanks, Tools>DatabaseUtilities>Convert Database> To prior version Regards Peter Russell new previously wrote: > Hi, all > > I have a user access 2k database with few form(access interface to > execute > access macroes. > > I need to down grade the forms to access 97. so ...

Data was deleted and saved by mistake..need to go back
I need to go back to the data before it was saved, can anyone help Richard don't get your hopes up. Unless you have a copy or a backup ... it's gone. Regards Trevor "Richard" <anonymous@discussions.microsoft.com> wrote in message news:1084801c3bea6$222d5270$a601280a@phx.gbl... > I need to go back to the data before it was saved, can > anyone help ...

Auto complete was empty today anyone know how to fix??
I have hundreds of emails in auto complete and today when I tried to use it they were all gone. this happened to me about 3 years ago and i never found out why. Can anyone help me please.. Submitted using http://www.outlookforums.com It happens all the time. You should expect it. The autocompletion cache was never intended to be a substitute for Contacts. You should never use it as such. -- Russ Valentine "mike long" <mlong[at]sunsetmg[dot]com> wrote in message news:u2xeA$DeKHA.1652@TK2MSFTNGP05.phx.gbl... >I have hundreds of emails in auto complete and tod...

Issue in reading data from Excel
Hi All, I have 3 excel files with me. say,Test.xlsx, saved.xls and original.xls. Here Test.xlsx has got reference to saved.xls and original.xls and displays values from both files. But the cells referring to data from Original.xls shows #N/A in Test.xlsx where as data from Saved.xls shows the correct values. (I am using the formula: =HLOOKUP(A5,'D: \Testing\[Original.xls]Output'!$A$1:$CQ$2,2,FALSE) Here, saved.xls and original.xls has got same columns and same data, but if i check the files size of both, they are different. size of Saved.xls is 26 KB and the size of Original.xls file...

Cannot access Hotmail
When I use IE8, IE6, Forefox or Safari I cnnot connect to Hotmail. The page title is Sign in, but the screen is white. The onlyway I can get this to work is put IE8 into compatibility view. Any ideas? HOW TO Optimize IE for Windows Live Hotmail (Revised 08 March 2010) http://windowslivehelp.com/solution.aspx?solutionid=3c7c3338-369e-4220-b29d-71ce660fe5a0 Solutions for Common Hotmail Problems http://windowslivehelp.com/solutions.aspx?productid=1 Hotmail Community Forums <=post all Hotmail-specific questions here! http://windowslivehelp.com/forums.aspx?productid=1 ...

Transfer data from Excel col. A to columns B-E in the same sheet
I have an Excel 2003 spreadsheet with only one column of player data: column A. The first three data items in column A are the same for every player: Name, Address and Phone. Every player also has at least one comment but could have any number of comments. Each player’s data is separated from the next by a blank cell in column A. Sometimes, a player’s last few comments are blank resulting in multiple blank cells in column A before the data for the next player starts. I need help writing an Excel 2003 VBA macro to: 1. Copy just the player’s name, but not the Name: label, to c...

Print Access report along with an outside checklist
Good afternoon Is it possible to print a report that's in Access and then right after print an Excel checklist? Background: I work for a large construction company that does regular maintenance on their equipment. Right now we print a parts ticket of the parts required for the particular service they are doing & then we print a copy of the manufacturer's check list of what should be done (which is an excel document). They would like to automate this procedure so that when you print the parts ticket it will automatically print the required manufacturer's ...

Compare data
Hi I would like to be able to compare data between two tables. Each table contains around 60 brands; however,the exact number of brands varies month to month, but the top brands are always there. This is the data I have each month: Column 1 = rank Column 2 = brand Column 3 = points (relates to performance) But I would like to compare the month with the previous month and for this I need to include two more columns: Column 4 = percentage change Column 5 = rank last month I have been calculating the figure for columns 4 & 5 with formulas one at a time. Can anyone suggest how I might aut...

Delete records when certain records have duplicate column data
Hi, I'm new to excel. I want to delete (sort of) duplicate records. My spreadsheet has many columns. My spreadsheet has many records I want to delete records where the data in just a few columns is the same in multiple records. (e.g. if the values in columns "A" "B" "D" "F" in any record is duplicated in multiple rows ..delete all matching records/rows. A= house number B= street name D=apt number F=city Bonus points: Can a macro/button be created that will allow me to load a spreadsheet and then somehow run the above filter/function on the ...

Access: Please wait while Setup prepares the neccessary files
Hi. I created a form in MS Access 2007 Enterprise Edition. I added a chart to it with a query as a record source. Everytime when I open the form, the wizard starts, saying "Please wait while Setup prepares the neccessary files" and soon the message "Configuring Microsoft Access Enterprise..." follows. It is annoying to see this everytime I try to use the form. Is there any particular reason for such a behaviour of the Access? Regards, Vedran. Hi Vedran, I suspect that some registry setting is not being written if you open the database as a normal user. By chance are y...

Data validation lookup
Is there a way to have a drop down list using data validation in file "jobs.xls" sheet "Sheet 1" Cell C4 to select a contact from a list that is in the file "parts.xls" sheet "contact" and fill in the corresponding cells in "Jobs.xls". The list of contacts starts on row 3 and goes to row 48 now but there will be more in the future. If there is another way to do this other than data validation I am open to other ideas. In "Job.xls" Sheet name is "Sheet 1" C4 C5 C6 D6 E6 C7 D7 C8 C9 ...

Source for automatic name completion
Dear Folks, Using Outlook 2003 and Windows XP. On my previous installation, Outlook 2000,I was able to specify the first source of data for automatic name completion in email. I can't seem to find that option in Outlook 2003, and the program seems to look first in my secondary data source. Any ideas? thanks Outlook 2000 never had autocompletion. It only had autoresolution, for which you could determine the order in which your folders were checked. Outlook 2002 and 2003 have autocompletion, which will only reference the cache created from messages you have sent, never your Contac...

Accessing an OST file
I have a user that is looking for a long lost email that she "hopes" she saved. Of course, she has many, many PST files. The email is not in any of those. There are 3 OST files in the default Outlook folder on her computer. Is there a way to open and search those files? I've done some research and have read that if the OST is orphaned, then you need to buy software that will let you convert the OST to a PST. That doesn't seem to be the case here, it is in her windows folder. Thanks "JohnB" <jbrigan@yahoo.com> wrote in message news:...

New Users can't Access Mailbox
An NT4 BDC with Exchange 5.5 running with W2k3 AD (as PDC emulator) in a single domain. The original NT4 PDC was upgraded in place. Note: old users are those created before the in-place (NT4 to W2k3) upgrade and new users are those created after the upgrade. Why can't new users access their Exch5.5 mailbox while all old users have no problem accessing it? New users can only logon to the domain and that's it. What am I missing? I'm completely lost. Have you specified Primary NT account for mailbox correctly? Compare account properties between old and new, there should be some ...

Create A Batch Recovery Routine For Printing Payroll Checks
There is no easy recovery if the system crashes after you have printed payroll checks but before you have run the Post Checks Routine. A recovery should be created like other posting routines in GP do. See Case ID 8916432 for description of what happened to us. Support was able to duplicate it by simulating a crash after checks printed, but before they were posted. Payroll is too important to not have a gracefull way of recovering when the system crashes. Luckily my problem only involved a run for a single check. It would be a nightmare to fix if this had been on our regular payr...

Copy above row data into blank fields below
Hi. Certain fields within my data do not repeat, but I'm trying to find a way to populate the blank cells from the preceding row. Here's an example: Employee_Number Last_Name First_Name 123456 Smith John Judy Ben 123457 Johnson Bill Ruth Eddy Sally As you can see, it didn't repeat the Employee Number ...