Quantcast
Channel: Sysinternals Forums
Viewing all articles
Browse latest Browse all 10386

Development : Discussion: HOWTO: Enumerate handles

$
0
0
Author: joakim
Subject: Discussion: HOWTO: Enumerate handles
Posted: 03 August 2013 at 3:36pm

I am wondering if it is possible to close (for instance type=file) handles from usermode by using the code in the reference thread? I have tried both NtClose and CloseHandle, but are getting ERROR_INVALID_HANDLE.
 
I am simply doing:
if (CloseHandle(handle.Handle) == 0)
{
 printf("Error in CloseHandle: %d\n",GetLastError());
}
 
so it is basically the same handle as used with NtDuplicateObject further up in code.
 

Viewing all articles
Browse latest Browse all 10386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>