Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > UMDF CreateWdfFile problem

Reply
Thread Tools Display Modes

UMDF CreateWdfFile problem

 
 
gti4ever
Guest
Posts: n/a

 
      04-27-2010
Hi,

I used CreateWdfFile() in my UMDF driver in order to create a file object
for my driver created request.

However, when I call Close() for that file object in my OnReleaseHardware(),
I always get the following exception in Windbg:

**** WUDF DriverStop - Internal error 0x400000000000000
**** in Host
****
d:\w7rtm\drivers\wdf\umdf\DriverHost\common\inc\pr ivate\TrackedObject.h:347(CTrackedObject::Release) :
Dereference of destroyed object, Context Record: .cxr 0x000000000100EC40

I ended up commented out all the code and simple call CreateWdfFile() in my
device Configure() funtion and call Close() in my OnReleaseHardwar() function
and still got the same error!!

My code is pretty much the same as the one in Doron's blog:
http://blogs.msdn.com/888_umdf_4_you...3/2117342.aspx

Did I miss something? Or did I use the file object wrong?

Regards,

G.
 
Reply With Quote
 
 
 
 
Egidio [MSFT]
Guest
Posts: n/a

 
      04-27-2010
Make sure:
- Make sure CreateWdfFile is successful
- Make sure you use the same handle in the close operation.
- Are you taking and releasing references on this object, make sure #addRef
== #releases.
- Experiment: try moving the close() in the same routine as CreateWdfFile(),
does it work?

Egi.

"gti4ever" <> wrote in message
news:81EA3850-C386-4BDD-AF52-...
> Hi,
>
> I used CreateWdfFile() in my UMDF driver in order to create a file object
> for my driver created request.
>
> However, when I call Close() for that file object in my
> OnReleaseHardware(),
> I always get the following exception in Windbg:
>
> **** WUDF DriverStop - Internal error 0x400000000000000
> **** in Host
> ****
> d:\w7rtm\drivers\wdf\umdf\DriverHost\common\inc\pr ivate\TrackedObject.h:347(CTrackedObject::Release) :
> Dereference of destroyed object, Context Record: .cxr 0x000000000100EC40
>
> I ended up commented out all the code and simple call CreateWdfFile() in
> my
> device Configure() funtion and call Close() in my OnReleaseHardwar()
> function
> and still got the same error!!
>
> My code is pretty much the same as the one in Doron's blog:
> http://blogs.msdn.com/888_umdf_4_you...3/2117342.aspx
>
> Did I miss something? Or did I use the file object wrong?
>
> Regards,
>
> G.


 
Reply With Quote
 
Doron Holan [MSFT]
Guest
Posts: n/a

 
      04-27-2010
that is pat's blog, not mine

d

--

This posting is provided "AS IS" with no warranties, and confers no rights.


"Egidio [MSFT]" <> wrote in message
news:...
> Make sure:
> - Make sure CreateWdfFile is successful
> - Make sure you use the same handle in the close operation.
> - Are you taking and releasing references on this object, make sure
> #addRef == #releases.
> - Experiment: try moving the close() in the same routine as
> CreateWdfFile(), does it work?
>
> Egi.
>
> "gti4ever" <> wrote in message
> news:81EA3850-C386-4BDD-AF52-...
>> Hi,
>>
>> I used CreateWdfFile() in my UMDF driver in order to create a file object
>> for my driver created request.
>>
>> However, when I call Close() for that file object in my
>> OnReleaseHardware(),
>> I always get the following exception in Windbg:
>>
>> **** WUDF DriverStop - Internal error 0x400000000000000
>> **** in Host
>> ****
>> d:\w7rtm\drivers\wdf\umdf\DriverHost\common\inc\pr ivate\TrackedObject.h:347(CTrackedObject::Release) :
>> Dereference of destroyed object, Context Record: .cxr 0x000000000100EC40
>>
>> I ended up commented out all the code and simple call CreateWdfFile() in
>> my
>> device Configure() funtion and call Close() in my OnReleaseHardwar()
>> function
>> and still got the same error!!
>>
>> My code is pretty much the same as the one in Doron's blog:
>> http://blogs.msdn.com/888_umdf_4_you...3/2117342.aspx
>>
>> Did I miss something? Or did I use the file object wrong?
>>
>> Regards,
>>
>> G.

>

 
Reply With Quote
 
gti4ever
Guest
Posts: n/a

 
      04-28-2010
I got it working by switching to CComPtr smart pointer and also put Close()
in the same routine.

Thanks for the suggestion.

G.

"Egidio [MSFT]" wrote:

> Make sure:
> - Make sure CreateWdfFile is successful
> - Make sure you use the same handle in the close operation.
> - Are you taking and releasing references on this object, make sure #addRef
> == #releases.
> - Experiment: try moving the close() in the same routine as CreateWdfFile(),
> does it work?
>
> Egi.
>


 
Reply With Quote
 
gti4ever
Guest
Posts: n/a

 
      04-28-2010
Ah, sorry.

I got confused with Pat, Ilias and your blogs all the time.

G.

"Doron Holan [MSFT]" wrote:

> that is pat's blog, not mine
>
> d


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why does my cursor jump all over when I am typing petro Windows Vista Hardware 22 01-15-2011 11:32 AM
Vista32, new driver? & USB Mouse/Keyboard not working Scott J. Stringfellow Windows Vista Hardware 27 04-01-2010 05:22 PM
Cannot install ATI drivers or Catalyst Control Center Pete Russell Windows Vista Performance 9 03-28-2010 02:52 AM
WLM Get faultcode: Windows Live Communication Platform has stoped working Masse Borglund Windows Live Messenger 21 03-28-2010 12:41 AM
SMTP Server Blocked, Incoming External Email Not Arriving Matthew Windows Small Business Server 30 12-05-2009 01:43 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59