Closing HANDLE - still a problem

Hello,

Thank you Razvan for your reply. But it’s the same thing. “handle” utility is actualy the same thing as process explorer. I mean it display the same info. I still cannot find what is the problem. “System(4)” it’s the owner:

128: Section
12c: Process System(4)
130: Process System(4)
134: Process System(4)
138: Process System(4)
13c: Process System(4)
140: Process System(4)
144: Process System(4)
148: Process System(4)

This is the kind of info I get. What is curious is the handle type - “Process”. This is something I do not understand - I do not create processes nor threads(I have some working threads running, but they start only once and are ended when the app exits). I have printed in debug view the values of several handles… but none of them changes. All of them have the same value from begining of the app till the end. The ones I write above are changing every second. One thing that I know is that couple of my threads are “looping” once every second. So, I guess the problem is related to these threads. In this case the owner of these handles should be “MyApp” instead of “System(4)”… I think.
I hope there is some solution for this kind of problem and anyone here can help me with this one.

Are you calling an ObXxx functions? For instance, something like
ObReferenceObjectByHandle. If so, are you releasing the reference that
these functions take?

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ciubotaru Ovidiu
Andrei
Sent: Saturday, January 15, 2005 10:17 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Closing HANDLE - still a problem

Hello,

Thank you Razvan for your reply. But it’s the same thing. “handle”
utility is actualy the same thing as process explorer. I mean it display
the same info. I still cannot find what is the problem. “System(4)”
it’s the owner:

128: Section
12c: Process System(4)
130: Process System(4)
134: Process System(4)
138: Process System(4)
13c: Process System(4)
140: Process System(4)
144: Process System(4)
148: Process System(4)

This is the kind of info I get. What is curious is the handle type -
“Process”. This is something I do not understand - I do not create
processes nor threads(I have some working threads running, but they
start only once and are ended when the app exits). I have printed in
debug view the values of several handles… but none of them changes.
All of them have the same value from begining of the app till the end.
The ones I write above are changing every second. One thing that I know
is that couple of my threads are “looping” once every second. So, I
guess the problem is related to these threads. In this case the owner of
these handles should be “MyApp” instead of “System(4)”… I think.
I hope there is some solution for this kind of problem and anyone here
can help me with this one.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

So where in your code are you creating handles? What objects are you
creating handles to? Perhaps you should keep a list in a global table
of the last N handles you got back so that you can go afterwards and
check the state of them.

!handle in the debugger should tell you what object the handle refers
to.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ciubotaru Ovidiu
Andrei
Sent: Saturday, January 15, 2005 10:17 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Closing HANDLE - still a problem

Hello,

Thank you Razvan for your reply. But it’s the same thing. “handle”
utility is actualy the same thing as process explorer. I mean it display
the same info. I still cannot find what is the problem. “System(4)”
it’s the owner:

128: Section
12c: Process System(4)
130: Process System(4)
134: Process System(4)
138: Process System(4)
13c: Process System(4)
140: Process System(4)
144: Process System(4)
148: Process System(4)

This is the kind of info I get. What is curious is the handle type -
“Process”. This is something I do not understand - I do not create
processes nor threads(I have some working threads running, but they
start only once and are ended when the app exits). I have printed in
debug view the values of several handles… but none of them changes.
All of them have the same value from begining of the app till the end.
The ones I write above are changing every second. One thing that I know
is that couple of my threads are “looping” once every second. So, I
guess the problem is related to these threads. In this case the owner of
these handles should be “MyApp” instead of “System(4)”… I think.
I hope there is some solution for this kind of problem and anyone here
can help me with this one.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com