Welcome to MSDN Blogs Sign in | Join | Help

My travels with WDF

The continuing story of a boy, his dog and their discovery of the world outside...of WDM.
When it leaks, it pours

Greetings from the Pacific Northwet.  After our recent Snow-pocalypse, we also suffered a run of flooding.  Amazingly enough, it wasn't directly due to the 13+ inches of snow I had at my house, it was a combination of the snow and the monumental amounts of rain that followed.  Quite a few people were literally cutoff from the rest of Washington State as their egress roads were under rivers.  The only hassle I had to suffer was one of FedEx being a day late with a new laptop.  Oh bother.

The leaking I did have to suffer was of my own doing. It was my usage of IWDFIoRequest::GetCompletionParams in a test driver.  In trying to be a good boy and clean up my I/O requests, and especially since I was going to be using asynchronous I/O, I wanted to get the completion parameters with out having to mess around with a completion routine.  Funny thing is, that call takes a reference on the pointer returned.  All was fine and dandy until I turned on Object leak detection (using WdfVerifier) and reference tracking.  Debugger breaks prevent things from running smoothly I've found. :)

Now those of you much smarter than me would have told me I could have avoided that by using the CComPtr class on the CompletionParams interface as shown in the sample, but if you're like me and still think you know better and didn't use the CComPtr class, you had best make a subsequent Release() call.

pWdfRequest->GetCompletionParams (&CompletionParams);

hr = CompletionParams->GetCompletionStatus ();
CompletionParams->Release();

Now to answer a question nobody asked, yes my dog LOVES snow.

IMG_8300

IMG_8270

I'll spare you all part two of my FiOS TV installation rant because the guy who came out and installed the CableCard in my TiVO made up for the previous incident, ten fold.  All I can say is wow.  I really enjoyed watching Rush R30 in un-bitstuffed HD via the Palladia channel.  Thank you FiOS.

*Currently playing - Porcupine Tree Blackest Eyes

Posted: Friday, January 16, 2009 1:09 PM by patman
Filed under: , , ,

Comments

No Comments

Anonymous comments are disabled
Page view tracker